Commit 8a2209bf by J"orn Rennecke Committed by Joern Rennecke

sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE record with the…

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
parent 1e24ce83
2005-08-18 J"orn Rennecke <joern.rennecke@st.com>
* sh.c (sh_gimplify_va_arg_expr): Loop to substitute a RECORD_TYPE
record with the type of its only member.
2005-08-18 David Edelsohn <edelsohn@gnu.org> 2005-08-18 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (ltu<mode>_compare): Convert to * config/rs6000/rs6000.md (ltu<mode>_compare): Convert to
...@@ -81,6 +86,9 @@ ...@@ -81,6 +86,9 @@
2005-08-17 J"orn Rennecke <joern.rennecke@st.com> 2005-08-17 J"orn Rennecke <joern.rennecke@st.com>
* sh.c (sh_gimplify_va_arg_expr): Don't substitute a RECORD_TYPE
record with the type of its only member if the modes don't match.
* varasm.c (decode_reg_name): Skip empty additional register names. * varasm.c (decode_reg_name): Skip empty additional register names.
2005-08-16 Zdenek Dvorak <dvorakz@suse.cz> 2005-08-16 Zdenek Dvorak <dvorakz@suse.cz>
......
...@@ -6678,20 +6678,24 @@ sh_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, ...@@ -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 /* Structures with a single member with a distinct mode are passed
like their member. This is relevant if the latter has a REAL_TYPE like their member. This is relevant if the latter has a REAL_TYPE
or COMPLEX_TYPE type. */ or COMPLEX_TYPE type. */
if (TREE_CODE (type) == RECORD_TYPE while (TREE_CODE (type) == RECORD_TYPE
&& TYPE_FIELDS (type) && TYPE_FIELDS (type)
&& TREE_CODE (TYPE_FIELDS (type)) == FIELD_DECL && TREE_CODE (TYPE_FIELDS (type)) == FIELD_DECL
&& (TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == REAL_TYPE && (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))) == COMPLEX_TYPE
&& TREE_CHAIN (TYPE_FIELDS (type)) == NULL_TREE) || TREE_CODE (TREE_TYPE (TYPE_FIELDS (type))) == RECORD_TYPE)
&& TREE_CHAIN (TYPE_FIELDS (type)) == NULL_TREE)
{ {
tree field_type = TREE_TYPE (TYPE_FIELDS (type)); tree field_type = TREE_TYPE (TYPE_FIELDS (type));
if (TYPE_MODE (type) == TYPE_MODE (field_type)) if (TYPE_MODE (type) == TYPE_MODE (field_type))
type = field_type; type = field_type;
else 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) if (TARGET_SH4)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment