re PR middle-end/78700 (gccgo testcases stack.go, recover.go, crypto/tls fails)
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 6 Dec 2016 22:47:00 +0000 (22:47 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 6 Dec 2016 22:47:00 +0000 (22:47 +0000)
PR middle-end/78700
* calls.c (expand_call): Move back call to prepare_call_address.

From-SVN: r243322

gcc/ChangeLog
gcc/calls.c

index 463dc1a37d9fda05e12f591f28dacc3d79b6cbb8..61eeea3bb73662a8da0d0d4ee927e0f354e909f2 100644 (file)
@@ -1,3 +1,8 @@
+2016-12-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR middle-end/78700
+       * calls.c (expand_call): Move back call to prepare_call_address.
+
 2016-12-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/78658
index 21385ce0e12ccc28723cc36c318026e3792eb767..7941869b2b8f222b0bda2afbf11ccb0e9a9d82b3 100644 (file)
@@ -3427,13 +3427,6 @@ expand_call (tree exp, rtx target, int ignore)
       if (STRICT_ALIGNMENT)
        store_unaligned_arguments_into_pseudos (args, num_actuals);
 
-      /* Prepare the address of the call.  This must be done before any
-        register parameters is loaded for find_first_parameter_load to
-        work properly in the presence of descriptors.  */
-      funexp = prepare_call_address (fndecl ? fndecl : fntype, funexp,
-                                    static_chain_value, &call_fusage,
-                                    reg_parm_seen, flags);
-
       /* Now store any partially-in-registers parm.
         This is the last place a block-move can happen.  */
       if (reg_parm_seen)
@@ -3544,6 +3537,9 @@ expand_call (tree exp, rtx target, int ignore)
        }
 
       after_args = get_last_insn ();
+      funexp = prepare_call_address (fndecl ? fndecl : fntype, funexp,
+                                    static_chain_value, &call_fusage,
+                                    reg_parm_seen, flags);
       load_register_parameters (args, num_actuals, &call_fusage, flags,
                                pass == 0, &sibcall_failure);