Update version
[official-gcc.git] / gcc / c-semantics.c
blob4e3b80d21558f67116e376e914cdff94e8c95ddd
1 /* This file contains the definitions and documentation for the common
2 tree codes used in the GNU C and C++ compilers (see c-common.def
3 for the standard codes).
4 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
5 Written by Benjamin Chelf (chelf@codesourcery.com).
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 #include "config.h"
25 #include "system.h"
26 #include "tree.h"
27 #include "function.h"
28 #include "splay-tree.h"
29 #include "varray.h"
30 #include "c-common.h"
31 #include "except.h"
32 #include "toplev.h"
33 #include "flags.h"
34 #include "ggc.h"
35 #include "rtl.h"
36 #include "output.h"
37 #include "timevar.h"
39 /* If non-NULL, the address of a language-specific function for
40 expanding statements. */
41 void (*lang_expand_stmt) PARAMS ((tree));
43 /* If non-NULL, the address of a language-specific function for
44 expanding a DECL_STMT. After the language-independent cases are
45 handled, this function will be called. If this function is not
46 defined, it is assumed that declarations other than those for
47 variables and labels do not require any RTL generation. */
48 void (*lang_expand_decl_stmt) PARAMS ((tree));
50 static tree prune_unused_decls PARAMS ((tree *, int *, void *));
52 /* Create an empty statement tree rooted at T. */
54 void
55 begin_stmt_tree (t)
56 tree *t;
58 /* We create a trivial EXPR_STMT so that last_tree is never NULL in
59 what follows. We remove the extraneous statement in
60 finish_stmt_tree. */
61 *t = build_nt (EXPR_STMT, void_zero_node);
62 last_tree = *t;
63 last_expr_type = NULL_TREE;
66 /* T is a statement. Add it to the statement-tree. */
68 tree
69 add_stmt (t)
70 tree t;
72 /* Add T to the statement-tree. */
73 TREE_CHAIN (last_tree) = t;
74 last_tree = t;
75 /* When we expand a statement-tree, we must know whether or not the
76 statements are full-expresions. We record that fact here. */
77 STMT_IS_FULL_EXPR_P (last_tree) = stmts_are_full_exprs_p ();
79 /* Keep track of the number of statements in this function. */
80 if (current_function_decl)
81 ++DECL_NUM_STMTS (current_function_decl);
83 return t;
86 /* Create a declaration statement for the declaration given by the
87 DECL. */
89 void
90 add_decl_stmt (decl)
91 tree decl;
93 tree decl_stmt;
95 /* We need the type to last until instantiation time. */
96 decl_stmt = build_stmt (DECL_STMT, decl);
97 add_stmt (decl_stmt);
100 /* Add a scope-statement to the statement-tree. BEGIN_P indicates
101 whether this statements opens or closes a scope. PARTIAL_P is true
102 for a partial scope, i.e, the scope that begins after a label when
103 an object that needs a cleanup is created. If BEGIN_P is nonzero,
104 returns a new TREE_LIST representing the top of the SCOPE_STMT
105 stack. The TREE_PURPOSE is the new SCOPE_STMT. If BEGIN_P is
106 zero, returns a TREE_LIST whose TREE_VALUE is the new SCOPE_STMT,
107 and whose TREE_PURPOSE is the matching SCOPE_STMT iwth
108 SCOPE_BEGIN_P set. */
110 tree
111 add_scope_stmt (begin_p, partial_p)
112 int begin_p;
113 int partial_p;
115 tree ss;
116 tree top;
118 /* Build the statement. */
119 ss = build_stmt (SCOPE_STMT, NULL_TREE);
120 SCOPE_BEGIN_P (ss) = begin_p;
121 SCOPE_PARTIAL_P (ss) = partial_p;
123 /* Keep the scope stack up to date. */
124 if (begin_p)
126 *current_scope_stmt_stack ()
127 = tree_cons (ss, NULL_TREE, *current_scope_stmt_stack ());
128 top = *current_scope_stmt_stack ();
130 else
132 top = *current_scope_stmt_stack ();
133 TREE_VALUE (top) = ss;
134 *current_scope_stmt_stack () = TREE_CHAIN (top);
137 /* Add the new statement to the statement-tree. */
138 add_stmt (ss);
140 return top;
143 /* Remove declarations of internal variables that are not used from a
144 stmt tree. To qualify, the variable must have a name and must have
145 a zero DECL_SOURCE_LINE. We tried to remove all variables for
146 which TREE_USED was false, but it turns out that there's tons of
147 variables for which TREE_USED is false but that are still in fact
148 used. */
150 static tree
151 prune_unused_decls (tp, walk_subtrees, data)
152 tree *tp;
153 int *walk_subtrees ATTRIBUTE_UNUSED;
154 void *data ATTRIBUTE_UNUSED;
156 tree t = *tp;
158 if (t == NULL_TREE)
160 *walk_subtrees = 0;
161 return NULL_TREE;
164 if (TREE_CODE (t) == DECL_STMT)
166 tree d = DECL_STMT_DECL (t);
167 if (!TREE_USED (d) && DECL_NAME (d) && DECL_SOURCE_LINE (d) == 0)
169 *tp = TREE_CHAIN (t);
170 /* Recurse on the new value of tp, otherwise we will skip
171 the next statement. */
172 return prune_unused_decls (tp, walk_subtrees, data);
175 else if (TREE_CODE (t) == SCOPE_STMT)
177 /* Remove all unused decls from the BLOCK of this SCOPE_STMT. */
178 tree block = SCOPE_STMT_BLOCK (t);
180 if (block)
182 tree *vp;
184 for (vp = &BLOCK_VARS (block); *vp; )
186 tree v = *vp;
187 if (! TREE_USED (v) && DECL_NAME (v) && DECL_SOURCE_LINE (v) == 0)
188 *vp = TREE_CHAIN (v); /* drop */
189 else
190 vp = &TREE_CHAIN (v); /* advance */
192 /* If there are now no variables, the entire BLOCK can be dropped.
193 (This causes SCOPE_NULLIFIED_P (t) to be true.) */
194 if (BLOCK_VARS (block) == NULL_TREE)
195 SCOPE_STMT_BLOCK (t) = NULL_TREE;
198 return NULL_TREE;
201 /* Finish the statement tree rooted at T. */
203 void
204 finish_stmt_tree (t)
205 tree *t;
207 tree stmt;
209 /* Remove the fake extra statement added in begin_stmt_tree. */
210 stmt = TREE_CHAIN (*t);
211 *t = stmt;
212 last_tree = NULL_TREE;
214 /* Remove unused decls from the stmt tree. */
215 walk_stmt_tree (t, prune_unused_decls, NULL);
217 if (cfun && stmt)
219 /* The line-number recorded in the outermost statement in a function
220 is the line number of the end of the function. */
221 STMT_LINENO (stmt) = lineno;
222 STMT_LINENO_FOR_FN_P (stmt) = 1;
226 /* Build a generic statement based on the given type of node and
227 arguments. Similar to `build_nt', except that we set
228 STMT_LINENO to be the current line number. */
229 /* ??? This should be obsolete with the lineno_stmt productions
230 in the grammar. */
232 tree
233 build_stmt VPARAMS ((enum tree_code code, ...))
235 #ifndef ANSI_PROTOTYPES
236 enum tree_code code;
237 #endif
238 va_list p;
239 register tree t;
240 register int length;
241 register int i;
243 VA_START (p, code);
245 #ifndef ANSI_PROTOTYPES
246 code = va_arg (p, enum tree_code);
247 #endif
249 t = make_node (code);
250 length = TREE_CODE_LENGTH (code);
251 STMT_LINENO (t) = lineno;
253 for (i = 0; i < length; i++)
254 TREE_OPERAND (t, i) = va_arg (p, tree);
256 va_end (p);
257 return t;
260 /* Some statements, like for-statements or if-statements, require a
261 condition. This condition can be a declaration. If T is such a
262 declaration it is processed, and an expression appropriate to use
263 as the condition is returned. Otherwise, T itself is returned. */
265 tree
266 expand_cond (t)
267 tree t;
269 if (t && TREE_CODE (t) == TREE_LIST)
271 expand_stmt (TREE_PURPOSE (t));
272 return TREE_VALUE (t);
274 else
275 return t;
278 /* Create RTL for the local static variable DECL. */
280 void
281 make_rtl_for_local_static (decl)
282 tree decl;
284 const char *asmspec = NULL;
286 /* If we inlined this variable, we could see it's declaration
287 again. */
288 if (TREE_ASM_WRITTEN (decl))
289 return;
291 /* If the DECL_ASSEMBLER_NAME is not the same as the DECL_NAME, then
292 either we already created RTL for this DECL (and since it was a
293 local variable, its DECL_ASSEMBLER_NAME got hacked up to prevent
294 clashes with other local statics with the same name by a previous
295 call to make_decl_rtl), or the user explicitly requested a
296 particular assembly name for this variable, using the GNU
297 extension for this purpose:
299 int i asm ("j");
301 There's no way to know which case we're in, here. But, it turns
302 out we're safe. If there's already RTL, then
303 rest_of_decl_compilation ignores the ASMSPEC parameter, so we
304 may as well not pass it in. If there isn't RTL, then we didn't
305 already create RTL, which means that the modification to
306 DECL_ASSEMBLER_NAME came only via the explicit extension. */
307 if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)
308 && !DECL_RTL (decl))
309 asmspec = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
311 rest_of_decl_compilation (decl, asmspec, /*top_level=*/0, /*at_end=*/0);
314 /* Let the back-end know about DECL. */
316 void
317 emit_local_var (decl)
318 tree decl;
320 /* Create RTL for this variable. */
321 if (!DECL_RTL_SET_P (decl))
323 if (DECL_C_HARD_REGISTER (decl))
324 /* The user specified an assembler name for this variable.
325 Set that up now. */
326 rest_of_decl_compilation
327 (decl, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)),
328 /*top_level=*/0, /*at_end=*/0);
329 else
330 expand_decl (decl);
333 /* Actually do the initialization. */
334 if (stmts_are_full_exprs_p ())
335 expand_start_target_temps ();
337 expand_decl_init (decl);
339 if (stmts_are_full_exprs_p ())
340 expand_end_target_temps ();
343 /* Helper for generating the RTL at the beginning of a scope. */
345 void
346 genrtl_do_pushlevel ()
348 emit_line_note (input_filename, lineno);
349 clear_last_expr ();
352 /* Generate the RTL for DESTINATION, which is a GOTO_STMT. */
354 void
355 genrtl_goto_stmt (destination)
356 tree destination;
358 if (TREE_CODE (destination) == IDENTIFIER_NODE)
359 abort ();
361 /* We warn about unused labels with -Wunused. That means we have to
362 mark the used labels as used. */
363 if (TREE_CODE (destination) == LABEL_DECL)
364 TREE_USED (destination) = 1;
366 emit_line_note (input_filename, lineno);
368 if (TREE_CODE (destination) == LABEL_DECL)
370 label_rtx (destination);
371 expand_goto (destination);
373 else
374 expand_computed_goto (destination);
377 /* Generate the RTL for EXPR, which is an EXPR_STMT. */
379 void
380 genrtl_expr_stmt (expr)
381 tree expr;
383 if (expr != NULL_TREE)
385 emit_line_note (input_filename, lineno);
387 if (stmts_are_full_exprs_p ())
388 expand_start_target_temps ();
390 if (expr != error_mark_node)
391 expand_expr_stmt (expr);
393 if (stmts_are_full_exprs_p ())
394 expand_end_target_temps ();
398 /* Generate the RTL for T, which is a DECL_STMT. */
400 void
401 genrtl_decl_stmt (t)
402 tree t;
404 tree decl;
405 emit_line_note (input_filename, lineno);
406 decl = DECL_STMT_DECL (t);
407 /* If this is a declaration for an automatic local
408 variable, initialize it. Note that we might also see a
409 declaration for a namespace-scope object (declared with
410 `extern'). We don't have to handle the initialization
411 of those objects here; they can only be declarations,
412 rather than definitions. */
413 if (TREE_CODE (decl) == VAR_DECL
414 && !TREE_STATIC (decl)
415 && !DECL_EXTERNAL (decl))
417 /* Let the back-end know about this variable. */
418 if (!anon_aggr_type_p (TREE_TYPE (decl)))
419 emit_local_var (decl);
420 else
421 expand_anon_union_decl (decl, NULL_TREE,
422 DECL_ANON_UNION_ELEMS (decl));
424 else if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl))
426 if (DECL_ARTIFICIAL (decl) && ! TREE_USED (decl))
427 /* Do not emit unused decls. This is not just an
428 optimization. We really do not want to emit
429 __PRETTY_FUNCTION__ etc, if they're never used. */
430 DECL_IGNORED_P (decl) = 1;
431 else
432 make_rtl_for_local_static (decl);
434 else if (TREE_CODE (decl) == LABEL_DECL
435 && C_DECLARED_LABEL_FLAG (decl))
436 declare_nonlocal_label (decl);
437 else if (lang_expand_decl_stmt)
438 (*lang_expand_decl_stmt) (t);
441 /* Generate the RTL for T, which is an IF_STMT. */
443 void
444 genrtl_if_stmt (t)
445 tree t;
447 tree cond;
448 genrtl_do_pushlevel ();
449 cond = expand_cond (IF_COND (t));
450 emit_line_note (input_filename, lineno);
451 expand_start_cond (cond, 0);
452 if (THEN_CLAUSE (t))
453 expand_stmt (THEN_CLAUSE (t));
454 if (ELSE_CLAUSE (t))
456 expand_start_else ();
457 expand_stmt (ELSE_CLAUSE (t));
459 expand_end_cond ();
462 /* Generate the RTL for T, which is a WHILE_STMT. */
464 void
465 genrtl_while_stmt (t)
466 tree t;
468 tree cond;
469 emit_nop ();
470 emit_line_note (input_filename, lineno);
471 expand_start_loop (1);
472 genrtl_do_pushlevel ();
474 cond = expand_cond (WHILE_COND (t));
475 emit_line_note (input_filename, lineno);
476 expand_exit_loop_if_false (0, cond);
477 genrtl_do_pushlevel ();
479 expand_stmt (WHILE_BODY (t));
481 expand_end_loop ();
484 /* Generate the RTL for T, which is a DO_STMT. */
486 void
487 genrtl_do_stmt (t)
488 tree t;
490 tree cond = DO_COND (t);
492 /* Recognize the common special-case of do { ... } while (0) and do
493 not emit the loop widgetry in this case. In particular this
494 avoids cluttering the rtl with dummy loop notes, which can affect
495 alignment of adjacent labels. */
496 if (integer_zerop (cond))
498 expand_start_null_loop ();
499 expand_stmt (DO_BODY (t));
500 expand_end_null_loop ();
502 else
504 emit_nop ();
505 emit_line_note (input_filename, lineno);
506 expand_start_loop_continue_elsewhere (1);
508 expand_stmt (DO_BODY (t));
510 expand_loop_continue_here ();
511 cond = expand_cond (cond);
512 emit_line_note (input_filename, lineno);
513 expand_exit_loop_if_false (0, cond);
514 expand_end_loop ();
518 /* Build the node for a return statement and return it. */
520 tree
521 build_return_stmt (expr)
522 tree expr;
524 return (build_stmt (RETURN_STMT, expr));
527 /* Generate the RTL for STMT, which is a RETURN_STMT. */
529 void
530 genrtl_return_stmt (stmt)
531 tree stmt;
533 tree expr = RETURN_EXPR (stmt);
535 emit_line_note (input_filename, lineno);
536 if (!expr)
537 expand_null_return ();
538 else
540 expand_start_target_temps ();
541 expand_return (expr);
542 expand_end_target_temps ();
546 /* Generate the RTL for T, which is a FOR_STMT. */
548 void
549 genrtl_for_stmt (t)
550 tree t;
552 tree cond;
553 const char *saved_filename;
554 int saved_lineno;
556 if (NEW_FOR_SCOPE_P (t))
557 genrtl_do_pushlevel ();
559 expand_stmt (FOR_INIT_STMT (t));
561 /* Expand the initialization. */
562 emit_nop ();
563 emit_line_note (input_filename, lineno);
564 expand_start_loop_continue_elsewhere (1);
565 genrtl_do_pushlevel ();
566 cond = expand_cond (FOR_COND (t));
568 /* Save the filename and line number so that we expand the FOR_EXPR
569 we can reset them back to the saved values. */
570 saved_filename = input_filename;
571 saved_lineno = lineno;
573 /* Expand the condition. */
574 emit_line_note (input_filename, lineno);
575 if (cond)
576 expand_exit_loop_if_false (0, cond);
578 /* Expand the body. */
579 genrtl_do_pushlevel ();
580 expand_stmt (FOR_BODY (t));
582 /* Expand the increment expression. */
583 input_filename = saved_filename;
584 lineno = saved_lineno;
585 emit_line_note (input_filename, lineno);
586 expand_loop_continue_here ();
587 if (FOR_EXPR (t))
588 genrtl_expr_stmt (FOR_EXPR (t));
589 expand_end_loop ();
592 /* Build a break statement node and return it. */
594 tree
595 build_break_stmt ()
597 return (build_stmt (BREAK_STMT));
600 /* Generate the RTL for a BREAK_STMT. */
602 void
603 genrtl_break_stmt ()
605 emit_line_note (input_filename, lineno);
606 if ( ! expand_exit_something ())
607 error ("break statement not within loop or switch");
610 /* Build a continue statement node and return it. */
612 tree
613 build_continue_stmt ()
615 return (build_stmt (CONTINUE_STMT));
618 /* Generate the RTL for a CONTINUE_STMT. */
620 void
621 genrtl_continue_stmt ()
623 emit_line_note (input_filename, lineno);
624 if (! expand_continue_loop (0))
625 error ("continue statement not within a loop");
628 /* Generate the RTL for T, which is a SCOPE_STMT. */
630 void
631 genrtl_scope_stmt (t)
632 tree t;
634 tree block = SCOPE_STMT_BLOCK (t);
636 if (!SCOPE_NO_CLEANUPS_P (t))
638 if (SCOPE_BEGIN_P (t))
639 expand_start_bindings_and_block (2 * SCOPE_NULLIFIED_P (t), block);
640 else if (SCOPE_END_P (t))
641 expand_end_bindings (NULL_TREE, !SCOPE_NULLIFIED_P (t), 0);
643 else if (!SCOPE_NULLIFIED_P (t))
645 rtx note = emit_note (NULL,
646 (SCOPE_BEGIN_P (t)
647 ? NOTE_INSN_BLOCK_BEG
648 : NOTE_INSN_BLOCK_END));
649 NOTE_BLOCK (note) = block;
652 /* If we're at the end of a scope that contains inlined nested
653 functions, we have to decide whether or not to write them out. */
654 if (block && SCOPE_END_P (t))
656 tree fn;
658 for (fn = BLOCK_VARS (block); fn; fn = TREE_CHAIN (fn))
660 if (TREE_CODE (fn) == FUNCTION_DECL
661 && DECL_CONTEXT (fn) == current_function_decl
662 && !TREE_ASM_WRITTEN (fn)
663 && TREE_ADDRESSABLE (fn))
665 push_function_context ();
666 output_inline_function (fn);
667 pop_function_context ();
673 /* Generate the RTL for T, which is a SWITCH_STMT. */
675 void
676 genrtl_switch_stmt (t)
677 tree t;
679 tree cond;
680 genrtl_do_pushlevel ();
682 cond = expand_cond (SWITCH_COND (t));
683 if (cond == error_mark_node)
684 /* The code is in error, but we don't want expand_end_case to
685 crash. */
686 cond = boolean_false_node;
688 emit_line_note (input_filename, lineno);
689 expand_start_case (1, cond, TREE_TYPE (cond), "switch statement");
690 expand_stmt (SWITCH_BODY (t));
691 expand_end_case (cond);
694 /* Create a CASE_LABEL tree node and return it. */
696 tree
697 build_case_label (low_value, high_value, label_decl)
698 tree low_value;
699 tree high_value;
700 tree label_decl;
702 return build_stmt (CASE_LABEL, low_value, high_value, label_decl);
706 /* Generate the RTL for a CASE_LABEL. */
708 void
709 genrtl_case_label (case_label)
710 tree case_label;
712 tree duplicate;
713 tree cleanup;
715 cleanup = last_cleanup_this_contour ();
716 if (cleanup)
718 static int explained = 0;
719 warning_with_decl (TREE_PURPOSE (cleanup),
720 "destructor needed for `%#D'");
721 warning ("where case label appears here");
722 if (!explained)
724 warning ("(enclose actions of previous case statements requiring destructors in their own scope.)");
725 explained = 1;
729 add_case_node (CASE_LOW (case_label), CASE_HIGH (case_label),
730 CASE_LABEL_DECL (case_label), &duplicate);
733 /* Generate the RTL for T, which is a COMPOUND_STMT. */
735 void
736 genrtl_compound_stmt (t)
737 tree t;
739 expand_stmt (COMPOUND_BODY (t));
742 /* Generate the RTL for an ASM_STMT. */
744 void
745 genrtl_asm_stmt (cv_qualifier, string, output_operands,
746 input_operands, clobbers, asm_input_p)
747 tree cv_qualifier;
748 tree string;
749 tree output_operands;
750 tree input_operands;
751 tree clobbers;
752 int asm_input_p;
754 if (cv_qualifier != NULL_TREE
755 && cv_qualifier != ridpointers[(int) RID_VOLATILE])
757 warning ("%s qualifier ignored on asm",
758 IDENTIFIER_POINTER (cv_qualifier));
759 cv_qualifier = NULL_TREE;
762 emit_line_note (input_filename, lineno);
763 if (asm_input_p)
764 expand_asm (string);
765 else
766 c_expand_asm_operands (string, output_operands, input_operands,
767 clobbers, cv_qualifier != NULL_TREE,
768 input_filename, lineno);
771 /* Generate the RTL for a DECL_CLEANUP. */
773 void
774 genrtl_decl_cleanup (decl, cleanup)
775 tree decl;
776 tree cleanup;
778 if (!decl || (DECL_SIZE (decl) && TREE_TYPE (decl) != error_mark_node))
779 expand_decl_cleanup (decl, cleanup);
782 /* We're about to expand T, a statement. Set up appropriate context
783 for the substitution. */
785 void
786 prep_stmt (t)
787 tree t;
789 if (!STMT_LINENO_FOR_FN_P (t))
790 lineno = STMT_LINENO (t);
791 current_stmt_tree ()->stmts_are_full_exprs_p = STMT_IS_FULL_EXPR_P (t);
794 /* Generate the RTL for the statement T, its substatements, and any
795 other statements at its nesting level. */
797 void
798 expand_stmt (t)
799 tree t;
801 while (t && t != error_mark_node)
803 int saved_stmts_are_full_exprs_p;
805 /* Set up context appropriately for handling this statement. */
806 saved_stmts_are_full_exprs_p = stmts_are_full_exprs_p ();
807 prep_stmt (t);
809 switch (TREE_CODE (t))
811 case RETURN_STMT:
812 genrtl_return_stmt (t);
813 break;
815 case EXPR_STMT:
816 genrtl_expr_stmt (EXPR_STMT_EXPR (t));
817 break;
819 case DECL_STMT:
820 genrtl_decl_stmt (t);
821 break;
823 case FOR_STMT:
824 genrtl_for_stmt (t);
825 break;
827 case WHILE_STMT:
828 genrtl_while_stmt (t);
829 break;
831 case DO_STMT:
832 genrtl_do_stmt (t);
833 break;
835 case IF_STMT:
836 genrtl_if_stmt (t);
837 break;
839 case COMPOUND_STMT:
840 genrtl_compound_stmt (t);
841 break;
843 case BREAK_STMT:
844 genrtl_break_stmt ();
845 break;
847 case CONTINUE_STMT:
848 genrtl_continue_stmt ();
849 break;
851 case SWITCH_STMT:
852 genrtl_switch_stmt (t);
853 break;
855 case CASE_LABEL:
856 genrtl_case_label (t);
857 break;
859 case LABEL_STMT:
860 expand_label (LABEL_STMT_LABEL (t));
861 break;
863 case GOTO_STMT:
864 genrtl_goto_stmt (GOTO_DESTINATION (t));
865 break;
867 case ASM_STMT:
868 genrtl_asm_stmt (ASM_CV_QUAL (t), ASM_STRING (t),
869 ASM_OUTPUTS (t), ASM_INPUTS (t),
870 ASM_CLOBBERS (t), ASM_INPUT_P (t));
871 break;
873 case SCOPE_STMT:
874 genrtl_scope_stmt (t);
875 break;
877 default:
878 if (lang_expand_stmt)
879 (*lang_expand_stmt) (t);
880 else
881 abort ();
882 break;
885 /* Restore saved state. */
886 current_stmt_tree ()->stmts_are_full_exprs_p =
887 saved_stmts_are_full_exprs_p;
889 /* Go on to the next statement in this scope. */
890 t = TREE_CHAIN (t);