aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-chkp-opt.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-03-09 11:10:02 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-03-09 10:10:02 +0000
commit8a7df0316d5332199127912ef048cccdc8d86bac (patch)
tree396f65b0b5c74091627a2048196c183cca6d90bc /gcc/tree-chkp-opt.c
parent3828bb0d7ed18e03d0794c0a38a51d155421559c (diff)
downloadgcc-8a7df0316d5332199127912ef048cccdc8d86bac.zip
gcc-8a7df0316d5332199127912ef048cccdc8d86bac.tar.gz
gcc-8a7df0316d5332199127912ef048cccdc8d86bac.tar.bz2
Fix ICE in tree-chkp-opt.c (PR tree-optimization/79631).
2017-03-09 Martin Liska <mliska@suse.cz> PR tree-optimization/79631 * tree-chkp-opt.c (chkp_is_constant_addr): Call tree_int_cst_sign_bit just for INTEGER constants. 2017-03-09 Martin Liska <mliska@suse.cz> PR tree-optimization/79631 * gcc.target/i386/mpx/pr79631.c: New test. From-SVN: r245998
Diffstat (limited to 'gcc/tree-chkp-opt.c')
-rw-r--r--gcc/tree-chkp-opt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-chkp-opt.c b/gcc/tree-chkp-opt.c
index ebe0545..ab98edb 100644
--- a/gcc/tree-chkp-opt.c
+++ b/gcc/tree-chkp-opt.c
@@ -239,9 +239,11 @@ chkp_is_constant_addr (const address_t &addr, int *sign)
return false;
else if (addr.pol[0].var)
return false;
+ else if (TREE_CODE (addr.pol[0].cst) != INTEGER_CST)
+ return false;
else if (integer_zerop (addr.pol[0].cst))
*sign = 0;
- else if (tree_int_cst_sign_bit (addr.pol[0].cst))
+ else if (tree_int_cst_sign_bit (addr.pol[0].cst))
*sign = -1;
else
*sign = 1;