This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/64357] New: ICE at -Os on x86_64-linux-gnu in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:579


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

            Bug ID: 64357
           Summary: ICE at -Os on x86_64-linux-gnu in
                    check_loop_closed_ssa_use, at
                    tree-ssa-loop-manip.c:579
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-Os 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-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-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 5.0.0 20141218 (experimental) [trunk revision 218871] (GCC) 

$ 
$ gcc-trunk -O1 -c small.c
$ gcc-trunk -O2 -c small.c
$ gcc-4.9 -Os -c small.c
$ 
$ gcc-trunk -Os -c small.c
small.c: In function âfn3â:
small.c:25:1: internal compiler error: in check_loop_closed_ssa_use, at
tree-ssa-loop-manip.c:579
 fn3 ()
 ^
0xbb7c5f check_loop_closed_ssa_use
    ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:579
0xbb97da verify_loop_closed_ssa(bool)
    ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:624
0x9a8026 execute_function_todo
    ../../gcc-trunk/gcc/passes.c:1955
0x9a88b3 execute_todo
    ../../gcc-trunk/gcc/passes.c:1997
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, f;

long long
fn1 (int p)
{
  return p ? p : 1;
}

static int
fn2 ()
{
lbl:
  for (; f;)
    return 0;
  for (;;)
    {
      for (b = 0; b; ++b)
    if (d)
      goto lbl;
      c = e;
    }
}

void
fn3 ()
{
  for (; a; a = fn1 (a))
    {
      fn2 ();
      e = 0;
    }
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]