diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2018-08-20 14:20:59 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2018-08-20 08:20:59 -0600 |
commit | be3cfb9da549517523d9ee9177d327481dc788de (patch) | |
tree | 9c706675ec67b2766d7a1c167c2d4e40ef27fe11 /gcc/config/alpha | |
parent | abcd1775e067600918da69330f8ff3f1f6734b4c (diff) | |
download | gcc-be3cfb9da549517523d9ee9177d327481dc788de.zip gcc-be3cfb9da549517523d9ee9177d327481dc788de.tar.gz gcc-be3cfb9da549517523d9ee9177d327481dc788de.tar.bz2 |
re PR target/86984 (invalid relocation accessing a const char array)
PR target/86984
* expr.c (expand_assignment): Assert that bitpos is positive.
(store_field): Likewise
(expand_expr_real_1): Make sure that bitpos is positive.
* config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
integer overflow.
PR target/86984
* gcc.target/alpha/pr86984.c: New test.
From-SVN: r263664
Diffstat (limited to 'gcc/config/alpha')
-rw-r--r-- | gcc/config/alpha/alpha.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 6802ef3..aa1de8a 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -678,7 +678,7 @@ enum reg_class { #define CONSTANT_ADDRESS_P(X) \ (CONST_INT_P (X) \ - && (unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000) + && (UINTVAL (X) + 0x8000) < 0x10000) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its validity for a certain class. |