diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-07 12:12:21 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-07 12:12:21 +0000 |
commit | 723d3639ec71040563ccd8ebf1c307085ea15b9c (patch) | |
tree | 3806ba73d1e8f548364b103a2cb3113f7e3c1120 /gcc/expr.c | |
parent | 365f65ccf54ace70854982f3591a19bfa032ac31 (diff) | |
download | gcc-723d3639ec71040563ccd8ebf1c307085ea15b9c.tar.gz |
Fix for irix6 -O0 bug, see testcase gcc.c-torture/compile/981007-1.c.
* expr.c (emit_group_store): Handle a PARALLEL destination.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22893 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index adb2d4ad1f9..d2dcdf8c592 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -2006,7 +2006,26 @@ emit_group_store (orig_dst, src, ssize, align) /* If we won't be storing directly into memory, protect the real destination from strange tricks we might play. */ dst = orig_dst; - if (GET_CODE (dst) != MEM) + if (GET_CODE (dst) == PARALLEL) + { + rtx temp; + + /* We can get a PARALLEL dst if there is a conditional expression in + a return statement. In that case, the dst and src are the same, + so no action is necessary. */ + if (rtx_equal_p (dst, src)) + return; + + /* It is unclear if we can ever reach here, but we may as well handle + it. Allocate a temporary, and split this into a store/load to/from + the temporary. */ + + temp = assign_stack_temp (GET_MODE (dst), ssize, 0); + emit_group_store (temp, src, ssize, align); + emit_group_load (dst, temp, ssize, align); + return; + } + else if (GET_CODE (dst) != MEM) { dst = gen_reg_rtx (GET_MODE (orig_dst)); /* Make life a bit easier for combine. */ |