This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/39035] if( 0.0DF ) is considered true
- From: "janis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2009 20:48:08 -0000
- Subject: [Bug c/39035] if( 0.0DF ) is considered true
- References: <bug-39035-17245@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from janis at gcc dot gnu dot org 2009-01-30 20:48 -------
Created an attachment (id=17215)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17215&action=view)
expanded testcase
I expanded the testcase to test both constant folding and runtime calculations
for all three decimal float types.
The problem occurs with 4.3.3 and mainline.
Test results for trunk and 4.3 for powerpc64-linux and x86-linux (bid and dpd):
elm3b187% uname -m
ppc64
elm3b187% /opt/gcc-nightly/trunk/bin/gcc -DDBG -O2 -std=gnu99 39035.c &&
./a.out
line 49: 0.0DF should be zero
line 56: 0.0DD should be zero
line 63: 0.0DL should be zero
Aborted
elm3b187% /opt/gcc-nightly/4.3/bin/gcc -DDBG -O2 -std=gnu99 39035.c && ./a.out
line 49: 0.0DF should be zero
line 56: 0.0DD should be zero
line 63: 0.0DL should be zero
Aborted
laptop% uname -m
i686
laptop% /home/janis/tools/gcc-trunk-bid/bin/gcc -DDBG -O2 -std=gnu99 39035.c &&
./a.out
line 49: 0.0DF should be zero
line 56: 0.0DD should be zero
line 63: 0.0DL should be zero
Aborted (core dumped)
laptop% /home/janis/tools/gcc-trunk-dpd/bin/gcc -DDBG -O2 -std=gnu99 39035.c &&
./a.out
line 49: 0.0DF should be zero
line 56: 0.0DD should be zero
line 63: 0.0DL should be zero
Aborted (core dumped)
laptop% /home/janis/tools/gcc-4.3.3-bid/bin/gcc -DDBG -O2 -std=gnu99 39035.c &&
./a.out
line 49: 0.0DF should be zero
line 56: 0.0DD should be zero
line 63: 0.0DL should be zero
Aborted (core dumped)
laptop% /home/janis/tools/gcc-4.3.3-dpd/bin/gcc -DDBG -O2 -std=gnu99 39035.c &&
./a.out
line 49: 0.0DF should be zero
line 56: 0.0DD should be zero
line 63: 0.0DL should be zero
Aborted (core dumped)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39035