[Bug c/78510] New: ice on invalid C code at -O2 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: verify_gimple failed)
chengniansun at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Nov 24 10:58:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78510
Bug ID: 78510
Summary: ice on invalid C code at -O2 and above in both 32-bit
and 64-bit modes on x86_64-linux-gnu (internal
compiler error: verify_gimple failed)
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
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/7.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 7.0.0 20161124 (experimental) [trunk revision 242818] (GCC)
$
$ gcc-trunk -O3 small.c
small.c: In function ‘main’:
small.c:17:5: error: type mismatch in conditional expression
int main() { fn2(); return 0; }
^~~~
short int
int
short int
iftmp.1_11 = _6 == 4 ? 4 : 0;
small.c:17:5: internal compiler error: verify_gimple failed
0xc317f6 verify_gimple_in_cfg(function*, bool)
../../gcc-source-trunk/gcc/tree-cfg.c:5258
0xb0f84a execute_function_todo
../../gcc-source-trunk/gcc/passes.c:1965
0xb10285 execute_todo
../../gcc-source-trunk/gcc/passes.c:2015
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, c, e, f;
char d;
short g, h;
char fn1(int p1) {
for (;;) {
h = p1 << 2;
int i = h;
g = i > 32767 >> 13 ? i : i << 3;
f = a ?: c;
if (e)
return d;
}
}
static int fn2() { fn1(0 || b); }
int main() { fn2(); return 0; }
More information about the Gcc-bugs
mailing list