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

            Bug ID: 71292
           Summary: Bootstrap failure with segfault in tree-reassoc.c
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
                CC: kugan at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64-none-linux-gnu

An aarch64-none-linux-gnu bootstrap with an in-tree mpfr fails with an ICE:
exp_2.i: In function ‘fn1’:
exp_2.i:4:6: internal compiler error: Segmentation fault
 void fn1() {
      ^~~
0xb1f8cf crash_signal
        $SRC/gcc/toplev.c:333
0x89bcb9 bb_seq_addr
        $SRC/gcc/gimple.h:1655
0x89bcb9 gsi_start_bb
        $SRC/gcc/gimple-iterator.h:129
0x89bcb9 gsi_for_stmt(gimple*)
        $SRC/gcc/gimple-iterator.c:617
0xcbbeba insert_stmt_after
        $SRC/gcc/tree-ssa-reassoc.c:1323
0xcbd67a build_and_add_sum
        $SRC/gcc/tree-ssa-reassoc.c:1392
0xcbf34f rewrite_expr_tree_parallel
        $SRC/gcc/tree-ssa-reassoc.c:4128
0xcc8b95 reassociate_bb
        $SRC/gcc/tree-ssa-reassoc.c:5339
0xcc8ad7 reassociate_bb
        $SRC/gcc/tree-ssa-reassoc.c:5391
0xccb523 do_reassoc
        $SRC/gcc/tree-ssa-reassoc.c:5505
0xccb523 execute_reassoc
        $SRC/gcc/tree-ssa-reassoc.c:5592
0xccb523 execute
        $SRC/gcc/tree-ssa-reassoc.c:5631
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.

The reduced testcase for that reproducible with trunk at:
gcc version 7.0.0 20160526 
is:

unsigned long a;
long b, d;
int c;
void fn1() {
  unsigned long e = a + c;
  b = d + e + a + 8;
}

compile with -O2.
Compiling with -fno-tree-reassoc doesn't ICE

Reply via email to