diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-19 17:49:46 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-19 17:49:46 +0000 |
commit | b3a3ddece257f50649db88afb8e2248d91fa883b (patch) | |
tree | c47ee4cdc097d5f98d818d66731d4ecf07beeff8 /gcc/testsuite/gcc.dg/gomp | |
parent | f503118e3c5cee82ad9a2d58f5c6848faaaf4c9a (diff) | |
download | gcc-b3a3ddece257f50649db88afb8e2248d91fa883b.tar.gz |
PR gcov-profile/34610
* tree-cfg.c (make_edges): Mark both outgoing edges from
OMP_CONTINUE and from OMP_FOR as EDGE_ABNORMAL.
* omp-low.c (expand_omp_for): Clear EDGE_ABNORMAL bits
from OMP_FOR and OMP_CONTINUE outgoing edges.
* tree-profile.c (tree_profiling): Return early if
cfun->after_tree_profile != 0. Set cfun->after_tree_profile
at the end.
* omp-low.c (expand_omp_parallel): Copy after_tree_profile
from cfun to child_cfun.
* function.h (struct function): Add after_tree_profile bit.
* gcc.dg/gomp/pr34610.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131653 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp')
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/pr34610.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/pr34610.c b/gcc/testsuite/gcc.dg/gomp/pr34610.c new file mode 100644 index 00000000000..95353a5625e --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr34610.c @@ -0,0 +1,30 @@ +/* PR gcov-profile/34610 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fprofile-arcs -fopenmp" } */ + +extern void bar (int); +extern void baz (int) __attribute__((noreturn)); + +void +foo (int k) +{ + int i; +#pragma omp for schedule(dynamic) + for (i = 0; i < 10; ++i) + bar (i); +#pragma omp parallel for schedule(static) + for (i = 0; i < 10; ++i) + bar (i); +#pragma omp parallel for schedule(static, 4) + for (i = 0; i < 10; ++i) + bar (i); + if (k) + #pragma omp for schedule(dynamic) + for (i = 0; i < 10; ++i) + baz (i); +#pragma omp parallel + for (i = 0; i < 10; ++i) + bar (i); +} + +/* { dg-final { cleanup-coverage-files } } */ |