[Bug target/59683] ICE: in classify_argument, at config/i386/i386.c:6637 with #pragma GCC target("avx512f")

kyukhin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 7 15:49:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59683

--- Comment #3 from Kirill Yukhin <kyukhin at gcc dot gnu.org> ---
This hunk from Jakub's fix for PR61925 makes test working:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a41efa4..6aebaed 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4962,6 +4962,15 @@ static GTY(()) tree ix86_previous_fndecl;
 void
 ix86_reset_previous_fndecl (void)
 {
+  tree new_tree = target_option_current_node;
+  cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree));
+  if (TREE_TARGET_GLOBALS (new_tree))
+    restore_target_globals (TREE_TARGET_GLOBALS (new_tree));
+  else if (new_tree == target_option_default_node)
+    restore_target_globals (&default_target_globals);
+  else
+    TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts ();
+
   ix86_previous_fndecl = NULL_TREE;
 }


More information about the Gcc-bugs mailing list