This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66133] New: Wrong-code with noreturn #pragma omp task body
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 May 2015 11:43:36 +0000
- Subject: [Bug middle-end/66133] New: Wrong-code with noreturn #pragma omp task body
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66133
Bug ID: 66133
Summary: Wrong-code with noreturn #pragma omp task body
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: jakub at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
When working on #pragma omp taskloop support, I've noticed we handle badly
#pragma omp task constructs if the task's body never returns.
E.g.:
#include <stdlib.h>
#include <unistd.h>
volatile int x;
__attribute__((noinline)) void
foo (void)
{
if (x == 0)
{
#pragma omp task
{
usleep (2000);
exit (0);
}
}
else
abort ();
}
int
main ()
{
#pragma omp parallel num_threads (1)
{
#pragma omp barrier
#pragma omp single
foo ();
}
exit (0);
}