https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65735
Bug ID: 65735 Summary: [5 Regression] ICE (in duplicate_thread_path, at tree-ssa-threadupdate.c) on arm-linux-gnueabihf Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org Created attachment 35290 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35290&action=edit preprocessed source seen with r221867 on arm-linux-gnueabihf $ g++ -c -g -O2 menu.ii menu.ii: In function 'void fn2()': menu.ii:2:6: internal compiler error: in duplicate_thread_path, at tree-ssa-threadupdate.c:2445 void fn2() { ^ 0x7c2d8f duplicate_thread_path ../../src/gcc/tree-ssa-threadupdate.c:2444 0x7c2d8f thread_through_all_blocks(bool) ../../src/gcc/tree-ssa-threadupdate.c:2594 0x74020d execute ../../src/gcc/tree-ssa-dom.c:938 Please submit a full bug report, with preprocessed source if appropriate. $ cat menu.ii int fn1(); void fn2() { int a, b, c; while (!a) { c = fn1(); if (c == 7) c = b; switch (c) { case 1: a = b++; if (b) b = 1; } } } $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/5/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5-20150404-0ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=c++98 --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=yes --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 5.0.0 20150404 (experimental) [trunk revision 221867] (Ubuntu 5-20150404-0ubuntu11)