aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 327ebd3..ed353f8 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2091,6 +2091,8 @@ operand_equal_p (arg0, arg1, only_const)
if (TREE_CODE (arg0) != TREE_CODE (arg1)
/* This is needed for conversions and for COMPONENT_REF.
Might as well play it safe and always test this. */
+ || TREE_CODE (TREE_TYPE (arg0)) == ERROR_MARK
+ || TREE_CODE (TREE_TYPE (arg1)) == ERROR_MARK
|| TYPE_MODE (TREE_TYPE (arg0)) != TYPE_MODE (TREE_TYPE (arg1)))
return 0;