aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-09-22 12:39:10 -0600
committerJeff Law <law@gcc.gnu.org>2015-09-22 12:39:10 -0600
commit50fa47d9167aa830a911df8f5ba4d52cec79536d (patch)
tree59257fcbb9b7c3bc583e5947b268c000c54a1949 /gcc/config/pa
parent6b333269be81396c4ed6b700bf8bd3e0adeb50dc (diff)
downloadgcc-50fa47d9167aa830a911df8f5ba4d52cec79536d.zip
gcc-50fa47d9167aa830a911df8f5ba4d52cec79536d.tar.gz
gcc-50fa47d9167aa830a911df8f5ba4d52cec79536d.tar.bz2
[PATCH] Remove undefined behaviour from hppa backend
* config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined behavior. From-SVN: r228021
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 9fd036f..511ea81 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -814,7 +814,8 @@ extern int may_call_alloca;
this range are forced to the constant pool prior to reload. */
#define MAX_LEGIT_64BIT_CONST_INT ((HOST_WIDE_INT) 32 << 31)
-#define MIN_LEGIT_64BIT_CONST_INT ((HOST_WIDE_INT) -32 << 31)
+#define MIN_LEGIT_64BIT_CONST_INT \
+ ((HOST_WIDE_INT)((unsigned HOST_WIDE_INT) -32 << 31))
#define LEGITIMATE_64BIT_CONST_INT_P(X) \
((X) >= MIN_LEGIT_64BIT_CONST_INT && (X) < MAX_LEGIT_64BIT_CONST_INT)