https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78721
Bug ID: 78721 Summary: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu: in set_value_range, at tree-vrp.c:371 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: --- $ 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 20161206 (experimental) [trunk revision 243299] (GCC) $ $ gcc-trunk -Os small.c $ gcc-6.2 -O2 small.c $ $ gcc-trunk -O2 small.c small.c:20:1: internal compiler error: in set_value_range, at tree-vrp.c:371 } ^ 0xe97c9f set_value_range ../../gcc-source-trunk/gcc/tree-vrp.c:370 0xe99357 vrp_meet_1 ../../gcc-source-trunk/gcc/tree-vrp.c:8711 0xe99357 vrp_meet(value_range*, value_range const*) ../../gcc-source-trunk/gcc/tree-vrp.c:8788 0x135f6f5 ipcp_vr_lattice::meet_with_1(value_range const*) ../../gcc-source-trunk/gcc/ipa-cp.c:909 0x136540f ipcp_vr_lattice::meet_with(value_range const*) ../../gcc-source-trunk/gcc/ipa-cp.c:891 0x136540f propagate_vr_accross_jump_function ../../gcc-source-trunk/gcc/ipa-cp.c:1905 0x136540f propagate_constants_accross_call ../../gcc-source-trunk/gcc/ipa-cp.c:2268 0x1366e28 propagate_constants_topo ../../gcc-source-trunk/gcc/ipa-cp.c:3162 0x1366e28 ipcp_propagate_stage ../../gcc-source-trunk/gcc/ipa-cp.c:3272 0x1369496 ipcp_driver ../../gcc-source-trunk/gcc/ipa-cp.c:5002 0x1369496 execute ../../gcc-source-trunk/gcc/ipa-cp.c:5096 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. $ ---------------------------------------- int a, b, c; int fn1 (char e, char f) { return !f || (e && f == 1); } void fn2 (char e) { while (b) e = 0; a = 128; c = fn1 (e, a == e); } int main () { fn2 (0); return 0; }