Bug 59463 - Illegal Instruction: min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
Summary: Illegal Instruction: min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 23:45 UTC by walkerboh1213
Modified: 2016-02-21 18:02 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Source file that causes the error. (1.78 KB, text/plain)
2013-12-10 23:45 UTC, walkerboh1213
Details

Note You need to log in before you can comment on or make changes to this bug.
Description walkerboh1213 2013-12-10 23:45:59 UTC
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
Comment 1 Mike Spear 2013-12-11 03:32:58 UTC
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.
Comment 2 Mike Spear 2013-12-11 15:07:07 UTC
Bug no longer present in trunk version 205880.
Comment 3 Paolo Carlini 2014-01-24 11:14:15 UTC
Closing then.
Comment 4 dank 2016-01-20 18:08:54 UTC
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.
Comment 5 dank 2016-02-21 18:02:12 UTC
Turns out in my case it was caused by duplicate entries in
LD_LIBRARY_PATH.  Go figure.