aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-01-08 09:32:12 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-01-08 09:32:12 +0100
commitf3ef18ffa0d5facc961caab9c0244b6390e66096 (patch)
treeddef6bb86fc27a607b3cf386774ca7f5dc73a25e /gcc/fold-const.c
parent5b42fd01389e9054ba20f7ef574aaeab1beaf677 (diff)
downloadgcc-f3ef18ffa0d5facc961caab9c0244b6390e66096.zip
gcc-f3ef18ffa0d5facc961caab9c0244b6390e66096.tar.gz
gcc-f3ef18ffa0d5facc961caab9c0244b6390e66096.tar.bz2
re PR middle-end/55851 (ICE in size_binop_loc, at fold-const.c:1385)
PR middle-end/55851 * fold-const.c (int_binop_types_match_p): Allow all INTEGRAL_TYPE_P types instead of just INTEGER_TYPE types. * gcc.c-torture/compile/pr55851.c: New test. Co-Authored-By: Richard Biener <rguenther@suse.de> From-SVN: r195006
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7e619d6..a0b4036 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -900,9 +900,9 @@ associate_trees (location_t loc, tree t1, tree t2, enum tree_code code, tree typ
static bool
int_binop_types_match_p (enum tree_code code, const_tree type1, const_tree type2)
{
- if (TREE_CODE (type1) != INTEGER_TYPE && !POINTER_TYPE_P (type1))
+ if (!INTEGRAL_TYPE_P (type1) && !POINTER_TYPE_P (type1))
return false;
- if (TREE_CODE (type2) != INTEGER_TYPE && !POINTER_TYPE_P (type2))
+ if (!INTEGRAL_TYPE_P (type2) && !POINTER_TYPE_P (type2))
return false;
switch (code)