re PR target/66541 (r224314 causes ICE in gcc.dg/torture/pr52429.c)
authorChristian Bruel <christian.bruel@st.com>
Fri, 19 Jun 2015 06:58:22 +0000 (08:58 +0200)
committerChristian Bruel <chrbr@gcc.gnu.org>
Fri, 19 Jun 2015 06:58:22 +0000 (08:58 +0200)
PR target/66541
PR target/52144
* config/arm/arm.c (arm_set_current_function): Handle
explicit default options.

From-SVN: r224638

gcc/ChangeLog
gcc/config/arm/arm.c

index 25628faad67fd240fc85053b5f20a449c8b182f6..28494ffebaa48dd6284618455a58d341bea4c86a 100644 (file)
@@ -1,3 +1,10 @@
+2015-06-19  Christian Bruel  <christian.bruel@st.com>
+
+       PR target/66541
+       PR target/52144
+       * config/arm/arm.c (arm_set_current_function): Handle
+       explicit default options.
+
 2015-06-18  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*movsicc_noc_zext): New insn.
index d794fc0eb80836d0f0846cae5764b35e5726f4b7..e79a36939d0c2e678dfa66b72e7cc5167fd30697 100644 (file)
@@ -29351,9 +29351,9 @@ arm_set_current_function (tree fndecl)
 
   arm_previous_fndecl = fndecl;
   if (old_tree == new_tree)
-    ;
+    return;
 
-  else if (new_tree)
+  if (new_tree && new_tree != target_option_default_node)
     {
       cl_target_option_restore (&global_options,
                                TREE_TARGET_OPTION (new_tree));
@@ -29365,7 +29365,7 @@ arm_set_current_function (tree fndecl)
          = save_target_globals_default_opts ();
     }
 
-  else if (old_tree)
+  else if (old_tree && old_tree != target_option_default_node)
     {
       new_tree = target_option_current_node;