diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-06-23 15:06:15 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-06-23 15:06:15 +0200 |
commit | 923ba36f8ce142fb94eeabd7a78b6aa8266d51b2 (patch) | |
tree | f5bc7d13f1ad629c2d8bb9bd1ee88731b5870de1 /gcc/emit-rtl.c | |
parent | 53983ae9f340b1378e9aae93728c6bc2e62d4317 (diff) | |
download | gcc-923ba36f8ce142fb94eeabd7a78b6aa8266d51b2.zip gcc-923ba36f8ce142fb94eeabd7a78b6aa8266d51b2.tar.gz gcc-923ba36f8ce142fb94eeabd7a78b6aa8266d51b2.tar.bz2 |
re PR target/36533 (Incorrectly assumed aligned_operand)
PR target/36533
* emit-rtl.c (set_reg_attrs_from_value): Do nothing if
REG is a hard register.
* gcc.target/i386/pr36533.c: New test.
From-SVN: r137038
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index d6929cf..fa2b78a 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -963,6 +963,12 @@ set_reg_attrs_from_value (rtx reg, rtx x) { int offset; + /* Hard registers can be reused for multiple purposes within the same + function, so setting REG_ATTRS, REG_POINTER and REG_POINTER_ALIGN + on them is wrong. */ + if (HARD_REGISTER_P (reg)) + return; + offset = byte_lowpart_offset (GET_MODE (reg), GET_MODE (x)); if (MEM_P (x)) { |