On Thu, Jun 18, 2015 at 3:16 AM, Ilya Enkovich <enkovich....@gmail.com> wrote: > Hi, > > Currently return statement with no bounds in instrumented function causes > ICE. This patch uses zero bounds in such cases instead. Bootstrapped and > regtested for x86_64-unknown-linux-gnu. Applied to trunk. Is it OK for > gcc-5-branch? >
> diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66568.c > b/gcc/testsuite/gcc.target/i386/mpx/pr66568.c > new file mode 100644 > index 0000000..d7bb9f6 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/mpx/pr66568.c > @@ -0,0 +1,10 @@ > +/* { dg-do compile } */ > +/* { dg-require-effective-target fpic } */ > +/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -O2 -fPIC" } */ > + > +int a, b, c; > +void *set_test () { > + if (b) > + a ? exit (0) : exit (1); > + b = c; > +} I checked in this patch to add a prototype for exit. H.J. Index: ChangeLog =================================================================== --- ChangeLog (revision 225294) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2015-07-01 H.J. Lu <hongjiu...@intel.com> + + * gcc.target/i386/mpx/pr66568.c (exit): New prototype. + 2015-07-01 Jason Merrill <ja...@redhat.com> * lib/target-supports.exp (cxx_default): Set to C++14. Index: gcc.target/i386/mpx/pr66568.c =================================================================== --- gcc.target/i386/mpx/pr66568.c (revision 225294) +++ gcc.target/i386/mpx/pr66568.c (working copy) @@ -2,6 +2,7 @@ /* { dg-require-effective-target fpic } */ /* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -O2 -fPIC" } */ +extern void exit (int); int a, b, c; void *set_test () { if (b) -- H.J.