(assign_parms): If parm is transparent union, use type of first field.
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 19 Aug 1994 21:33:13 +0000 (17:33 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 19 Aug 1994 21:33:13 +0000 (17:33 -0400)
From-SVN: r7948

gcc/function.c

index 947972f..9efbc41 100644 (file)
@@ -3150,6 +3150,13 @@ assign_parms (fndecl, second_time)
          continue;
        }
 
+      /* If the parm is to be passed as a transparent union, use the
+        type of the first field for the tests below.  We have already
+        verified that the modes are the same.  */
+      if (DECL_TRANSPARENT_UNION (parm)
+         || TYPE_TRANSPARENT_UNION (passed_type))
+       passed_type = TREE_TYPE (TYPE_FIELDS (passed_type));
+
       /* See if this arg was passed by invisible reference.  It is if
         it is an object whose size depends on the contents of the
         object itself or if the machine requires these objects be passed