public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/31907] New: isnan builtin doesn't work
@ 2007-05-12 13:45 akr at m17n dot org
2007-11-23 7:53 ` [Bug target/31907] " akr at m17n dot org
0 siblings, 1 reply; 2+ messages in thread
From: akr at m17n dot org @ 2007-05-12 13:45 UTC (permalink / raw)
To: gcc-bugs
isnan(0.0/0.0) returns false.
It returns true if -fno-builtin.
KUROBOX-PRO(22:33:53)% cat tst.c
extern void abort(void);
extern int isnan(double v);
int main()
{
if (!isnan(0.0/0.0))
abort();
return 0;
}
KUROBOX-PRO(22:34:02)% ~/src/gcc/bin/gcc -v tst.c
Using built-in specs.
Target: armv5tejl-unknown-linux-gnu
Configured with: ../gcc-4.1.2/configure --prefix=/home/akr/src/gcc
--enable-languages=c
Thread model: posix
gcc version 4.1.2
/home/akr/src/gcc/libexec/gcc/armv5tejl-unknown-linux-gnu/4.1.2/cc1 -quiet -v
tst.c -quiet -dumpbase tst.c -auxbase tst -version -o /tmp/ccBo6vhT.s
ignoring nonexistent directory
"/home/akr/src/gcc/lib/gcc/armv5tejl-unknown-linux-gnu/4.1.2/../../../../armv5tejl-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/home/akr/src/gcc/include
/home/akr/src/gcc/lib/gcc/armv5tejl-unknown-linux-gnu/4.1.2/include
/usr/include
End of search list.
GNU C version 4.1.2 (armv5tejl-unknown-linux-gnu)
compiled by GNU C version 4.1.2.
GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15791
Compiler executable checksum: 332d6ae8f800e7865f327fc747ec5bd6
as -o /tmp/cc8FEJCO.o /tmp/ccBo6vhT.s
/home/akr/src/gcc/libexec/gcc/armv5tejl-unknown-linux-gnu/4.1.2/collect2
--eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -X -m armelf_linux -p
/usr/lib/crt1.o /usr/lib/crti.o
/home/akr/src/gcc/lib/gcc/armv5tejl-unknown-linux-gnu/4.1.2/crtbegin.o
-L/home/akr/src/gcc/lib/gcc/armv5tejl-unknown-linux-gnu/4.1.2
-L/home/akr/src/gcc/lib/gcc/armv5tejl-unknown-linux-gnu/4.1.2/../../..
/tmp/cc8FEJCO.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed
/home/akr/src/gcc/lib/gcc/armv5tejl-unknown-linux-gnu/4.1.2/crtend.o
/usr/lib/crtn.o
KUROBOX-PRO(22:34:09)% ./a.out
zsh: abort ./a.out
It doesn't abort if -fno-builtin is used.
KUROBOX-PRO(22:34:18)% ~/src/gcc/bin/gcc -fno-builtin tst.c
KUROBOX-PRO(22:34:22)% ./a.out
--
Summary: isnan builtin doesn't work
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
GCC build triplet: armv5tejl-unknown-linux-gnu
GCC host triplet: armv5tejl-unknown-linux-gnu
GCC target triplet: armv5tejl-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31907
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/31907] isnan builtin doesn't work
2007-05-12 13:45 [Bug c/31907] New: isnan builtin doesn't work akr at m17n dot org
@ 2007-11-23 7:53 ` akr at m17n dot org
0 siblings, 0 replies; 2+ messages in thread
From: akr at m17n dot org @ 2007-11-23 7:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from akr at m17n dot org 2007-11-23 07:52 -------
(In reply to comment #0)
> isnan(0.0/0.0) returns false.
> It returns true if -fno-builtin.
I found it is a problem of FPU emulation in Linux kernel.
The problem is caused by FASTFPE.
NWFPE doesn't have the problem.
--
akr at m17n dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31907
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-23 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-12 13:45 [Bug c/31907] New: isnan builtin doesn't work akr at m17n dot org
2007-11-23 7:53 ` [Bug target/31907] " akr at m17n dot org
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).