Bug 66568 - [CHKP] internal compiler error: in expand_expr_addr_expr_1
Summary: [CHKP] internal compiler error: in expand_expr_addr_expr_1
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 6.0
: P3 normal
Target Milestone: ---
Assignee: Ilya Enkovich
URL:
Keywords:
Depends on:
Blocks: CHKP
  Show dependency treegraph
 
Reported: 2015-06-17 11:53 UTC by Ilya Enkovich
Modified: 2015-07-23 11:15 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Enkovich 2015-06-17 11:53:48 UTC
>cat test.i
int a, b, c;
void *set_test () {
  if (b)
    a ? exit (0) : exit (1);
  b = c;
}
>gcc -fcheck-pointer-bounds -mmpx -O2 test.i
test.i: In function 'set_test':
test.i:8:9: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
     a ? exit (0) : exit (1);
         ^
test.i:8:9: warning: incompatible implicit declaration of built-in function 'exit'
test.i:8:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
test.i: In function 'set_test.chkp':
test.i:6:7: internal compiler error: in expand_expr_addr_expr_1, at expr.c:7671
 void *set_test () {
       ^
0x98c710 expand_expr_addr_expr_1
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/expr.c:7671
0x98cdaa expand_expr_addr_expr
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/expr.c:7760
0x9985f0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/expr.c:10638
0x98d1e1 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/expr.c:7928
0x83c460 expand_normal
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/expr.h:261
0x84853e expand_return
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/cfgexpand.c:3148
0x848cd1 expand_gimple_stmt_1
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/cfgexpand.c:3290
0x84922d expand_gimple_stmt
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/cfgexpand.c:3414
0x8502ed expand_gimple_basic_block
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/cfgexpand.c:5426
0x851f5f execute
        /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/cfgexpand.c:6045

Fails on GCC 6 and GCC 5.1
Comment 1 Ilya Enkovich 2015-06-18 10:15:09 UTC
Author: ienkovich
Date: Thu Jun 18 10:14:38 2015
New Revision: 224601

URL: https://gcc.gnu.org/viewcvs?rev=224601&root=gcc&view=rev
Log:
gcc/

	PR middle-end/66568
	* cfgexpand.c (expand_return): Handle missing bounds.
	(expand_gimple_stmt_1): Likewise.
	* tree-chkp.c (chkp_expand_zero_bounds): New.
	* tree-chkp.h (chkp_expand_zero_bounds): New.

gcc/testsuite/

	PR middle-end/66568
	* gcc.target/i386/mpx/pr66568.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/mpx/pr66568.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgexpand.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-chkp.c
    trunk/gcc/tree-chkp.h
Comment 2 H.J. Lu 2015-07-02 04:52:47 UTC
All tests are failed with

FAIL: gcc.target/i386/mpx/pr66568.c   -O0  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -O1  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -O2  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -O3 -fomit-frame-pointer  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -O3 -g  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -Os  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -O2 -flto -fno-use-linker-plugin -flto-partition=none  (test for excess errors)
FAIL: gcc.target/i386/mpx/pr66568.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  (test for excess errors)
Comment 3 Ilya Enkovich 2015-07-23 10:39:57 UTC
Author: ienkovich
Date: Thu Jul 23 10:39:26 2015
New Revision: 226101

URL: https://gcc.gnu.org/viewcvs?rev=226101&root=gcc&view=rev
Log:
gcc/

	Backport from mainline r224601.
	2015-06-18  Ilya Enkovich  <enkovich.gnu@gmail.com>

	PR middle-end/66568
	* cfgexpand.c (expand_return): Handle missing bounds.
	(expand_gimple_stmt_1): Likewise.
	* tree-chkp.c (chkp_expand_zero_bounds): New.
	* tree-chkp.h (chkp_expand_zero_bounds): New.

gcc/testsuite/

	Backport from mainline r224601.
	2015-06-18  Ilya Enkovich  <enkovich.gnu@gmail.com>

	PR middle-end/66568
	* gcc.target/i386/mpx/pr66568.c: New test.

	Backport from mainline r225296.
	2015-07-01  H.J. Lu  <hongjiu.lu@intel.com>

	* gcc.target/i386/mpx/pr66568.c (exit): New prototype.

Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66568.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/cfgexpand.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-chkp.c
    branches/gcc-5-branch/gcc/tree-chkp.h
Comment 4 Ilya Enkovich 2015-07-23 11:15:40 UTC
Fixed