diff options
author | Jim Wilson <wilson@cygnus.com> | 1998-10-07 12:12:21 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1998-10-07 05:12:21 -0700 |
commit | 10a9f2beac265deecca8b66b352b0162cd9713bf (patch) | |
tree | 3806ba73d1e8f548364b103a2cb3113f7e3c1120 /gcc | |
parent | 28833504894ec58ca0ca15b810619b88898b25a2 (diff) | |
download | gcc-10a9f2beac265deecca8b66b352b0162cd9713bf.zip gcc-10a9f2beac265deecca8b66b352b0162cd9713bf.tar.gz gcc-10a9f2beac265deecca8b66b352b0162cd9713bf.tar.bz2 |
Fix for irix6 -O0 bug, see testcase gcc.c-torture/compile/981007-1.c.
* expr.c (emit_group_store): Handle a PARALLEL destination.
From-SVN: r22893
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/expr.c | 21 |
2 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6ff593..0ded56e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Wed Oct 7 12:10:46 1998 Jim Wilson <wilson@cygnus.com> + + * expr.c (emit_group_store): Handle a PARALLEL destination. + Wed Oct 7 10:07:29 1998 Richard Henderson <rth@cygnus.com> * gcse.c (pre_insert_insn): When a call ends a bb, insert @@ -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. */ |