public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/64364] New: gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell
@ 2014-12-19 18:39 dhazeghi at yahoo dot com
  2014-12-19 18:40 ` [Bug target/64364] " dhazeghi at yahoo dot com
  2014-12-20 11:46 ` mikpelinux at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: dhazeghi at yahoo dot com @ 2014-12-19 18:39 UTC (permalink / raw)
  To: gcc-bugs

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)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/64364] gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell
  2014-12-19 18:39 [Bug target/64364] New: gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell dhazeghi at yahoo dot com
@ 2014-12-19 18:40 ` dhazeghi at yahoo dot com
  2014-12-20 11:46 ` mikpelinux at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: dhazeghi at yahoo dot com @ 2014-12-19 18:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64364

--- Comment #1 from Dara Hazeghi <dhazeghi at yahoo dot com> ---
Appears to be the same issue as bug 59463


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/64364] gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell
  2014-12-19 18:39 [Bug target/64364] New: gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell dhazeghi at yahoo dot com
  2014-12-19 18:40 ` [Bug target/64364] " dhazeghi at yahoo dot com
@ 2014-12-20 11:46 ` mikpelinux at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: mikpelinux at gmail dot com @ 2014-12-20 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64364

--- Comment #2 from Mikael Pettersson <mikpelinux at gmail dot com> ---
Re-run g++ on the testcase with the -v flag, note the command line for cc1plus,
run cc1plus from gdb with that command line, and show us the faulting
instruction and what code/function it occurs in.

You didn't use --with-arch=native, which is good, but I suspect that your gmp
etc may have been built with Haswell-specific code.  For this use case, you
need to explicitly control how the support libraries are built (i.e. choose a
compatible --build triplet).


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-20 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-19 18:39 [Bug target/64364] New: gcc ICE on min() on Intel Sandy Bridge CPU if compiler built on Haswell dhazeghi at yahoo dot com
2014-12-19 18:40 ` [Bug target/64364] " dhazeghi at yahoo dot com
2014-12-20 11:46 ` mikpelinux at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).