summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c59
1 files changed, 26 insertions, 33 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 47494106824..2b8ad801e9a 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1196,7 +1196,7 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
{
struct tlist *tmp_before, *tmp_nosp, *tmp_list2, *tmp_list3;
enum tree_code code;
- char cl;
+ enum tree_code_class cl;
/* X may be NULL if it is the operand of an empty statement expression
({ }). */
@@ -1345,39 +1345,32 @@ verify_tree (tree x, struct tlist **pbefore_sp, struct tlist **pno_sp,
add_tlist (pno_sp, t->cache_after_sp, NULL_TREE, 1);
return;
}
- default:
- break;
- }
- if (cl == '1')
- {
- if (first_rtl_op (code) == 0)
- return;
- x = TREE_OPERAND (x, 0);
- writer = 0;
- goto restart;
- }
-
- switch (cl)
- {
- case 'r':
- case '<':
- case '2':
- case 'e':
- case 's':
- case 'x':
- {
- int lp;
- int max = first_rtl_op (TREE_CODE (x));
- for (lp = 0; lp < max; lp++)
- {
- tmp_before = tmp_nosp = 0;
- verify_tree (TREE_OPERAND (x, lp), &tmp_before, &tmp_nosp, NULL_TREE);
- merge_tlist (&tmp_nosp, tmp_before, 0);
- add_tlist (pno_sp, tmp_nosp, NULL_TREE, 0);
- }
- break;
- }
+ default:
+ /* For other expressions, simply recurse on their operands.
+ Manual tail recursion for unary expressions.
+ Other non-expressions need not be processed. */
+ if (cl == tcc_unary)
+ {
+ if (first_rtl_op (code) == 0)
+ return;
+ x = TREE_OPERAND (x, 0);
+ writer = 0;
+ goto restart;
+ }
+ else if (IS_EXPR_CODE_CLASS (cl))
+ {
+ int lp;
+ int max = first_rtl_op (TREE_CODE (x));
+ for (lp = 0; lp < max; lp++)
+ {
+ tmp_before = tmp_nosp = 0;
+ verify_tree (TREE_OPERAND (x, lp), &tmp_before, &tmp_nosp, 0);
+ merge_tlist (&tmp_nosp, tmp_before, 0);
+ add_tlist (pno_sp, tmp_nosp, NULL_TREE, 0);
+ }
+ }
+ return;
}
}