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

            Bug ID: 69936
           Summary: ICE on x86_64-linux-gnu at -Os and above in both
                    32-bit and 64-bit modes (internal compiler error:
                    cannot update SSA form)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com
  Target Milestone: ---

The following code crashes the trunk at -Os and above in both 32-bit and 64-bit
modes on x86_64-linux-gnu. 

$: 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/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20160223 (experimental) [trunk revision 233632] (GCC) 
$:
$: gcc-trunk -O3 small.c
small.c: In function ‘fn3’:
small.c:22:1: error: statement uses released SSA name:
 int main() { return 0; }
 ^~~
d_17 = (int) _16;
The use of _16 should have been replaced
small.c:22:1: internal compiler error: cannot update SSA form
0xbb0995 update_ssa(unsigned int)
        ../../gcc-trunk/gcc/tree-into-ssa.c:3195
0xa59713 execute_function_todo
        ../../gcc-trunk/gcc/passes.c:1926
0xa5a03b execute_todo
        ../../gcc-trunk/gcc/passes.c:2010
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$: 
$: 
$: cat small.c
int a;
char b;
void fn1(int p1) {}

int fn2() { return 5; }

void fn3() {
  if (fn2())
    ;
  else {
    char c[5];
    c[0] = 5;
  lbl_608:
    fn1(c[9]);
    int d = c[9];
    c[2] | a;
    d = c[b];
  }
  goto lbl_608;
}

int main() { return 0; }
$:

Reply via email to