[Bug rtl-optimization/67221] New: ICE at -Os and above on x86_64-linux-gnu: Segmentation fault (program cc1)
su at cs dot ucdavis.edu
gcc-bugzilla@gcc.gnu.org
Fri Aug 14 18:09:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67221
Bug ID: 67221
Summary: ICE at -Os and above on x86_64-linux-gnu: Segmentation
fault (program cc1)
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: su at cs dot ucdavis.edu
Target Milestone: ---
The following (valid) code causes an ICE when compiled with the current gcc
trunk at -Os and above 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-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 20150813 (experimental) [trunk revision 226872] (GCC)
$
$ gcc-trunk -O1 -c small.c
$ gcc-5.1 -Os -c small.c
$
$ gcc-trunk -Os -c small.c
gcc-trunk: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
----------------------------------
int a, b;
int
fn1 (int p)
{
return 0 == 0 ? p : 0;
}
void
fn2 ()
{
int c = 1, d[1] = { 1 };
lbl:
for (;;)
{
int e;
c ? 0 : 0 / c;
c = 0;
if (fn1 (d[0]))
break;
for (e = 0; e < 1; e++)
for (c = 1; b;)
{
if (a)
break;
goto lbl;
}
}
}
More information about the Gcc-bugs
mailing list