Message ID | 20141126134311.GD40854@msticlxl57.ims.intel.com |
---|---|
State | New |
Headers | show |
On Wed, Nov 26, 2014 at 04:48:13PM +0300, Ilya Enkovich wrote: > 2014-11-26 Ilya Enkovich <ilya.enkovich@intel.com> > > PR bootstrap/63995 > * tree-chkp-opt.c (chkp_reduce_bounds_lifetime): Ignore > debug statement when searching for a new position for > bounds load/creation statement. > > gcc/testsuite/ > > 2014-11-26 Ilya Enkovich <ilya.enkovich@intel.com> > > PR bootstrap/63995 > * gcc.target/i386/pr63995-2.c: New. Ok, thanks. Jakub
diff --git a/gcc/testsuite/gcc.target/i386/pr63995-2.c b/gcc/testsuite/gcc.target/i386/pr63995-2.c new file mode 100644 index 0000000..7c22e62 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr63995-2.c @@ -0,0 +1,28 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target mpx } */ +/* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx -fcompare-debug" } */ + +struct ts +{ + int field; +}; + +extern void test1 (); +extern void test2 (struct ts *); + +static void +init (struct ts *c) +{ + c->field = -1; +} + +struct ts +test3 (const struct ts *other) +{ + struct ts r; + if (other->field != 0) + test1 (); + init (&r); + test2 (&r); + return r; +} diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c index ff390d7..92e0694 100644 --- a/gcc/tree-chkp-opt.c +++ b/gcc/tree-chkp-opt.c @@ -1175,6 +1175,9 @@ chkp_reduce_bounds_lifetime (void) FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, op) { + if (is_gimple_debug (use_stmt)) + continue; + if (dom_bb && dominated_by_p (CDI_DOMINATORS, dom_bb, gimple_bb (use_stmt)))