[Bug c++/42332] New: Illegal instruction generated while compiling with optimization

pbdr at uea dot ac dot uk gcc-bugzilla@gcc.gnu.org
Tue Dec 8 13:59:00 GMT 2009


While compiling a simple class containing a std::tr1::unordered_map member as a
library, linking to the library and creating an object generate illegal
hardware instruction. Or at least, running the code raise a SIGILL. The library
file is lib.cc and the main program is test_lib.cc. The commands used to
compile the two are:

g++ -W -Wall --fast-math -msse4 -shared -o libl.so lib.cc -fPIC
g++ -W -Wall --fast-math -msse4 -o test_lib test_lib.cc -L. -ll

The bug appears only if both --fast-math and -msse4 are used. The bug already
existed in g++ 4.4.1 (the one with provided by Fedora 11).

Here are the informations about the version of gcc I use:

Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/stow/gcc-4.4.2
Thread model: posix
gcc version 4.4.2 (GCC)


-- 
           Summary: Illegal instruction generated while compiling with
                    optimization
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pbdr at uea dot ac dot uk
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42332



More information about the Gcc-bugs mailing list