From: Richard Kenner Date: Fri, 19 Aug 1994 21:33:13 +0000 (-0400) Subject: (assign_parms): If parm is transparent union, use type of first field. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f46679a3cf93a8755c10ba7ab10774112d9f28d;p=gcc.git (assign_parms): If parm is transparent union, use type of first field. From-SVN: r7948 --- diff --git a/gcc/function.c b/gcc/function.c index 947972f5f9e..9efbc41b6b2 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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