different chains selected each time. Under -fcompare-debug, this leads
to problems later on when we walk the function body and collect all the
DECLs referenced therein; we might walk non-NULL CASE_CHAINs and reach
more DECLs, depending on the memory layout.
This wouldn't have shown up previously, since TREE_CHAIN was used, and
we wouldn't walk TREE_CHAIN of expressions to find DECLs.
The fix is simple: return true from the above function! I've added
logic to verify_expr to catch this sort of thing.
Tested on x86_64-unknown-linux-gnu. OK to commit?
* tree-cfg.c (edge_to_cases_cleanup): Return true.
(verify_expr) [CASE_LABEL_EXPR]: Add checking.
@@ -843,7 +843,7 @@ edge_to_cases_cleanup (const void *key
ATTRIBUTE_UNUSED, void **value,
*value = NULL;
- return false;
+ return true;