https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95161
Bug ID: 95161
Summary: [10/11 Regression] internal compiler error: in
gimplify_expr, at gimplify.c:14609
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: anbu1024.me at gmail dot com
Target Milestone: ---
$ cat test.c
unsigned short * x = 0 ;
int foo ( void ) { * x = 0 ; }
int x [ ] = { 1 , 2 , 3 }
$ gcc-11 --version
gcc (GCC) 11.0.0 20200510 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc-11 test.c
test.c:6:5: error: conflicting types for ‘x’
6 | int x [ ] = { 1 , 2 , 3 }
| ^
test.c:2:18: note: previous definition of ‘x’ was here
2 | unsigned short * x = 0 ;
| ^
test.c:6:1: error: expected ‘,’ or ‘;’ at end of input
6 | int x [ ] = { 1 , 2 , 3 }
| ^~~
test.c: In function ‘foo’:
test.c:4:20: internal compiler error: in gimplify_expr, at gimplify.c:14609
4 | int foo ( void ) { * x = 0 ; }
| ^~~
0x674c01 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-11-20200510/gcc/gimplify.c:14609
0xb0192a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-11-20200510/gcc/gimplify.c:13706
0xb1669f gimplify_modify_expr
../../gcc-11-20200510/gcc/gimplify.c:5759
0xaff80c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-11-20200510/gcc/gimplify.c:13585
0xb02e76 gimplify_stmt(tree_node**, gimple**)
../../gcc-11-20200510/gcc/gimplify.c:6802
0xb03b43 gimplify_bind_expr
../../gcc-11-20200510/gcc/gimplify.c:1411
0xb00383 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-11-20200510/gcc/gimplify.c:13786
0xb17a87 gimplify_stmt(tree_node**, gimple**)
../../gcc-11-20200510/gcc/gimplify.c:6802
0xb17a87 gimplify_body(tree_node*, bool)
../../gcc-11-20200510/gcc/gimplify.c:14834
0xb17ebd gimplify_function_tree(tree_node*)
../../gcc-11-20200510/gcc/gimplify.c:14988
0x962f47 cgraph_node::analyze()
../../gcc-11-20200510/gcc/cgraphunit.c:670
0x965b47 analyze_functions
../../gcc-11-20200510/gcc/cgraphunit.c:1227
0x966712 symbol_table::finalize_compilation_unit()
../../gcc-11-20200510/gcc/cgraphunit.c:2971
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ gcc-10 --version
gcc (GCC) 10.0.1 20200419 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc-10 test.c
test.c:6:5: error: conflicting types for ‘x’
6 | int x [ ] = { 1 , 2 , 3 }
| ^
test.c:2:18: note: previous definition of ‘x’ was here
2 | unsigned short * x = 0 ;
| ^
test.c:6:1: error: expected ‘,’ or ‘;’ at end of input
6 | int x [ ] = { 1 , 2 , 3 }
| ^~~
test.c: In function ‘foo’:
test.c:4:20: internal compiler error: in gimplify_expr, at gimplify.c:14632
4 | int foo ( void ) { * x = 0 ; }
| ^~~
0x674570 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-10-20200419/gcc/gimplify.c:14632
0xaff66a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-10-20200419/gcc/gimplify.c:13729
0xb1453f gimplify_modify_expr
../../gcc-10-20200419/gcc/gimplify.c:5782
0xafd53c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-10-20200419/gcc/gimplify.c:13608
0xb00bd6 gimplify_stmt(tree_node**, gimple**)
../../gcc-10-20200419/gcc/gimplify.c:6825
0xb0199b gimplify_bind_expr
../../gcc-10-20200419/gcc/gimplify.c:1424
0xafe0b3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc-10-20200419/gcc/gimplify.c:13809
0xb15927 gimplify_stmt(tree_node**, gimple**)
../../gcc-10-20200419/gcc/gimplify.c:6825
0xb15927 gimplify_body(tree_node*, bool)
../../gcc-10-20200419/gcc/gimplify.c:14857
0xb15e53 gimplify_function_tree(tree_node*)
../../gcc-10-20200419/gcc/gimplify.c:15030
0x9607d7 cgraph_node::analyze()
../../gcc-10-20200419/gcc/cgraphunit.c:670
0x9633f7 analyze_functions
../../gcc-10-20200419/gcc/cgraphunit.c:1227
0x963fc2 symbol_table::finalize_compilation_unit()
../../gcc-10-20200419/gcc/cgraphunit.c:2974
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.