diff options
author | J"orn Rennecke <joern.rennecke@st.com> | 2005-08-18 16:42:25 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2005-08-18 17:42:25 +0100 |
commit | 8a2209bfdbc6b924513c9fa6ef1dfe28b7bd1366 (patch) | |
tree | 126ac22eefdcfbbcbf1a06b8c653104b52bf281e /gcc/config/sh | |
parent | 1e24ce8318a4c3bd747d76a5178e0a807b31d2ed (diff) | |
download | gcc-8a2209bfdbc6b924513c9fa6ef1dfe28b7bd1366.zip gcc-8a2209bfdbc6b924513c9fa6ef1dfe28b7bd1366.tar.gz gcc-8a2209bfdbc6b924513c9fa6ef1dfe28b7bd1366.tar.bz2 |
sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE record with the type of its only member.
* sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE
record with the type of its only member.
From-SVN: r103254
Diffstat (limited to 'gcc/config/sh')
-rw-r--r-- | gcc/config/sh/sh.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 1205540..ed132f6 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -6678,20 +6678,24 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, /* Structures with a single member with a distinct mode are passed like their member. This is relevant if the latter has a REAL_TYPE or COMPLEX_TYPE type. */ - if (TREE_CODE (type) == RECORD_TYPE - && TYPE_FIELDS (type) - && TREE_CODE (TYPE_FIELDS (type)) == FIELD_DECL - && (TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == REAL_TYPE - || TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == COMPLEX_TYPE) - && TREE_CHAIN (TYPE_FIELDS (type)) == NULL_TREE) + while (TREE_CODE (type) == RECORD_TYPE + && TYPE_FIELDS (type) + && TREE_CODE (TYPE_FIELDS (type)) == FIELD_DECL + && (TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == REAL_TYPE + || TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == COMPLEX_TYPE + || TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == RECORD_TYPE) + && TREE_CHAIN (TYPE_FIELDS (type)) == NULL_TREE) { tree field_type = TREE_TYPE (TYPE_FIELDS (type)); if (TYPE_MODE (type) == TYPE_MODE (field_type)) type = field_type; else - gcc_assert (TYPE_ALIGN (type) - < GET_MODE_ALIGNMENT (TYPE_MODE (field_type))); + { + gcc_assert (TYPE_ALIGN (type) + < GET_MODE_ALIGNMENT (TYPE_MODE (field_type))); + break; + } } if (TARGET_SH4) |