[Bug target/47564] [4.6 Regression] internal compiler error in memory_address_addr_space, at explow.c:504

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 1 15:47:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47564

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-01 15:47:07 UTC ---
Following works by not doing target_reinit once tree_rest_of_compilation calls
init_function_start, until final.
--- function.c.jj 2011-01-25 18:40:08.000000000 +0100
+++ function.c 2011-02-01 16:33:48.000000000 +0100
@@ -4294,7 +4294,10 @@ invoke_set_current_function_hook (tree f
   cl_optimization_restore (&global_options, TREE_OPTIMIZATION (opts));
 }

-      targetm.set_current_function (fndecl);
+      /* Don't call targetm.set_current_function in between
+         prepare_function_start and following free_after_compilation.  */
+      if (regno_reg_rtx == NULL)
+        targetm.set_current_function (fndecl);
     }
 }



More information about the Gcc-bugs mailing list