function.c (assign_parms): Demote promoted argument passed by transparent reference.
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 14 Feb 2002 19:27:21 +0000 (19:27 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 14 Feb 2002 19:27:21 +0000 (19:27 +0000)
* function.c (assign_parms): Demote promoted argument passed by
transparent reference.

From-SVN: r49774

gcc/ChangeLog
gcc/function.c

index 63b4eddcca9cc04e3c0d5e04ddb68489dac1fa38..e23395e7524418567551bb5b136ecda5b347aa4d 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-14  Alexandre Oliva  <aoliva@redhat.com>
+
+       * function.c (assign_parms): Demote promoted argument passed by
+       transparent reference.
+
 2001-02-14     Joel Sherrill <joel@OARcorp.com>
 
        * config/arm/rtems-elf.h, config/h8300/rtems.h: Removed redundant
index d304b309c4e0eb58001818f5154217f82c174d05..634e74b4d62c6e006af391e0b6c535e8660fbc04 100644 (file)
@@ -4749,13 +4749,15 @@ assign_parms (fndecl)
          /* If we were passed a pointer but the actual value
             can safely live in a register, put it in one.  */
          if (passed_pointer && TYPE_MODE (TREE_TYPE (parm)) != BLKmode
-             && ! ((! optimize
-                    && ! DECL_REGISTER (parm))
-                   || TREE_SIDE_EFFECTS (parm)
-                   /* If -ffloat-store specified, don't put explicit
-                      float variables into registers.  */
-                   || (flag_float_store
-                       && TREE_CODE (TREE_TYPE (parm)) == REAL_TYPE)))
+             /* If by-reference argument was promoted, demote it.  */
+             && (TYPE_MODE (TREE_TYPE (parm)) != GET_MODE (DECL_RTL (parm))
+                 || ! ((! optimize
+                        && ! DECL_REGISTER (parm))
+                       || TREE_SIDE_EFFECTS (parm)
+                       /* If -ffloat-store specified, don't put explicit
+                          float variables into registers.  */
+                       || (flag_float_store
+                           && TREE_CODE (TREE_TYPE (parm)) == REAL_TYPE))))
            {
              /* We can't use nominal_mode, because it will have been set to
                 Pmode above.  We must use the actual mode of the parm.  */