This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/66372] New: ICE on valid code at -O3 on x86_64-linux-gnu
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Jun 2015 03:12:26 +0000
- Subject: [Bug tree-optimization/66372] New: ICE on valid code at -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66372
Bug ID: 66372
Summary: ICE on valid code at -O3 on x86_64-linux-gnu
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 at
-O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.
It is a regression from 5.1.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/6.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 6.0.0 20150601 (experimental) [trunk revision 223995] (GCC)
$
$ gcc-trunk -O2 small.c; ./a.out
$ gcc-5.1 -O3 small.c; ./a.out
$
$ gcc-trunk -O3 small.c
small.c: In function âmainâ:
small.c:29:1: internal compiler error: Segmentation fault
main ()
^
0xb1212f crash_signal
../../gcc-trunk/gcc/toplev.c:380
0xcf4811 thread_through_all_blocks(bool)
../../gcc-trunk/gcc/tree-ssa-threadupdate.c:2693
0xc3310b execute
../../gcc-trunk/gcc/tree-ssa-dom.c:1244
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, c, d, e, f;
int
fn1 ()
{
for (;;)
{
if (a)
break;
unsigned int g = 1;
lbl:
c = g;
for (g = 0; g < 1; g++)
{
if (c)
continue;
int h[1];
f = h[0];
for (; d; d = 0)
if (e)
goto lbl;
}
return 0;
}
return 0;
}
int
main ()
{
fn1 ();
return 0;
}