diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccf7dda..f6d95d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-12-30 Richard Henderson <rth@redhat.com> + + * config/ia64/ia64.c (hfa_element_mode): Return false for + zero-sized top-level aggregates. + 2004-12-30 Jan Hubicka <jh@suse.cz> PR target/18019 diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 2d819c6..68e6ddb 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -186,7 +186,7 @@ static rtx gen_movdi_x (rtx, rtx, rtx); static rtx gen_fr_spill_x (rtx, rtx, rtx); static rtx gen_fr_restore_x (rtx, rtx, rtx); -static enum machine_mode hfa_element_mode (tree, int); +static enum machine_mode hfa_element_mode (tree, bool); static void ia64_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int); static bool ia64_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, @@ -2968,10 +2968,14 @@ ia64_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode, An aggregate is a homogeneous floating point aggregate is if all fields/elements in it have the same floating point type (e.g, - SFmode). 128-bit quad-precision floats are excluded. */ + SFmode). 128-bit quad-precision floats are excluded. + + Variable sized aggregates should never arrive here, since we should + have already decided to pass them by reference. Top-level zero-sized + aggregates are excluded because our parallels crash the middle-end. */ static enum machine_mode -hfa_element_mode (tree type, int nested) +hfa_element_mode (tree type, bool nested) { enum machine_mode element_mode = VOIDmode; enum machine_mode mode; @@ -2979,6 +2983,9 @@ hfa_element_mode (tree type, int nested) int know_element_mode = 0; tree t; + if (!nested && (!TYPE_SIZE (type) || integer_zerop (TYPE_SIZE (type)))) + return VOIDmode; + switch (code) { case VOID_TYPE: case INTEGER_TYPE: case ENUMERAL_TYPE: |