From: Eric Botcazou Date: Thu, 8 Jul 2004 14:33:20 +0000 (+0200) Subject: re PR target/16430 (ICE when returning non-C aggregates larger than 16 bytes) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c74fd3f1fd593b4696fadd8264743248d05ad178;p=gcc.git re PR target/16430 (ICE when returning non-C aggregates larger than 16 bytes) PR target/16430 * config/sparc/sparc.c (function_value): In 64-bit mode, return the aggregates larger than 16 bytes like unions. From-SVN: r84289 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d9cf1950f88..8e24df935fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-07-08 Eric Botcazou + + PR target/16430 + * config/sparc/sparc.c (function_value): In 64-bit mode, + return the aggregates larger than 16 bytes like unions. + 2004-07-08 Eric Botcazou PR target/16199 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 02a804013a6..26c9e1e35f3 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -5750,6 +5750,18 @@ function_value (tree type, enum machine_mode mode, int incoming_p) abort (); /* shouldn't get here */ mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 0); + + /* ??? We probably should have made the same ABI change in + 3.4.0 as the one we made for unions. The latter was + required by the SCD though, while the former is not + specified, so we favored compatibility and efficiency. + + Now we're stuck for aggregates larger than 16 bytes, + because OImode vanished in the meantime. Let's not + try to be unduly clever, and simply follow the ABI + for unions in that case. */ + if (mode == BLKmode) + return function_arg_union_value (bytes, mode, regbase); } else if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE_SIZE (mode) < UNITS_PER_WORD)