aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2004-05-30 18:19:18 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-05-30 18:19:18 +0000
commit0f1f6967a21f8e4cc6ca7448dd9adc5d09c99edb (patch)
tree1a5a34f7b426458bd3deb75deb9497ec745574a6 /gcc/tree-eh.c
parentbd0a5aab91e49e2c36aab756bca6c1d4676a5db6 (diff)
downloadgcc-0f1f6967a21f8e4cc6ca7448dd9adc5d09c99edb.zip
gcc-0f1f6967a21f8e4cc6ca7448dd9adc5d09c99edb.tar.gz
gcc-0f1f6967a21f8e4cc6ca7448dd9adc5d09c99edb.tar.bz2
gimplify.c (sort_case_labels): New.
* gimplify.c (sort_case_labels): New. Split out from... (gimplify_switch_expr): ...here. Use it. * tree-eh.c (lower_try_finally_switch): Sort the labels of the SWITCH_EXPR created here before leaving the function. * tree.c (sort_case_labels): Add prototype. From-SVN: r82462
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 1f37ac6..9dd52a3 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1200,8 +1200,10 @@ lower_try_finally_switch (struct leh_state *state, struct leh_tf_state *tf)
replace_goto_queue (tf);
last_case_index += nlabels;
- /* Make sure that we have a default label, as one is required. */
+ /* Make sure that the last case is the default label, as one is required.
+ Then sort the labels, which is also required in GIMPLE. */
CASE_LOW (last_case) = NULL;
+ sort_case_labels (case_label_vec);
/* Need to link switch_stmt after running replace_goto_queue due
to not wanting to process the same goto stmts twice. */