Patchwork Fix PR 49026 (-mfpmath= attribute bug)

login
register
mail settings
Submitter Joseph S. Myers
Date May 18, 2011, 1:11 a.m.
Message ID <Pine.LNX.4.64.1105180110450.14198@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/96113/
State New
Headers show

Comments

Joseph S. Myers - May 18, 2011, 1:11 a.m.
PR 49026 identified testsuite regressions when mfpmath= is set by
target attributes, that for some reason appear on x86_64-darwin but
not x86_64-linux.

This patch fixes one place where I failed to preserve the logic of
this attribute handling, and restores the code generated for the
testcase to the code attached to that PR as being generated before my
previous patch.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Applied
to mainline.

2011-05-17  Joseph Myers  <joseph@codesourcery.com>

	* config/i386/i386.c (ix86_valid_target_attribute_tree): Use
	enum_opts_set when testing if attributes have set -mfpmath=.

Patch

Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 173809)
+++ gcc/config/i386/i386.c	(working copy)
@@ -4692,7 +4692,7 @@  ix86_valid_target_attribute_tree (tree a
       || target_flags != def->x_target_flags
       || option_strings[IX86_FUNCTION_SPECIFIC_ARCH]
       || option_strings[IX86_FUNCTION_SPECIFIC_TUNE]
-      || ix86_fpmath != def->x_ix86_fpmath)
+      || enum_opts_set.x_ix86_fpmath)
     {
       /* If we are using the default tune= or arch=, undo the string assigned,
 	 and use the default.  */