aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-05-08 12:06:57 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-05-08 12:06:57 +0000
commitf56000ede5802f86b8ab00443090eb6ec3488773 (patch)
tree57e6668227eb70406d56df0c6b6cd2991214eb57 /gcc/gimple.c
parent901ad63f3070d0f561f205618cc830486af365fb (diff)
downloadgcc-f56000ede5802f86b8ab00443090eb6ec3488773.zip
gcc-f56000ede5802f86b8ab00443090eb6ec3488773.tar.gz
gcc-f56000ede5802f86b8ab00443090eb6ec3488773.tar.bz2
gimple.c (gimple_types_compatible_p): Treat bounds of domain types as equal if they are both PLACEHOLDER_EXPRs.
* gimple.c (gimple_types_compatible_p) <ARRAY_TYPE>: Treat bounds of domain types as equal if they are both PLACEHOLDER_EXPRs. From-SVN: r159185
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 6d439c5..d9a613a 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3305,9 +3305,15 @@ gimple_types_compatible_p (tree t1, tree t2)
/* The minimum/maximum values have to be the same. */
if ((min1 == min2
- || (min1 && min2 && operand_equal_p (min1, min2, 0)))
+ || (min1 && min2
+ && ((TREE_CODE (min1) == PLACEHOLDER_EXPR
+ && TREE_CODE (min2) == PLACEHOLDER_EXPR)
+ || operand_equal_p (min1, min2, 0))))
&& (max1 == max2
- || (max1 && max2 && operand_equal_p (max1, max2, 0))))
+ || (max1 && max2
+ && ((TREE_CODE (max1) == PLACEHOLDER_EXPR
+ && TREE_CODE (max2) == PLACEHOLDER_EXPR)
+ || operand_equal_p (max1, max2, 0)))))
goto same_types;
else
goto different_types;