diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-10 13:48:06 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-10 13:48:06 +0000 |
commit | c86f4c75645cdd38254700ada0b489d1ee20856b (patch) | |
tree | e3cef0d637251bfd1b08fca99c3e0bf451588bd0 | |
parent | ad1c08ca13ac0f611cf5536581acde09eb2a9688 (diff) | |
download | gcc-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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-mudflap.c | 9 | ||||
-rw-r--r-- | libmudflap/ChangeLog | 5 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c/pass67-frag.c | 14 |
4 files changed, 34 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 62f857f4aa6..d3ad211876a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-11-10 Jakub Jelinek <jakub@redhat.com> + + 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. + 2008-11-10 Ralph Loader <suckfish@ihug.co.nz> PR middle-end/37807 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); diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 9214759b304..208ab8fb99b 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,8 @@ +2008-11-10 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/35314 + * testsuite/libmudflap.c/pass67-frag.c: New test. + 2008-10-09 Jakub Jelinek <jakub@redhat.com> PR c++/37568 diff --git a/libmudflap/testsuite/libmudflap.c/pass67-frag.c b/libmudflap/testsuite/libmudflap.c/pass67-frag.c new file mode 100644 index 00000000000..0c2f81a1705 --- /dev/null +++ b/libmudflap/testsuite/libmudflap.c/pass67-frag.c @@ -0,0 +1,14 @@ +/* PR middle-end/35314 */ +/* { dg-do compile } */ +/* { dg-options "-fmudflap" } */ + +#include <setjmp.h> + +jmp_buf buf; + +void +foo (volatile char *p) +{ + if (__builtin_setjmp (buf)) + *p; +} |