public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math
@ 2004-12-21 20:36 Thomas dot Koenig at online dot de
2004-12-21 20:45 ` [Bug middle-end/19116] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 20+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-21 20:36 UTC (permalink / raw)
To: gcc-bugs
$ cat nan-find.f90
program main
real :: a,b,c
logical :: l
b = 0.
c = 0.
a = b/c
call nanfind(a,a,l)
if (l) then
print *,a,"compares equal to itself"
else
print *,a,"compares unequal to itself"
end if
end program main
subroutine nanfind(a,b,l)
real,intent(in) :: a,b
logical, intent(out) :: l
l = a == b
end subroutine nanfind
$ gfortran -O3 -ffast-math -fno-finite-math-only nan-find.f90
$ ./a.out
NaN compares equal to itself
$ gfortran -v
Using built-in specs.
Configured with: ../gcc/configure --prefix=/home/ig25
--enable-languages=c,c++,f95 : (reconfigured) ../gcc/configure
--prefix=/home/ig25 --enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20041221 (experimental)
$
Then again, I never liked the fact that NaNs can compare
equal with any compiler option...
--
Summary: -fno-finite-math-only does not override -ffast-math
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Thomas dot Koenig at online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
@ 2004-12-21 20:45 ` pinskia at gcc dot gnu dot org
2004-12-21 21:03 ` Thomas dot Koenig at online dot de
` (7 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-21 20:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-21 20:45 -------
Hmm, this works for me on the mainline on powerpc-darwin. What target is this?
--
What |Removed |Added
----------------------------------------------------------------------------
Component|driver |middle-end
Summary|-fno-finite-math-only does |-fno-finite-math-only does
|not override -ffast-math |not override -ffast-math
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
2004-12-21 20:45 ` [Bug middle-end/19116] " pinskia at gcc dot gnu dot org
@ 2004-12-21 21:03 ` Thomas dot Koenig at online dot de
2004-12-25 14:32 ` Thomas dot Koenig at online dot de
` (6 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-21 21:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-21 21:02 -------
(In reply to comment #1)
> Hmm, this works for me on the mainline on powerpc-darwin. What target is this?
I was used to gfortran -v telling me that... i686-pc-linux-gnu.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
2004-12-21 20:45 ` [Bug middle-end/19116] " pinskia at gcc dot gnu dot org
2004-12-21 21:03 ` Thomas dot Koenig at online dot de
@ 2004-12-25 14:32 ` Thomas dot Koenig at online dot de
2004-12-25 22:17 ` Thomas dot Koenig at online dot de
` (5 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-25 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-25 14:32 -------
I find strange that the C equivalent does not
compare an NaN equal to itself, even with
-O3 -ffast-math :
$ cat nan-check.c
#include <stdio.h>
#include <math.h>
int equality(double a, double b);
int main()
{
double a, b, c;
a = 0.0;
b = 0.0;
c = a/b;
if (equality(c,c)) {
printf("%f compares equal to itself\n",c);
}
else {
printf("%f compares unequal to itself\n",c);
}
return 0;
}
int equality(double a, double b)
{
return a==b;
}
$ gcc -O3 -ffast-math nan-check.c
$ ./a.out
nan compares unequal to itself
$ gcc -v
Using built-in specs.
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20041224 (experimental)
... with i686-pc-linux-gnu.
Maybe the Fortran frontend does something different with FP
comparisons.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
` (2 preceding siblings ...)
2004-12-25 14:32 ` Thomas dot Koenig at online dot de
@ 2004-12-25 22:17 ` Thomas dot Koenig at online dot de
2004-12-25 22:29 ` [Bug target/19116] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-25 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-25 22:17 -------
It is actually possible to reproduce the
Fortran behavior in C:
$ cat nan-check2.c
#include <stdio.h>
#include <math.h>
int equality(double *a, double *b);
int main()
{
double a, b, c;
a = 0.0;
b = 0.0;
c = a/b;
if (equality(&c,&c)) {
printf("%f compares equal to itself\n",c);
}
else {
printf("%f compares unequal to itself\n",c);
}
return 0;
}
int equality(double *a, double *b)
{
return *a==*b;
}
$ gcc nan-check2.c
$ ./a.out
nan compares unequal to itself
$ gcc -ffast-math nan-check2.c
$ ./a.out
nan compares equal to itself
$ gcc -ffast-math -fno-finite-math-only nan-check2.c
$ ./a.out
nan compares equal to itself
$ gcc -v
Using built-in specs.
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95
Thread model: posix
gcc version 4.0.0 20041224 (experimental)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
` (3 preceding siblings ...)
2004-12-25 22:17 ` Thomas dot Koenig at online dot de
@ 2004-12-25 22:29 ` pinskia at gcc dot gnu dot org
2004-12-27 0:41 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-25 22:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-25 22:29 -------
Hmm, again this works for me on powerpc-darwin.
This is a target bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |target
Ever Confirmed| |1
GCC target triplet| |i686-pc-linux-gnu
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2004-12-25 22:29:49
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
` (4 preceding siblings ...)
2004-12-25 22:29 ` [Bug target/19116] " pinskia at gcc dot gnu dot org
@ 2004-12-27 0:41 ` pinskia at gcc dot gnu dot org
2004-12-27 10:26 ` Thomas dot Koenig at online dot de
` (2 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-27 0:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-27 00:41 -------
Can you try just -funsafe-math-optimizations and see what happens I think you will get the same
results as "-ffast-math -fno-finite-math-only" as I think an instruction in the .md file checks the wrong
flag.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -fno-finite-math-only does not override -ffast-math
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
` (5 preceding siblings ...)
2004-12-27 0:41 ` pinskia at gcc dot gnu dot org
@ 2004-12-27 10:26 ` Thomas dot Koenig at online dot de
2004-12-27 14:00 ` [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that) pinskia at gcc dot gnu dot org
2005-01-17 13:42 ` hunor at cs dot bme dot hu
8 siblings, 0 replies; 20+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-27 10:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-27 10:26 -------
(In reply to comment #6)
> Can you try just -funsafe-math-optimizations and see what happens I think you
will get the same
> results as "-ffast-math -fno-finite-math-only" as I think an instruction in
the .md file checks the wrong
> flag.
$ gcc -funsafe-math-optimizations nan-check2.c
$ ./a.out
nan compares equal to itself
$ gcc -S -funsafe-math-optimizations nan-check2.c
$ cat nan-check2.s
.file "nan-check2.c"
.section .rodata
.LC1:
.string "%f compares equal to itself\n"
.align 4
.LC2:
.string "%f compares unequal to itself\n"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $56, %esp
andl $-16, %esp
movl $0, %eax
addl $15, %eax
addl $15, %eax
shrl $4, %eax
sall $4, %eax
subl %eax, %esp
fldz
fstpl -16(%ebp)
fldz
fstpl -8(%ebp)
fldl -16(%ebp)
fdivl -8(%ebp)
fstpl -24(%ebp)
leal -24(%ebp), %eax
movl %eax, 4(%esp)
leal -24(%ebp), %eax
movl %eax, (%esp)
call equality
testl %eax, %eax
je .L2
fldl -24(%ebp)
fstpl 4(%esp)
movl $.LC1, (%esp)
call printf
jmp .L4
.L2:
fldl -24(%ebp)
fstpl 4(%esp)
movl $.LC2, (%esp)
call printf
.L4:
movl $0, %eax
leave
ret
.size main, .-main
.globl equality
.type equality, @function
equality:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
fldl (%eax)
movl 12(%ebp), %eax
fldl (%eax)
fcompp
fnstsw %ax
sahf
sete %al
movzbl %al, %eax
popl %ebp
ret
.size equality, .-equality
.ident "GCC: (GNU) 4.0.0 20041224 (experimental)"
.section .note.GNU-stack,"",@progbits
$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
` (6 preceding siblings ...)
2004-12-27 10:26 ` Thomas dot Koenig at online dot de
@ 2004-12-27 14:00 ` pinskia at gcc dot gnu dot org
2005-01-17 13:42 ` hunor at cs dot bme dot hu
8 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-27 14:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-27 14:00 -------
Yep, I was right, thanks for testing.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|-fno-finite-math-only does |-funsafe-math-optimizations
|not override -ffast-math |make nan compares equal to
| |one another (-finite-math-
| |only should be doing that)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
` (7 preceding siblings ...)
2004-12-27 14:00 ` [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that) pinskia at gcc dot gnu dot org
@ 2005-01-17 13:42 ` hunor at cs dot bme dot hu
8 siblings, 0 replies; 20+ messages in thread
From: hunor at cs dot bme dot hu @ 2005-01-17 13:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hunor at cs dot bme dot hu 2005-01-17 13:42 -------
Are you sure this is wrong? It seems to me that the RS6000 port has just been
changed to behave liked this two days ago.
If you still think this is a bug, though... This is caused by -mno-ieee-fp
being implied by -funsafe-math-optimizations on i386:
/* If we're doing fast math, we don't care about comparison order
wrt NaNs. This lets us use a shorter comparison sequence. */
if (flag_unsafe_math_optimizations)
target_flags &= ~MASK_IEEE_FP;
If I interpret the documentation correctly, NaN == NaN may happen if either
-mno-ieee-fp or -ffinite-math-only is given (-ffinite-math-only should not
imply -mno-ieee-fp either as that changes the behavior of square root
calculations too). I can send you my patch if you reach the conclusion that
this is a bug.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |hunor at cs dot bme dot hu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-11-06 9:33 ` rguenth at gcc dot gnu dot org
@ 2006-11-06 9:34 ` rguenth at gcc dot gnu dot org
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-11-06 9:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from rguenth at gcc dot gnu dot org 2006-11-06 09:34 -------
Fixed for 4.2.0. The RM decided it's not worth the change in behavior during
the 4.1/4.0 series (I agree).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
Target Milestone|4.3.0 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-11-04 16:32 ` rguenth at gcc dot gnu dot org
@ 2006-11-06 9:33 ` rguenth at gcc dot gnu dot org
2006-11-06 9:34 ` rguenth at gcc dot gnu dot org
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-11-06 9:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from rguenth at gcc dot gnu dot org 2006-11-06 09:33 -------
Subject: Bug 19116
Author: rguenth
Date: Mon Nov 6 09:33:16 2006
New Revision: 118517
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118517
Log:
2006-11-06 Richard Guenther <rguenther@suse.de>
Backport from mainline:
2006-10-21 Richard Guenther <rguenther@suse.de>
PR target/19116
* config/i386/i386.c (override_options): Do not set MASK_IEEE_FP
if flag_unsafe_math_optimizations is specified. We have
flag_finite_math_only for that.
* config/i386/i386.md (sqrtxf2): Do not require TARGET_IEEE_FP
or flag_unsafe_math_optimizations.
PR middle-end/28796
* simplify-rtx.c (simplify_const_relational_operation):
Do not constant-fold ORDERED and UNORDERED for
flag_unsafe_math_optimizations but only we do not need to
honor NaNs for the given mode.
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/config/i386/i386.c
branches/gcc-4_2-branch/gcc/config/i386/i386.md
branches/gcc-4_2-branch/gcc/simplify-rtx.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-11-04 16:27 ` james dot me at gmail dot com
@ 2006-11-04 16:32 ` rguenth at gcc dot gnu dot org
2006-11-06 9:33 ` rguenth at gcc dot gnu dot org
2006-11-06 9:34 ` rguenth at gcc dot gnu dot org
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-11-04 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from rguenth at gcc dot gnu dot org 2006-11-04 16:32 -------
There is another one in simplify-rtx.c:
Author: rguenth
Date: Sat Oct 21 10:13:13 2006
New Revision: 117928
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117928
Log:
2006-10-21 Richard Guenther <rguenther@suse.de>
PR middle-end/28796
* simplify-rtx.c (simplify_const_relational_operation):
Do not constant-fold ORDERED and UNORDERED for
flag_unsafe_math_optimizations but only we do not need to
honor NaNs for the given mode.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/simplify-rtx.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-11-04 13:30 ` rguenth at gcc dot gnu dot org
@ 2006-11-04 16:27 ` james dot me at gmail dot com
2006-11-04 16:32 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: james dot me at gmail dot com @ 2006-11-04 16:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from james dot me at gmail dot com 2006-11-04 16:26 -------
I applied Richard Guenther's patch to my own 4.2 svn branch to get this fixed
locally, but the change had no effect. I am a little puzzled by this, because
what I can discern from the discussion and comments the change:
/* If we're doing fast math, we don't care about comparison order
wrt NaNs. This lets us use a shorter comparison sequence. */
- if (flag_unsafe_math_optimizations)
+ if (flag_finite_math_only)
target_flags &= ~MASK_IEEE_FP;
is a definitive fix.
What else is going on here?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-11-04 10:54 ` ubizjak at gmail dot com
@ 2006-11-04 13:30 ` rguenth at gcc dot gnu dot org
2006-11-04 16:27 ` james dot me at gmail dot com
` (3 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-11-04 13:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2006-11-04 13:30 -------
But it's not a regression.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-11-03 22:35 ` pinskia at gcc dot gnu dot org
@ 2006-11-04 10:54 ` ubizjak at gmail dot com
2006-11-04 13:30 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: ubizjak at gmail dot com @ 2006-11-04 10:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from ubizjak at gmail dot com 2006-11-04 10:53 -------
According to PR 29705 (testcase is included in the PR) this is a wrong code bug
on 4.2 (and possibly others) branch.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
Status|RESOLVED |REOPENED
Known to fail| |4.0.0 4.1.0 4.2.0
Known to work| |4.3.0
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-10-21 10:42 ` rguenth at gcc dot gnu dot org
@ 2006-11-03 22:35 ` pinskia at gcc dot gnu dot org
2006-11-04 10:54 ` ubizjak at gmail dot com
` (5 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-03 22:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2006-11-03 22:35 -------
*** Bug 29705 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |james dot me at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
2006-08-25 9:01 ` rguenth at gcc dot gnu dot org
2006-10-21 10:41 ` rguenth at gcc dot gnu dot org
@ 2006-10-21 10:42 ` rguenth at gcc dot gnu dot org
2006-11-03 22:35 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-21 10:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-10-21 10:42 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
2006-08-25 9:01 ` rguenth at gcc dot gnu dot org
@ 2006-10-21 10:41 ` rguenth at gcc dot gnu dot org
2006-10-21 10:42 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-21 10:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2006-10-21 10:41 -------
Subject: Bug 19116
Author: rguenth
Date: Sat Oct 21 10:40:57 2006
New Revision: 117930
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117930
Log:
2006-10-21 Richard Guenther <rguenther@suse.de>
PR target/19116
* config/i386/i386.c (override_options): Do not set MASK_IEEE_FP
if flag_unsafe_math_optimizations is specified. We have
flag_finite_math_only for that.
* config/i386/i386.md (sqrtxf2): Do not require TARGET_IEEE_FP
or flag_unsafe_math_optimizations.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.md
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that)
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
@ 2006-08-25 9:01 ` rguenth at gcc dot gnu dot org
2006-10-21 10:41 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-08-25 9:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2006-08-25 09:01 -------
Mine. This "regression" was introduced at the time we got rid of
flag_fast_math and changed it to either flag_unsafe_math_optimizations or
flag_trapping_math.
+2001-03-07 Brad Lucier <lucier@math.purdue.edu>
+
+ * builtins.c (expand_builtin_mathfn): Check
+ flag_unsafe_math_optimizations, not flag_fast_math.
+ (expand_builtin): Likewise
+ * combine.c (combine_simplify_rtx): Likewise.
+ (simplify_if_then_else): Likewise.
+ * cse.c (fold_rtx): Likewise.
+ * flags.h: Remove flag_fast_math. Add
+ flag_unsafe_math_optimizations and flag_trapping_math.
+ * fold-const.c (negate_expr): Check
+ flag_unsafe_math_optimizations, not flag_fast_math.
+ (invert_truthvalue): Likewise.
+ (fold): Likewise. Before associating operands, check that
+ code == MULT_EXPR, not code != MULT_EXPR.
+ * ifcvt.c (noce_try_minmax): Check
+ flag_unsafe_math_optimizations, not flag_fast_math.
+ (noce_operand_ok): Check flag_trapping_math, not flag_fast_math.
+ * invoke.texi: Document -funsafe-math-optimizations and
+ -fno-trapping-math. Change documentation for -ffast-math.
+ * jump.c (reversed_comparison_code_parts): Likewise.
+ (rtx_equal_for_thread_p): Likewise.
+ * optabs.c (emit_conditional_move): Likewise.
+ * simplify-rtx.c (simplify_binary_operation): Likewise.
+ (simplify_relational_operation): Likewise.
+ (simplify_ternary_operation): Likewise.
+ * toplev.c: Remove flag_fast_math. Add flag_trapping_math and
+ flag_unsafe_math_optimizations. Remove fast-math entry from f_options.
+ Add trapping-math and unsafe-math-optimizations entries to f_options.
+ (set_fast_math_flags): New, sets flags for -ffast-math.
+ (set_no_fast_math_flags): New, sets flags for -fno-fast-math.
+ (decode_f_option): Add code to handle -ffast-math and -fno-fast-math.
+ * toplev.h: Declare set_fast_math_flags and set_no_fast_math_flags.
+
+ * config/alpha/alpha.c (alpha_emit_conditional_branch): Likewise.
+ (alpha_emit_conditional_move): Initialize local_fast_math to
+ flag_unsafe_math_optimizations, not flat_fast_math.
+ * config/c4x/c4x.c (c4x_override_options): Call set_fast_math_flags
+ instead of setting flag_fast_math to 1.
+ * config/convex/convex.md: Check flag_unsafe_math_optimizations,
+ not flag_fast_math.
+ * config/i386/i386.c (override_options): Likewise
+ * config/i386/i386.md: Likewise.
+ * config/m68k/m68k.md: Likewise.
+ * config/mips/mips.md: Likewise.
+ * config/rs6000/rs6000.c (validate_condition_mode): Likewise.
+ (rs6000_generate_compare): Likewise.
Later flag_finite_math_only was introduced but not all other places fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-24 16:53:42 |2006-08-25 09:01:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19116
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2006-11-06 9:34 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-21 20:36 [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Thomas dot Koenig at online dot de
2004-12-21 20:45 ` [Bug middle-end/19116] " pinskia at gcc dot gnu dot org
2004-12-21 21:03 ` Thomas dot Koenig at online dot de
2004-12-25 14:32 ` Thomas dot Koenig at online dot de
2004-12-25 22:17 ` Thomas dot Koenig at online dot de
2004-12-25 22:29 ` [Bug target/19116] " pinskia at gcc dot gnu dot org
2004-12-27 0:41 ` pinskia at gcc dot gnu dot org
2004-12-27 10:26 ` Thomas dot Koenig at online dot de
2004-12-27 14:00 ` [Bug target/19116] -funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that) pinskia at gcc dot gnu dot org
2005-01-17 13:42 ` hunor at cs dot bme dot hu
[not found] <bug-19116-9515@http.gcc.gnu.org/bugzilla/>
2006-08-25 9:01 ` rguenth at gcc dot gnu dot org
2006-10-21 10:41 ` rguenth at gcc dot gnu dot org
2006-10-21 10:42 ` rguenth at gcc dot gnu dot org
2006-11-03 22:35 ` pinskia at gcc dot gnu dot org
2006-11-04 10:54 ` ubizjak at gmail dot com
2006-11-04 13:30 ` rguenth at gcc dot gnu dot org
2006-11-04 16:27 ` james dot me at gmail dot com
2006-11-04 16:32 ` rguenth at gcc dot gnu dot org
2006-11-06 9:33 ` rguenth at gcc dot gnu dot org
2006-11-06 9:34 ` rguenth at gcc dot gnu 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).