OSDN Git Service

(expand_call): If parm is transparent union, use type of first field.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Aug 1994 21:33:48 +0000 (21:33 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 19 Aug 1994 21:33:48 +0000 (21:33 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7949 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/calls.c

index 38b1033..9e08558 100644 (file)
@@ -982,6 +982,12 @@ expand_call (exp, target, ignore)
       if (type == error_mark_node || TYPE_SIZE (type) == 0)
        args[i].tree_value = integer_zero_node, type = integer_type_node;
 
+      /* If TYPE is a transparent union, pass things the way we would
+        pass the first field of the union.  We have already verified that
+        the modes are the same.  */
+      if (TYPE_TRANSPARENT_UNION (type))
+       type = TREE_TYPE (TYPE_FIELDS (type));
+
       /* Decide where to pass this arg.
 
         args[i].reg is nonzero if all or part is passed in registers.