https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87211
Bug ID: 87211 Summary: gcc ICE at O2: in set_ssa_val_to, at tree-ssa-sccvn.c:3628 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: helloqirun at gmail dot com Target Milestone: --- It happens after the patch in r264069. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 9.0.0 20180903 (experimental) [trunk revision 264070] (GCC) $ gcc-trunk -O2 abc.c -c during GIMPLE pass: cunrolli abc.c:7:6: internal compiler error: in set_ssa_val_to, at tree-ssa-sccvn.c:3628 7 | void f() { | ^ 0x6cb479 set_ssa_val_to ../../gcc/gcc/tree-ssa-sccvn.c:3628 0xe6c8da visit_phi ../../gcc/gcc/tree-ssa-sccvn.c:4229 0xe6ce8f visit_stmt ../../gcc/gcc/tree-ssa-sccvn.c:4272 0xe6e9e8 process_bb ../../gcc/gcc/tree-ssa-sccvn.c:5890 0xe6fca9 do_rpo_vn ../../gcc/gcc/tree-ssa-sccvn.c:6421 0xe70a37 do_rpo_vn(function*, edge_def*, bitmap_head*) ../../gcc/gcc/tree-ssa-sccvn.c:6567 0xdf7de8 tree_unroll_loops_completely ../../gcc/gcc/tree-ssa-loop-ivcanon.c:1479 0xdf7fd8 execute ../../gcc/gcc/tree-ssa-loop-ivcanon.c:1655 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 abc.c int a, b; int c(int *d, int *e) { for (; b;) d = e; return d; } void f() { for (;;) { int *g[1]; int h = 0; for (; h < 3; h++) g[0] = &a; &a == g[0] || i(c(g, g[0])); } }