[Bug bootstrap/80565] New: ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on x86_64-linux-gnu (in edge_badness, at ipa-inline.c:1028)
chengniansun at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Apr 29 16:18:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80565
Bug ID: 80565
Summary: ICE at -O2 and -O3 in 32-bit mode (not 64-bit) on
x86_64-linux-gnu (in edge_badness, at
ipa-inline.c:1028)
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
Target Milestone: ---
$ 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/8.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 8.0.0 20170429 (experimental) [trunk revision 247405] (GCC)
$ gcc-trunk -m32 -O2 small.c
small.c: In function ‘fn2’:
small.c:4:14: warning: type of ‘p1’ defaults to ‘int’ [-Wimplicit-int]
static short fn2(p1) {
^~~
small.c: At top level:
small.c:39:1: internal compiler error: in edge_badness, at ipa-inline.c:1028
}
^
0x139f133 edge_badness
../../gcc-source-trunk/gcc/ipa-inline.c:1028
0x13a037b update_edge_key
../../gcc-source-trunk/gcc/ipa-inline.c:1224
0x13a08da update_caller_keys
../../gcc-source-trunk/gcc/ipa-inline.c:1351
0x13a269f inline_small_functions
../../gcc-source-trunk/gcc/ipa-inline.c:2045
0x13a269f ipa_inline
../../gcc-source-trunk/gcc/ipa-inline.c:2438
0x13a269f execute
../../gcc-source-trunk/gcc/ipa-inline.c:2849
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ cat small.c
int a, b, c, e, h, j;
char d;
short f, g;
static short fn2(p1) {
for (;;)
for (; g; g++)
if (p1)
break;
}
static short fn3();
static char fn4(char p1) {
int i;
for (; d;)
f = 8;
for (; f; f = 0)
for (; i; i++) {
j = 0;
for (; j; j++)
;
}
}
static short fn1(short p1) { fn2(b || fn3()); }
short fn3() {
if (c) {
fn4(e);
h = 0;
for (;; h++)
;
}
}
int main() {
for (; a;)
fn1(c);
return 0;
}
More information about the Gcc-bugs
mailing list