aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-05-25 12:05:24 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-05-25 12:05:24 -0700
commit80a480ca1619ef0447017f63e48d78d659699d6e (patch)
tree9a98eef4d1ff1ec747bda51e8ffc1bf93e58ddbe /gcc/function.c
parent244ec848eb7a732d01248966365a64895230c708 (diff)
downloadgcc-80a480ca1619ef0447017f63e48d78d659699d6e.zip
gcc-80a480ca1619ef0447017f63e48d78d659699d6e.tar.gz
gcc-80a480ca1619ef0447017f63e48d78d659699d6e.tar.bz2
function.c (expand_function_start): Don't abort on PARALLEL returns from hard_function_value.
* function.c (expand_function_start): Don't abort on PARALLEL returns from hard_function_value. From-SVN: r42577
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 6aeed3e9..161173e 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6378,17 +6378,19 @@ expand_function_start (subr, parms_have_cleanups)
= hard_function_value (TREE_TYPE (DECL_RESULT (subr)),
subr, 1);
- /* Since we know the return value is not an aggregate, we should
- have a REG here. */
- if (!REG_P (hard_reg))
- abort ();
+ /* Structures that are returned in registers are not aggregate_value_p,
+ so we may see a PARALLEL. Don't play pseudo games with this. */
+ if (! REG_P (hard_reg))
+ SET_DECL_RTL (DECL_RESULT (subr), hard_reg);
+ else
+ {
+ /* Create the pseudo. */
+ SET_DECL_RTL (DECL_RESULT (subr), gen_reg_rtx (GET_MODE (hard_reg)));
- /* Create the pseudo. */
- SET_DECL_RTL (DECL_RESULT (subr),
- gen_reg_rtx (GET_MODE (hard_reg)));
- /* Needed because we may need to move this to memory
- in case it's a named return value whose address is taken. */
- DECL_REGISTER (DECL_RESULT (subr)) = 1;
+ /* Needed because we may need to move this to memory
+ in case it's a named return value whose address is taken. */
+ DECL_REGISTER (DECL_RESULT (subr)) = 1;
+ }
}
/* Initialize rtx for parameters and local variables.