re PR middle-end/66133 (Wrong-code with noreturn #pragma omp task body)
authorJakub Jelinek <jakub@redhat.com>
Wed, 13 May 2015 16:59:20 +0000 (18:59 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 13 May 2015 16:59:20 +0000 (18:59 +0200)
commitb37dddbc771d55d42c25edb0ef4dad663dff21e8
treea98a3f2c207b53f57c6310b769a54c75b47423f1
parent098aac94ef8927e4bd24fc59919e9163057688fa
re PR middle-end/66133 (Wrong-code with noreturn #pragma omp task body)

PR middle-end/66133
* omp-low.c (expand_omp_taskreg): For GIMPLE_OMP_TASK expansion,
make sure it is never noreturn, even when the task body does not
return.
(lower_omp_taskreg): For GIMPLE_OMP_TASK, emit GIMPLE_OMP_CONTINUE
right before GIMPLE_OMP_RETURN.
(make_gimple_omp_edges): Accept GIMPLE_OMP_CONTINUE as ->cont
for GIMPLE_OMP_TASK.  For GIMPLE_OMP_RETURN corresponding to
GIMPLE_OMP_TASK add an EDGE_ABNORMAL edge from entry to exit.

* testsuite/libgomp.c/pr66133.c: New test.

From-SVN: r223171
gcc/ChangeLog
gcc/omp-low.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c/pr66133.c [new file with mode: 0644]