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