https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64364
Bug ID: 64364 Summary: gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: dhazeghi at yahoo dot com Created attachment 34302 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34302&action=edit failing pre-processed source I have a freshly bootstrapped gcc 4.9.2 that I built on CentOS 5.8 on an Intel Haswell processor (4th gen Core i5). I transferred the build over to an older machine - same OS but running a Sandy Bridge processor (2nd gen Core i5). Compiler crashes compiling 'min()' in limits on the SB machine, but of course compiles fine on the Haswell one. $ cat foo.cc #include <limits> $ g++ -c ~/foo.cc In file included from /auto/home.nas02/dhazeghi/foo.cc:1:0: /usr/local/gcc-4.9/include/c++/4.9.2/limits:1558:7: internal compiler error: Illegal instruction min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; } ^ 0x9918ff crash_signal ../../gcc-4.9.2/gcc/toplev.c:337 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. $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/gcc-4.9/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.9.2/configure --enable-languages=c,c++ --enable-lto --prefix=/usr/local/gcc-4.9 --with-gmp=/usr/local/gcc-4.9 --with-mpfr=/usr/local/gcc-4.9 --with-mpc=/usr/local/gcc-4.9 --with-isl=/usr/local/gcc-4.9 --with-cloog=/usr/local/gcc-4.9 Thread model: posix gcc version 4.9.2 (GCC)