summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 08:22:38 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-20 08:22:38 +0000
commitccf4f3ae98386198926269817844b5bb67d3ebe4 (patch)
tree15db9a73406c618d2f18f1e9696a3f9549e5ace6 /gcc/tree-cfg.c
parent79fb55a1f085a3c03a9168b97773ddd9a4ad054a (diff)
downloadgcc-ccf4f3ae98386198926269817844b5bb67d3ebe4.tar.gz
2011-05-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173935 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173937 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index e1f8707e809..f6b171024bd 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -843,7 +843,7 @@ edge_to_cases_cleanup (const void *key ATTRIBUTE_UNUSED, void **value,
}
*value = NULL;
- return false;
+ return true;
}
/* Start recording information mapping edges to case labels. */
@@ -2830,6 +2830,14 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
*walk_subtrees = 0;
break;
+ case CASE_LABEL_EXPR:
+ if (CASE_CHAIN (t))
+ {
+ error ("invalid CASE_CHAIN");
+ return t;
+ }
+ break;
+
default:
break;
}
@@ -3342,6 +3350,18 @@ verify_gimple_assign_unary (gimple stmt)
return false;
case TRUTH_NOT_EXPR:
+ /* We require two-valued operand types. */
+ if (!(TREE_CODE (rhs1_type) == BOOLEAN_TYPE
+ || (INTEGRAL_TYPE_P (rhs1_type)
+ && TYPE_PRECISION (rhs1_type) == 1)))
+ {
+ error ("invalid types in truth not");
+ debug_generic_expr (lhs_type);
+ debug_generic_expr (rhs1_type);
+ return true;
+ }
+ break;
+
case NEGATE_EXPR:
case ABS_EXPR:
case BIT_NOT_EXPR:
@@ -3535,26 +3555,11 @@ do_pointer_plus_expr_check:
case TRUTH_ANDIF_EXPR:
case TRUTH_ORIF_EXPR:
- gcc_unreachable ();
-
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
case TRUTH_XOR_EXPR:
- {
- /* We allow any kind of integral typed argument and result. */
- if (!INTEGRAL_TYPE_P (rhs1_type)
- || !INTEGRAL_TYPE_P (rhs2_type)
- || !INTEGRAL_TYPE_P (lhs_type))
- {
- error ("type mismatch in binary truth expression");
- debug_generic_expr (lhs_type);
- debug_generic_expr (rhs1_type);
- debug_generic_expr (rhs2_type);
- return true;
- }
- return false;
- }
+ gcc_unreachable ();
case LT_EXPR:
case LE_EXPR: