]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/81861 (ASan pr64820.c testcase segfaults with LTO and -fstack...
authorUros Bizjak <ubizjak@gmail.com>
Thu, 17 Aug 2017 19:39:20 +0000 (21:39 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 17 Aug 2017 19:39:20 +0000 (21:39 +0200)
Backport from mainline
2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>

PR target/81861
* config/i386/i386.c (ix86_option_override_internal): Save target
specific options after ix86_stack_protector_guard_reg was changed.

From-SVN: r251164

gcc/ChangeLog
gcc/config/i386/i386.c

index 3932ee83d6902de484239b7f4415685a5d654f75..495333698a190c79b37b8f9f689d63756c77c7ac 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-17  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
+
+       PR target/81861
+       * config/i386/i386.c (ix86_option_override_internal): Save target
+       specific options after ix86_stack_protector_guard_reg was changed.
+
 2017-08-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        Backport from mainline
index 11ab50b697328aa1eba843d5f2a632af2d9abca1..189317458d6c753896e565575dded75e2be9539a 100644 (file)
@@ -4357,12 +4357,6 @@ ix86_option_override_internal (bool main_args_p,
   gcc_assert ((opts->x_target_flags & MASK_LONG_DOUBLE_64) == 0
              || (opts->x_target_flags & MASK_LONG_DOUBLE_128) == 0);
 
-  /* Save the initial options in case the user does function specific
-     options.  */
-  if (main_args_p)
-    target_option_default_node = target_option_current_node
-      = build_target_option_node (opts);
-
   /* Handle stack protector */
   if (!opts_set->x_ix86_stack_protector_guard)
     opts->x_ix86_stack_protector_guard
@@ -4382,6 +4376,12 @@ ix86_option_override_internal (bool main_args_p,
       ix86_parse_stringop_strategy_string (str, true);
       free (str);
     }
+
+  /* Save the initial options in case the user does function specific
+     options.  */
+  if (main_args_p)
+    target_option_default_node = target_option_current_node
+      = build_target_option_node (opts);
 }
 
 /* Implement the TARGET_OPTION_OVERRIDE hook.  */