Bug ID: 84746
           Summary: ICE on valid code at -O2 and -O3: Segmentation fault
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot
          Reporter: su at cs dot
  Target Milestone: ---

$ gcctk -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 8.0.1 20180307 (experimental) [trunk revision 258312] (GCC) 
$ gcctk -Os -c small.c
$ gcc-7.2.0 -O2 -c small.c
$ gcctk -O2 -c small.c
during GIMPLE pass: pre
small.c: In function ‘fn1’:
small.c:4:6: internal compiler error: Segmentation fault
 void fn1 ()
0xca7f6f crash_signal
0xedd700 update_dep_bb
0xedfbf9 same_succ_hash
0xedfbf9 find_same_succ_bb
0xee00ff find_same_succ
0xee00ff init_worklist
0xee00ff tail_merge_optimize(unsigned int)
0xe7c6b6 execute
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.


int a, b, c, d, e;
char f, g;

void fn1 ()
  while (1)
      if (d)
        goto L1;
      if (e)
        goto L3;
      int q = (c && a) % (f * (d || a)) && b;
      e = q;
      if (b)
      c = f;
      f = g;
      while (a)
        goto L2;

Reply via email to