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); }