public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "Thomas dot Koenig at online dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/19116] New: -fno-finite-math-only does not override -ffast-math Date: Tue, 21 Dec 2004 20:36:00 -0000 [thread overview] Message-ID: <20041221203640.19116.Thomas.Koenig@online.de> (raw) $ 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
next reply other threads:[~2004-12-21 20:36 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-12-21 20:36 Thomas dot Koenig at online dot de [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20041221203640.19116.Thomas.Koenig@online.de \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).