summaryrefslogtreecommitdiff
path: root/gcc/tree-mudflap.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-10 13:48:06 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-10 13:48:06 +0000
commitc86f4c75645cdd38254700ada0b489d1ee20856b (patch)
treee3cef0d637251bfd1b08fca99c3e0bf451588bd0 /gcc/tree-mudflap.c
parentad1c08ca13ac0f611cf5536581acde09eb2a9688 (diff)
downloadgcc-c86f4c75645cdd38254700ada0b489d1ee20856b.tar.gz
PR middle-end/35314
* tree-mudflap.c (mf_build_check_statement_for): Split then_block after __mf_check call if the call must end a bb. * testsuite/libmudflap.c/pass67-frag.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141741 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-mudflap.c')
-rw-r--r--gcc/tree-mudflap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index 0b3eba5ddad..831fcc1791a 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -669,6 +669,15 @@ mf_build_check_statement_for (tree base, tree limit,
if (! flag_mudflap_threads)
{
+ if (stmt_ends_bb_p (g))
+ {
+ gsi = gsi_start_bb (then_bb);
+ gsi_insert_seq_after (&gsi, seq, GSI_CONTINUE_LINKING);
+ e = split_block (then_bb, g);
+ then_bb = e->dest;
+ seq = gimple_seq_alloc ();
+ }
+
g = gimple_build_assign (mf_cache_shift_decl_l, mf_cache_shift_decl);
gimple_seq_add_stmt (&seq, g);