function.c (assign_parm_setup_reg): Properly rename variables in FUNCTION_ARG_CALLEE_...
authorRichard Henderson <rth@redhat.com>
Mon, 5 Jul 2004 18:43:47 +0000 (11:43 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 5 Jul 2004 18:43:47 +0000 (11:43 -0700)
        * function.c (assign_parm_setup_reg): Properly rename variables in
        FUNCTION_ARG_CALLEE_COPIES section.

From-SVN: r84128

gcc/ChangeLog
gcc/function.c

index eefcd34a4e0a8f385b6199762df3cde8d0248fc1..cce5964af42b5ae73ddb71a0aa77d6eb687f02fc 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-05  Richard Henderson  <rth@redhat.com>
+
+       * function.c (assign_parm_setup_reg): Properly rename variables in
+       FUNCTION_ARG_CALLEE_COPIES section.
+
 2004-07-05  Zack Weinberg  <zack@codesourcery.com>
 
        * tree-mudflap.c: Include cgraph.h.
index 71003c2d61b6f0f650322e1cd94cc2483a3be891..efeb9f6b24ae4cce905b0ad7d9003b82fc2c2f04 100644 (file)
@@ -2860,40 +2860,41 @@ assign_parm_setup_reg (struct assign_parm_data_all *all, tree parm,
   /* ??? Later add code to handle the case that if the argument isn't
      modified, don't do the copy.  */
 
-  else if (data->passed_pointer
-          && FUNCTION_ARG_CALLEE_COPIES (all->args_so_far,
-                                         TYPE_MODE (TREE_TYPE (passed_type)),
-                                         TREE_TYPE (passed_type),
-                                         data->named_arg)
-          && ! TREE_ADDRESSABLE (TREE_TYPE (passed_type)))
+  else if (data->passed_pointer)
     {
-      rtx copy;
-      tree type = TREE_TYPE (passed_type);
+      tree type = TREE_TYPE (data->passed_type);
+    
+      if (FUNCTION_ARG_CALLEE_COPIES (all->args_so_far, TYPE_MODE (type),
+                                     type, data->named_arg)
+          && !TREE_ADDRESSABLE (type))
+       {
+         rtx copy;
 
-      /* This sequence may involve a library call perhaps clobbering
-        registers that haven't been copied to pseudos yet.  */
+         /* This sequence may involve a library call perhaps clobbering
+            registers that haven't been copied to pseudos yet.  */
 
-      push_to_sequence (all->conversion_insns);
+         push_to_sequence (all->conversion_insns);
 
-      if (!COMPLETE_TYPE_P (type)
-         || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
-       {
-         /* This is a variable sized object.  */
-         copy = allocate_dynamic_stack_space (expr_size (parm), NULL_RTX,
-                                              TYPE_ALIGN (type));
-         copy = gen_rtx_MEM (BLKmode, copy);
-       }
-      else
-       copy = assign_stack_temp (TYPE_MODE (type),
-                                 int_size_in_bytes (type), 1);
-      set_mem_attributes (copy, parm, 1);
+         if (!COMPLETE_TYPE_P (type)
+             || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
+           {
+             /* This is a variable sized object.  */
+             copy = allocate_dynamic_stack_space (expr_size (parm), NULL_RTX,
+                                                  TYPE_ALIGN (type));
+             copy = gen_rtx_MEM (BLKmode, copy);
+           }
+         else
+           copy = assign_stack_temp (TYPE_MODE (type),
+                                     int_size_in_bytes (type), 1);
+         set_mem_attributes (copy, parm, 1);
 
-      store_expr (parm, copy, 0);
-      emit_move_insn (parmreg, XEXP (copy, 0));
-      all->conversion_insns = get_insns ();
-      end_sequence ();
+         store_expr (parm, copy, 0);
+         emit_move_insn (parmreg, XEXP (copy, 0));
+         all->conversion_insns = get_insns ();
+         end_sequence ();
 
-      did_conversion = true;
+         did_conversion = true;
+       }
     }
 #endif /* FUNCTION_ARG_CALLEE_COPIES */