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 rtl-optimization/67778] [6 Regression] ICE on valid code at -O3 on x86_64-linux-gnu in maybe_record_trace_start, at dwarf2cfi.c:2297


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

--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Martin Sebor from comment #1)
> I can't reproduce this error with today's trunk (6.0.0 20151125) on x86_64. 
> I see a similar stack trace in bug 60598 but that was fixed over a year ago.
> Can you confirm that trunk compiles the test case as expected in your
> environment?

Martin, the originally reported test doesn't seem to crash the current trunk,
but the original test I have still fails.  I reduced it again, and below is the
new test (note that the new test causes an ICE at both -O2 and -O3, and in both
32-bit and 64-bit modes): 

$ 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 20151122 (experimental) [trunk revision 230719] (GCC) 
$ 
$ gcc-trunk -O2 small.c
small.c: In function âmainâ:
small.c:28:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2284
 }
 ^

0x78a2e6 maybe_record_trace_start
        ../../gcc-trunk/gcc/dwarf2cfi.c:2284
0x78a613 create_trace_edges
        ../../gcc-trunk/gcc/dwarf2cfi.c:2376
0x78c6ea scan_trace
        ../../gcc-trunk/gcc/dwarf2cfi.c:2590
0x78d3ea create_cfi_notes
        ../../gcc-trunk/gcc/dwarf2cfi.c:2616
0x78d3ea execute_dwarf2_frame
        ../../gcc-trunk/gcc/dwarf2cfi.c:2974
0x78d3ea execute
        ../../gcc-trunk/gcc/dwarf2cfi.c:3454
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 printf (const char *, ...);

int a, b, c; 

int
fn1 (int p1, int p2)
{
  return p1 > 2147483647 - p2 ? p1 : p1 + p2;
}

int
main ()
{
  a = 0;
  for (; a != 2; a = fn1 (a, 1))
    {
      if (b)
        {
          int d[1], e = 0, f; 
          for (; e != 3; e = fn1 (e, 1))
            b = 0;
          c = f = d[0];
        }
      b = 0;
    }
  printf ("%d\n", c);
  return 0;
}

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