Bug ID: 77988
           Summary: ICE on valid code at -Os and above on
                    x86_64-linux-gnu: verify_gimple failed
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot
          Reporter: su at cs dot
  Target Milestone: ---

It is a regression from 6.2.x. 

$ gcc-trunk -v
Using built-in specs.
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.0 20161013 (experimental) [trunk revision 241143] (GCC)
$ gcc-trunk -O1 small.c
$ gcc-6.2 -Os small.c
$ gcc-trunk -Os small.c
small.c: In function ‘main’:
small.c:4:5: error: invalid address operand in MEM_REF
 int main ()

small.c:4:5: error: invalid first operand of MEM_REF
small.c:15:11: note: in statement
       if (*f)
# VUSE <.MEM_9(D)>
_2 = b[0];
small.c:4:5: internal compiler error: verify_gimple failed
 int main ()
0xc31eff verify_gimple_in_cfg(function*, bool)
0xb12492 execute_function_todo
0xb12e49 execute_todo
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.


static int a = 2;
int b[1], c, d;

int main ()
  int e = a, *f = &b[0];
  if (d)
    for (e = 0; e < 1; e++)
  if (e)
      if (b < f)
        __builtin_abort ();
      if (*f)
      return 0;
  f = 0;
  goto L1;
  return 0;

Reply via email to