https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113707

--- Comment #2 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
Another related test for -O3 (only):

[555] % gcctk -O3 small.c
during GIMPLE pass: cunroll
small.c: In function ‘main’:
small.c:14:5: internal compiler error: Segmentation fault
   14 | int main() {
      |     ^~~~
0x1161623 crash_signal
        ../../gcc-trunk/gcc/toplev.cc:317
0x7fa97fd5308f ???
       
/build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xda0c28 extract_ops_from_tree(tree_node*, tree_code*, tree_node**,
tree_node**, tree_node**)
        ../../gcc-trunk/gcc/gimple-expr.cc:530
0xd980e0 gimple_build_assign(tree_node*, tree_node*)
        ../../gcc-trunk/gcc/gimple.cc:454
0x137c91c eliminate_dom_walker::eliminate_cleanup(bool)
        ../../gcc-trunk/gcc/tree-ssa-sccvn.cc:7494
0x13917db do_rpo_vn_1
        ../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8720
0x13923b3 do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool, bool,
vn_lookup_kind)
        ../../gcc-trunk/gcc/tree-ssa-sccvn.cc:8749
0x12df179 tree_unroll_loops_completely
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1554
0x12df2b3 execute
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1673
0x12df2b3 execute
        ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.cc:1663
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[556] %
[556] % cat small.c
int a, b, c, d, e, f, g, h, j, k, l;
void n() {
  while (c)
    if (1) {
      for (h = 5; h; h--) {
        int m = e % 2;
        d = ~g || h ^ m / -1;
        if (h > 5)
          e = k;
      }
      return;
    }
}
int main() {
  if (a)
    for (int i = 0; i < 2; i++) {
      for (f = 1; f < 6; f++)
        for (c = 7; c >= 0; c--)
          if (l)
            b = 0;
      n();
    }
  return 0;
}

Reply via email to