aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 107735f..22ddac8 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -5188,6 +5188,10 @@ expand_end_case (orig_index)
tree index_expr, index_type;
int unsignedp;
+ /* Don't crash due to previous errors. */
+ if (thiscase == NULL)
+ return;
+
table_label = gen_label_rtx ();
index_expr = thiscase->data.case_stmt.index_expr;
index_type = TREE_TYPE (index_expr);