Patchwork Fix PR49396

login
register
mail settings
Submitter Richard Guenther
Date Aug. 24, 2011, 11:15 a.m.
Message ID <alpine.LNX.2.00.1108241314240.2130@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/111311/
State New
Headers show

Comments

Richard Guenther - Aug. 24, 2011, 11:15 a.m.
This fixes PR49396, the fix has been lying around in my tree for
some time.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2011-08-24  Richard Guenther  <rguenther@suse.de>

	PR c/49396

	c-family/
	* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.

Patch

Index: gcc/c-family/c-cppbuiltin.c
===================================================================
--- gcc/c-family/c-cppbuiltin.c	(revision 178028)
+++ gcc/c-family/c-cppbuiltin.c	(working copy)
@@ -560,7 +560,7 @@  c_cpp_builtins_optimize_pragma (cpp_read
       cpp_undef (pfile, "__FINITE_MATH_ONLY__");
       cpp_define (pfile, "__FINITE_MATH_ONLY__=1");
     }
-  else if (!prev->x_flag_finite_math_only && cur->x_flag_finite_math_only)
+  else if (prev->x_flag_finite_math_only && !cur->x_flag_finite_math_only)
     {
       cpp_undef (pfile, "__FINITE_MATH_ONLY__");
       cpp_define (pfile, "__FINITE_MATH_ONLY__=0");