From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5217 invoked by alias); 25 Dec 2004 22:17:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5205 invoked by uid 48); 25 Dec 2004 22:17:37 -0000 Date: Sat, 25 Dec 2004 22:17:00 -0000 Message-ID: <20041225221737.5204.qmail@sourceware.org> From: "Thomas dot Koenig at online dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041221203640.19116.Thomas.Koenig@online.de> References: <20041221203640.19116.Thomas.Koenig@online.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/19116] -fno-finite-math-only does not override -ffast-math X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg03536.txt.bz2 List-Id: ------- 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 #include 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