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
[parent not found: <bug-19116-9515@http.gcc.gnu.org/bugzilla/>]

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).