Created attachment 31413 [details] Source file that causes the error. Upon making a c++ program using libitm, I get the following error: In file included from /proj/spear0/sw/include/c++/4.9.0/chrono:40:0, from /proj/spear0/sw/include/c++/4.9.0/thread:38, from bmharness.cpp:6: /proj/spear0/sw/include/c++/4.9.0/limits:1558:7: internal compiler error: Illegal instruction min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; } ^ 0xb43c9f crash_signal /proj/spear1/admin/src/gcc_trunk/gcc/toplev.c:336
Bug appears to be triggered by the following simpler testcase: 1 - Put the following line in an empty file: #include <thread> 2 - Compile g++ foo.cc -std=c++11 Bug is appearing for following build from trunk (trunk is a few days old): g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/proj/spear0/sw/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /proj/spear1/admin/src/gcc_trunk/configure --prefix=/proj/spear0/sw --with-gmp=/proj/spear0/sw --with-mpc=/proj/spear0/sw --with-mpfr=/proj/spear0/sw --enable-languages=c,c++,lto --enable-lto --enable-multilib Thread model: posix gcc version 4.9.0 20131204 (experimental) (GCC) I'll update trunk and check if the bug remains.
Bug no longer present in trunk version 205880.
Closing then.
I saw two other similar problems on the web. https://bugs.archlinux.org/task/46562 suggests it might be a microcode problem. http://permalink.gmane.org/gmane.linux.lfs.support/40714 suggests it can be caused (repeatably) by the compiler's gmp being built for a different machine. I just ran into this myself on six jobs in a parallel build on a big xeon vmware box. It's reproduced in two out of two full runs, but if I just rerun "make -j8", the build completes correctly, so it may have to do with cpu load. The simplified test case in #2 also doesn't seem to reproduce it. // Thread model: posix // gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) The error varies; sometimes it's // /usr/include/c++/5/limits:1598:7: internal compiler error: Illegal instruction // min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; } and sometimes it's // /home/buildbot/src/yovo/libLoam/c++/Quat.h:440:3: internal compiler error: Illegal instruction // Quat Pow (float64 t, float64 thresh = 0.9999) const // ^ So in my case it doesn't sound like a gcc problem. Posting here for completeness only.
Turns out in my case it was caused by duplicate entries in LD_LIBRARY_PATH. Go figure.