]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix thinko in setting target options
authorMichael Meissner <meissner@linux.vnet.ibm.com>
Sat, 31 Dec 2011 00:29:44 +0000 (00:29 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Sat, 31 Dec 2011 00:29:44 +0000 (00:29 +0000)
From-SVN: r182752

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 679b0b928c9943eac8694d395a2874bf056f2dca..3352bdfc827083d460dafcbb483ae9660daf8506 100644 (file)
@@ -1,3 +1,11 @@
+2011-12-30  Michael Meissner  <meissner@linux.vnet.ibm.com>
+
+       Backport from the mainline
+       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.
+
 2011-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        Backport from mainline
index c069629327e7c1e4014278120fcfa341a967685f..ae0cc17f573c3ddb93a9c3167b943675049994c3 100644 (file)
@@ -27760,7 +27760,7 @@ rs6000_inner_target_options (tree args, bool attr_p)
                    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;
                      }