This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, CHKP, PR middle-end/66568] Fix internal compiler error: in expand_expr_addr_expr_1


On Thu, Jun 18, 2015 at 3:16 AM, Ilya Enkovich <enkovich.gnu@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.lu@intel.com>
+
+ * gcc.target/i386/mpx/pr66568.c (exit): New prototype.
+
 2015-07-01  Jason Merrill  <jason@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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]