diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-03-25 12:34:11 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-03-25 12:34:11 +0100 |
commit | 6ddae612862ce6cf65cfeddac2d0959d7397d0be (patch) | |
tree | 3f696f0ff6c9196d8903fb35f20fb615915ea88d /gcc/expr.c | |
parent | 9035ec7952324e5b2a4b17cfc86db62c44d008a3 (diff) | |
download | gcc-6ddae612862ce6cf65cfeddac2d0959d7397d0be.zip gcc-6ddae612862ce6cf65cfeddac2d0959d7397d0be.tar.gz gcc-6ddae612862ce6cf65cfeddac2d0959d7397d0be.tar.bz2 |
re PR target/6043 (IICE on ia64 for Blitz config test for C++ complex math)
PR target/6043
* expr.c (emit_group_store): Handle storing into CONCAT.
* g++.dg/opt/conj2.C: New test.
From-SVN: r51311
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -2113,6 +2113,7 @@ emit_group_store (orig_dst, src, ssize) HOST_WIDE_INT bytepos = INTVAL (XEXP (XVECEXP (src, 0, i), 1)); enum machine_mode mode = GET_MODE (tmps[i]); unsigned int bytelen = GET_MODE_SIZE (mode); + rtx dest = dst; /* Handle trailing fragments that run over the size of the struct. */ if (ssize >= 0 && bytepos + (HOST_WIDE_INT) bytelen > ssize) @@ -2126,14 +2127,27 @@ emit_group_store (orig_dst, src, ssize) bytelen = ssize - bytepos; } + if (GET_CODE (dst) == CONCAT) + { + if (bytepos + bytelen <= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0)))) + dest = XEXP (dst, 0); + else if (bytepos >= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0)))) + { + bytepos -= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0))); + dest = XEXP (dst, 1); + } + else + abort (); + } + /* Optimize the access just a bit. */ - if (GET_CODE (dst) == MEM - && MEM_ALIGN (dst) >= GET_MODE_ALIGNMENT (mode) + if (GET_CODE (dest) == MEM + && MEM_ALIGN (dest) >= GET_MODE_ALIGNMENT (mode) && bytepos * BITS_PER_UNIT % GET_MODE_ALIGNMENT (mode) == 0 && bytelen == GET_MODE_SIZE (mode)) - emit_move_insn (adjust_address (dst, mode, bytepos), tmps[i]); + emit_move_insn (adjust_address (dest, mode, bytepos), tmps[i]); else - store_bit_field (dst, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT, + store_bit_field (dest, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT, mode, tmps[i], ssize); } |