From 5c1c34d393bfd4ae5bed985266af00f41e61475a Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 19 Aug 1994 17:33:48 -0400 Subject: [PATCH] (expand_call): If parm is transparent union, use type of first field. From-SVN: r7949 --- gcc/calls.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/calls.c b/gcc/calls.c index 38b1033fc4a..9e08558e869 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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. -- 2.30.2