This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, CHKP, PR middle-end/66568] Fix internal compiler error: in expand_expr_addr_expr_1
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 1 Jul 2015 22:03:04 -0700
- Subject: Re: [PATCH, CHKP, PR middle-end/66568] Fix internal compiler error: in expand_expr_addr_expr_1
- Authentication-results: sourceware.org; auth=none
- References: <20150618101646 dot GC28183 at msticlxl57 dot ims dot intel dot com>
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.