]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Fix signed integer overflows
authortrippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Nov 2014 16:28:23 +0000 (16:28 +0000)
committertrippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Nov 2014 16:28:23 +0000 (16:28 +0000)
commit21a495104a9f486b345234cb66be4c9fa85dce84
treee63c30e7a25cea9e0b8e18a0c21fc63fc5a9d01f
parent93305aee3231cafa0607008901f5875cf68437ad
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
gcc/ChangeLog
gcc/config/rs6000/constraints.md
gcc/config/rs6000/predicates.md