diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-11-28 22:04:10 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-11-28 22:04:10 +0100 |
commit | d3b623c7af627ec5d0fbd14d94a115b6cac0e501 (patch) | |
tree | a4a2a1f055eac32ee0a3108718f4b2ae49a28834 /gcc | |
parent | 8c29866f7fab248c5f3bfba80399c2f462236f2a (diff) | |
download | gcc-d3b623c7af627ec5d0fbd14d94a115b6cac0e501.zip gcc-d3b623c7af627ec5d0fbd14d94a115b6cac0e501.tar.gz gcc-d3b623c7af627ec5d0fbd14d94a115b6cac0e501.tar.bz2 |
re PR middle-end/50907 (EDGE_CROSSING incorrectly set across same section with -freorder-blocks-and-partition -fPIC -fprofile-use)
PR middle-end/50907
* function.c (convert_jumps_to_returns): When redirecting an edge
succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag.
* gcc.dg/tree-prof/pr50907.c: New test.
From-SVN: r181787
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/function.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/pr50907.c | 5 |
4 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c66ec82..8b978c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2011-11-28 Jakub Jelinek <jakub@redhat.com> + PR middle-end/50907 + * function.c (convert_jumps_to_returns): When redirecting an edge + succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag. + PR tree-optimization/50078 * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Copy over TREE_THIS_VOLATILE also from the old to new lhs resp. rhs. diff --git a/gcc/function.c b/gcc/function.c index 664858a..6cf67c0 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5670,6 +5670,7 @@ convert_jumps_to_returns (basic_block last_bb, bool simple_p, /* Fix up the CFG for the successful change we just made. */ redirect_edge_succ (e, EXIT_BLOCK_PTR); + e->flags &= ~EDGE_CROSSING; } VEC_free (basic_block, heap, src_bbs); return unconverted; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ee4a714..5a9275c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2011-11-28 Jakub Jelinek <jakub@redhat.com> + PR middle-end/50907 + * gcc.dg/tree-prof/pr50907.c: New test. + PR tree-optimization/50078 * gcc.dg/pr50078.c: New test. diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr50907.c b/gcc/testsuite/gcc.dg/tree-prof/pr50907.c new file mode 100644 index 0000000..2ba26e3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/pr50907.c @@ -0,0 +1,5 @@ +/* PR middle-end/50907 */ +/* { dg-require-effective-target freorder } */ +/* { dg-options "-O -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling -fpic" { target { { powerpc*-*-* ia64-*-* x86_64-*-* } && fpic } } } */ + +#include "pr45354.c" |