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/71881] New: ICE on valid code at -O3 with -g enabled on x86_64-linux-gnu: cannot update SSA form


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

            Bug ID: 71881
           Summary: ICE on valid code at -O3 with -g enabled on
                    x86_64-linux-gnu: cannot update SSA form
           Product: gcc
           Version: 7.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 at
-O3 with -g enabled on x86_64-linux-gnu in both 32-bit and 64-bit modes.

It is a regression from 6.1.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/7.0.0/lto-wrapper
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 20160714 (experimental) [trunk revision 238331] (GCC) 
$ 
$ gcc-trunk -O3 -c small.c
$ gcc-trunk -O2 -g -c small.c
$ gcc-6.1 -O3 -g -c small.c
$ 
$ gcc-trunk -O3 -g -c small.c
small.c: In function ‘fn1’:
small.c:3:5: error: statement uses released SSA name:
 int fn1 ()
     ^~~
# DEBUG i => i_29 + 1
The use of i_29 should have been replaced
small.c:3:5: internal compiler error: cannot update SSA form
0xc6090e update_ssa(unsigned int)
        ../../gcc-source-trunk/gcc/tree-into-ssa.c:3203
0xd35e5c rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int, loop*)
        ../../gcc-source-trunk/gcc/tree-ssa-loop-manip.c:623
0xc670ff execute
        ../../gcc-source-trunk/gcc/tree-loop-distribution.c:1838
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, g;

int fn1 ()
{
  char h[2];
  int i = 0;
  for (; i < 2; i++)
    {
      if (c)
        for (*e = 0; *e;)
          {
            int j[f];
            i = *e;
          }
      h[i] = 0;
    }
  for (; a;)
    return h[0];
  for (b = 0; b;)
    i = g = (1 & i) < d;
  return 0;
}

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