summaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-30 18:19:18 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-30 18:19:18 +0000
commitda41aa8ec87c685d4f9f94bf1faa3f47e83d32d9 (patch)
tree1a5a34f7b426458bd3deb75deb9497ec745574a6 /gcc/tree-eh.c
parent9fcbf11526c99684c5fed0caa5160a1ad849c2ec (diff)
downloadgcc-da41aa8ec87c685d4f9f94bf1faa3f47e83d32d9.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82462 138bc75d-0d04-0410-961f-82ee72b054a4
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 1f37ac6789c..9dd52a3b0bf 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. */