https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79740
Bug ID: 79740
Summary: ICE on -Os and above in both 32-bit and 64-bit modes
on x86_64-linux-gnu (internal compiler error: in
VN_INFO_GET, at tree-ssa-sccvn.c:407 })
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
Target Milestone: ---
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.1 20170227 (experimental) [trunk revision 245760] (GCC)
$
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:15:1: internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407
}
^
0xddcc76 VN_INFO_GET(tree_node*)
../../gcc-source-trunk/gcc/tree-ssa-sccvn.c:406
0xdb52c8 eliminate_insert
../../gcc-source-trunk/gcc/tree-ssa-pre.c:4133
0xdb52c8 eliminate_dom_walker::before_dom_children(basic_block_def*)
../../gcc-source-trunk/gcc/tree-ssa-pre.c:4267
0x1307ca7 dom_walker::walk(basic_block_def*)
../../gcc-source-trunk/gcc/domwalk.c:265
0xdb5b0f eliminate
../../gcc-source-trunk/gcc/tree-ssa-pre.c:4728
0xdb5e6d execute
../../gcc-source-trunk/gcc/tree-ssa-pre.c:5162
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.
$
$ cat small.c
int a;
short b;
short fn1(unsigned short p1) { return p1 << a; }
int main() {
short c;
int d = 4;
for (; b;) {
c = d + 1;
fn1(c);
d = 0;
}
d++;
return 0;
}
$