diff mbox

[committed] Fix thinko in powerpc target function pragma/attribute

Message ID 20111230234221.GA3130@ibm-tiger.the-meissners.org
State New
Headers show

Commit Message

Michael Meissner Dec. 30, 2011, 11:42 p.m. UTC
In working on something else, I was using the target pragmas I added in late
November, and I noticed that I had a thinko in setting some of the options like
-mfriz that aren't bitmasks.  I committed the patch as obvious:

2011-12-30  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_inner_target_options): Fix thinko
	in setting options via target #pragma or attribute.
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 182746)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -27138,7 +27138,7 @@  rs6000_inner_target_options (tree args, 
 		    if (strcmp (r, rs6000_opt_vars[i].name) == 0)
 		      {
 			size_t j = rs6000_opt_vars[i].global_offset;
-			((int *) &global_options)[j] = !invert;
+			*((int *) ((char *)&global_options + j)) = !invert;
 			error_p = false;
 			break;
 		      }