[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug bootstrap/63573] [5 Regression] libgo: ICE building libgo on powerpc-linux-gnu
From:       "hubicka at gcc dot gnu.org" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2014-10-31 11:34:11
Message-ID: bug-63573-4-x7TI4Uvvdg () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
This is the alternative patch resetting DECL_RTL in calls.c
Index: calls.c
===================================================================
--- calls.c     (revision 216942)
+++ calls.c     (working copy)
@@ -1210,6 +1210,15 @@ initialize_argument_information (int num
                  && TREE_CODE (base) != SSA_NAME
                  && (!DECL_P (base) || MEM_P (DECL_RTL (base)))))
            {
+             /* Argument setup code may have copied the value to register.  We
+                that optimization now because the tail call code must use
+                the original location.  */
+             if (TREE_CODE (args[i].tree_value) == PARM_DECL
+                 && !MEM_P (DECL_RTL (args[i].tree_value))
+                 && DECL_INCOMING_RTL (args[i].tree_value)
+                 && MEM_P (DECL_RTL (args[i].tree_value)))
+               set_decl_rtl (args[i].tree_value, DECL_INCOMING_RTL
(args[i].tree_value));
+
              mark_addressable (args[i].tree_value);

              /* We can't use sibcalls if a callee-copied argument is
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic