From: Nathan Froyd Date: Fri, 13 May 2011 13:44:04 +0000 (+0000) Subject: Change edge_to_cases_cleanup to return true. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb9f925985506bf4c98f928bfdc141e2ea3e73a6;p=gcc.git Change edge_to_cases_cleanup to return true. 2011-05-13 Nathan Froyd PR middle-end/48965 * tree-cfg.c (edge_to_cases_cleanup): Return true. (verify_expr) [CASE_LABEL_EXPR]: Add checking. From-SVN: r173733 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52e6f10d586..5a8fdff2e2c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-13 Nathan Froyd + + PR middle-end/48965 + * tree-cfg.c (edge_to_cases_cleanup): Return true. + (verify_expr) [CASE_LABEL_EXPR]: Add checking. + 2011-05-13 Kai Tietz * gimplify.c (gimplify_expr): Make sure operand is boolified. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index c5fa41637cc..9e74f587f9e 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; }