PR middle-end/14327
* stmt.c (expand_computed_goto): Do do_pending_stack_adjust before
emitting the label, not after.
* gcc.c-torture/execute/
20040302-1.c: New.
From-SVN: r78798
+2004-03-02 Richard Henderson <rth@redhat.com>
+
+ PR middle-end/14327
+ * stmt.c (expand_computed_goto): Do do_pending_stack_adjust before
+ emitting the label, not after.
+
2004-03-02 Stephane Carrez <stcarrez@nerim.fr>
* config/m68hc11/m68hc11.c (m68hc11_addr_mode): New variable.
{
cfun->computed_goto_common_reg = copy_to_mode_reg (Pmode, x);
cfun->computed_goto_common_label = gen_label_rtx ();
- emit_label (cfun->computed_goto_common_label);
do_pending_stack_adjust ();
+ emit_label (cfun->computed_goto_common_label);
emit_indirect_jump (cfun->computed_goto_common_reg);
current_function_has_computed_jump = 1;
--- /dev/null
+int code[]={0,0,0,0,1};
+
+void foo(int x) {
+ volatile int b;
+ b = 0xffffffff;
+}
+
+void bar(int *pc) {
+ static const void *l[] = {&&lab0, &&end};
+
+ foo(0);
+ goto *l[*pc];
+ lab0:
+ foo(0);
+ pc++;
+ goto *l[*pc];
+ end:
+ return;
+}
+
+int main() {
+ bar(code);
+ return 0;
+}