Bug 59900 - isnan signals FPE invalid operation when given a NaN
Summary: isnan signals FPE invalid operation when given a NaN
Status: RESOLVED DUPLICATE of bug 66462
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.6
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 21:56 UTC by Cameron MacMinn
Modified: 2024-01-04 18:58 UTC (History)
2 users (show)

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


Attachments
preprocessed file 1st (5.47 KB, text/plain)
2014-01-21 21:56 UTC, Cameron MacMinn
Details
preprocessed file 2nd (74.70 KB, text/plain)
2014-01-21 21:58 UTC, Cameron MacMinn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron MacMinn 2014-01-21 21:56:17 UTC
Created attachment 31912 [details]
preprocessed file 1st

Possible g++ problem.  isnan signals
  FPE invalid operation when given a NaN.

  (Ditto isnanf.  I found that using g++ 4.1.2, where isnan
   works but isnanf signals FPE invalid operation, not shown.)

  If not g++ problem, any advice on which other .org
  to report problem to would be much appreciated, 'the
  assembler, the linker or the C library', etc.  Thanks.

  Command line
  % ( g++ -v -c -g -m64 -Wall -fpic -save-temps -o check4nan.o check4nan.cc ;
      g++ -m64 -shared check4nan.o -o libnan.so ;
      g++ -c -g -m64 -Wall -fpic -save-temps -o nan.o nan.cc ;
      g++ -m64 -L. -lnan -o nan nan.o ;
      setenv LD_LIBRARY_PATH .:${LD_LIBRARY_PATH} ;
      ./nan )
  says:

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-c' '-g' '-m64' '-Wall' '-fpic' '-save-temps' '-o'
'check4nan.o' '-shared-libgcc' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.4.6/cc1plus -E -quiet -v -D_GNU_SOURCE
check4nan.cc -m64 -mtune=generic -Wall -fpic -g -fworking-directory
-fpch-preprocess -o check4nan.ii
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include-fixed"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_64-red
hat-linux
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backward
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/include
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-c' '-g' '-m64' '-Wall' '-fpic' '-save-temps' '-o'
'check4nan.o' '-shared-libgcc' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.4.6/cc1plus -fpreprocessed
check4nan.ii -quiet -dumpbase check4nan.cc -m64 -mtune=generic -auxbase-strip
check4nan.o -g -Wall -version -fpic -o check4nan.s
GNU C++ (GCC) version 4.4.6 20110731 (Red Hat 4.4.6-3) (x86_64-redhat-linux)
        compiled by GNU C version 4.4.6 20110731 (Red Hat 4.4.6-3), GMP
version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 42c2a139506c57f2f1525b40cf548e53
COLLECT_GCC_OPTIONS='-v' '-c' '-g' '-m64' '-Wall' '-fpic' '-save-temps' '-o'
'check4nan.o' '-shared-libgcc' '-mtune=generic'
 as -V -Qy --64 -o check4nan.o check4nan.s
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version
version 2.20.51.0.2-5.28.el6 20091009
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_6
4-redhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-
redhat-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/:/usr/libexec/gcc/x86_64-re
dhat-linux/4.4.6/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redh
at-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-
linux/4.4.6/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/:/lib/../l
ib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../:/lib/:
/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-c' '-g' '-m64' '-Wall' '-fpic' '-save-temps' '-o'
'check4nan.o' '-shared-libgcc' '-mtune=generic'
isnan  !!! signal handler - caught FPE
!!! Floating point invalid operation
Comment 1 Cameron MacMinn 2014-01-21 21:58:06 UTC
Created attachment 31913 [details]
preprocessed file 2nd

needs 2 source files, hence 2 .ii preprocessed files
Comment 2 Andrew Pinski 2016-10-10 04:24:54 UTC
Dup of bug 66462.

*** This bug has been marked as a duplicate of bug 66462 ***