https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78072
Bug ID: 78072
Summary: ICE on valid code at -O3 on x86_64-linux-gnu:
verify_gimple failed
Product: gcc
Version: unknown
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: ---
This is a regression from 6.2.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/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 20161020 (experimental) [trunk revision 241384] (GCC)
$
$ gcc-trunk -O2 -c small.c
$ gcc-6.2 -O3 -c small.c
$
$ gcc-trunk -O3 -c small.c
small.c: In function ‘fn1’:
small.c:4:6: error: type mismatch in binary expression
void fn1 ()
^~~
short int
short int
int
_56 = _55 - c_lsm.10_20;
small.c:4:6: internal compiler error: verify_gimple failed
0xc34e8f verify_gimple_in_cfg(function*, bool)
../../gcc-source-trunk/gcc/tree-cfg.c:5208
0xb15262 execute_function_todo
../../gcc-source-trunk/gcc/passes.c:1965
0xb15c19 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.
$
-----------------------------
short a, b;
int c, d;
void fn1 ()
{
for (; b < 1; b++)
a = (c++ > 0) && d;
}