https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69989
Bug ID: 69989
Summary: ICE on x86_64-linux-gnu at -O3 in both 32-bit and
64-bit modes (in verify_loop_structure, at
cfgloop.c:1639)
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
Target Milestone: ---
The following code crashes the trunk on x86_64-linux-gnu at -O3 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-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 6.0.0 20160227 (experimental) [trunk revision 233778] (GCC)
$:
$: gcc-trunk -O3 small.c
small.c: In function ‘fn1’:
small.c:3:6: error: loop verification on loop tree that needs fixup
void fn1() {
^~~
small.c:3:6: internal compiler error: in verify_loop_structure, at
cfgloop.c:1639
0x72f9f7 verify_loop_structure()
../../gcc-source-trunk/gcc/cfgloop.c:1639
0xbd54d5 checking_verify_loop_structure
../../gcc-source-trunk/gcc/cfgloop.h:324
0xbd54d5 execute
../../gcc-source-trunk/gcc/tree-loop-distribution.c:1818
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.
$:
$: cat small.c
int a, b, d;
char c[0];
void fn1() {
for (;;) {
if (b)
LABEL_T5T5T:
for (; d; d++)
c[d] = 6;
break;
}
a = 1;
goto LABEL_T5T5T;
}
int main() {}
$: