diff options
author | trippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 16:28:23 +0000 |
---|---|---|
committer | trippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 16:28:23 +0000 |
commit | 21a495104a9f486b345234cb66be4c9fa85dce84 (patch) | |
tree | e63c30e7a25cea9e0b8e18a0c21fc63fc5a9d01f /gcc/config/rs6000/constraints.md | |
parent | 93305aee3231cafa0607008901f5875cf68437ad (diff) | |
download | gcc-21a495104a9f486b345234cb66be4c9fa85dce84.tar.gz |
rs6000: Fix signed integer overflows
bootstrap-ubsan on gcc112 shows a couple of signed integer overflows:
config/rs6000/constraints.md:143:33: runtime error: signed integer overflow: 9223372036854775807 + 32768 cannot be represented in type 'long int'
config/rs6000/predicates.md:396:22: runtime error: signed integer overflow: 9223372036854775807 + 2147516416 cannot be represented in type 'long int'
config/rs6000/predicates.md:856:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:862:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:865:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:868:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:914:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:917:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:940:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:946:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:949:11: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
config/rs6000/predicates.md:955:12: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself
2014-11-19 Markus Trippelsdorf <markus@trippelsdorf.de>
* config/rs6000/constraints.md: Avoid signed integer overflows.
* config/rs6000/predicates.md: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/constraints.md')
-rw-r--r-- | gcc/config/rs6000/constraints.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/rs6000/constraints.md b/gcc/config/rs6000/constraints.md index b8800e6c369..0e0e517d7a1 100644 --- a/gcc/config/rs6000/constraints.md +++ b/gcc/config/rs6000/constraints.md @@ -140,7 +140,7 @@ (define_constraint "I" "A signed 16-bit constant" (and (match_code "const_int") - (match_test "(unsigned HOST_WIDE_INT) (ival + 0x8000) < 0x10000"))) + (match_test "((unsigned HOST_WIDE_INT) ival + 0x8000) < 0x10000"))) (define_constraint "J" "high-order 16 bits nonzero" |