diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-19 17:33:48 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-08-19 17:33:48 -0400 |
commit | 5c1c34d393bfd4ae5bed985266af00f41e61475a (patch) | |
tree | 690daa53928f2f1379d2ae2095500bdaa5bc8e95 /gcc | |
parent | 3f46679a3cf93a8755c10ba7ab10774112d9f28d (diff) | |
download | gcc-5c1c34d393bfd4ae5bed985266af00f41e61475a.zip gcc-5c1c34d393bfd4ae5bed985266af00f41e61475a.tar.gz gcc-5c1c34d393bfd4ae5bed985266af00f41e61475a.tar.bz2 |
(expand_call): If parm is transparent union, use type of first field.
From-SVN: r7949
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/calls.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 38b1033..9e08558 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. |