[Bug tree-optimization/67470] New: ICE at -O3 on x86_64-linux-gnu in compute_live_loop_exits, at tree-ssa-loop-manip.c:235

su at cs dot ucdavis.edu gcc-bugzilla@gcc.gnu.org
Sun Sep 6 21:33:00 GMT 2015


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

            Bug ID: 67470
           Summary: ICE at -O3 on x86_64-linux-gnu in
                    compute_live_loop_exits, at tree-ssa-loop-manip.c:235
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk (as
well as 5.1.x and 5.2.x) at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit
modes.

It is a regression from 4.9.x.


$ 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 20150906 (experimental) [trunk revision 227511] (GCC) 
$ 
$ gcc-trunk -O2 small.c; ./a.out
$ gcc-4.9 -O3 small.c; ./a.out
$ 
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:6:1: internal compiler error: in compute_live_loop_exits, at
tree-ssa-loop-manip.c:235
 main ()
 ^
0xc070b7 compute_live_loop_exits
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:235
0xc070b7 add_exit_phis_var
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:322
0xc070b7 add_exit_phis
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:344
0xc070b7 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int, loop*)
        ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:664
0xbeabb4 move_computations
        ../../gcc-trunk/gcc/tree-ssa-loop-im.c:1326
0xbeabb4 tree_ssa_lim()
        ../../gcc-trunk/gcc/tree-ssa-loop-im.c:2551
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.
$ 


-----------------------------------


int a, b, *c, d, e;

void __assert_fail ();

int
main ()
{
  int f, *g, **h = &g;
  for (; b;)
    {
      c = &a;
      for (e = 0; e < 1; e++)
        *h = 0;
      for (; d; d++)
        if (f)
          *c = 0;
        else
          {
            *c = e = 0;
            *h = &a;
          }

      if (a && !g)
        __assert_fail ();

    }
  return 0;
}


More information about the Gcc-bugs mailing list