public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Tweek lower_try_finally
@ 2009-10-21  0:10 Richard Henderson
  0 siblings, 0 replies; only message in thread
From: Richard Henderson @ 2009-10-21  0:10 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

Found by inspection:

By separating emit_post_landing_pad from the insertion of the code 
that's to follow the landing pad, we risk another landing pad being 
dropped in between.

I don't have a test case for this.  All of the other instances are correct.


r~

[-- Attachment #2: z --]
[-- Type: text/plain, Size: 696 bytes --]

        * tree-eh.c (lower_try_finally_copy): Do lower_eh_constructs_1
        before emit_post_landing_pad.


diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index c077d94..56b1b94 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -1192,12 +1192,11 @@ lower_try_finally_copy (struct leh_state *state, struct leh_tf_state *tf)
 
   if (tf->may_throw)
     {
-      emit_post_landing_pad (&eh_seq, tf->region);
-
       seq = lower_try_finally_dup_block (finally, state);
       lower_eh_constructs_1 (state, seq);
-      gimple_seq_add_seq (&eh_seq, seq);
 
+      emit_post_landing_pad (&eh_seq, tf->region);
+      gimple_seq_add_seq (&eh_seq, seq);
       emit_resx (&eh_seq, tf->region);
     }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-20 22:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-21  0:10 Tweek lower_try_finally Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).