OpenMP #pragma omp taskwait after a label is not permitted - should fail at compile time [Cray Bug 755983]
The test checks that the #pragma omp taskwait may not be used after a label. Currently the GNU gcc compiler fails to produce any error message at compile time. The OpenMP API version 3 (May 2008) p. 68 lines 16-19 state: "The taskwait directive may be placed only at a point where a base language statement is allowed. The taskwait directive may not be used in place of the statement following an if, while, do, switch, or label." $ cat ISU3243.c /* derived from OpenMP test omp3c/Nc03_2_8_4_2e.c */ // REFERENCES OpenMP 3.0, p. 68, lines 16-19 #include <stdio.h> int main(void) { #pragma omp parallel { goto mylabel; mylabel: #pragma omp taskwait ; } fprintf(stderr, "%s:%i: FAIL - negative test case should not compile\n", __FILE__, __LINE__); return 1; } $ gcc --version gcc (GCC) 4.4.3 20100121 (Cray Inc.) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -fopenmp ISU3243.c $ ./a.out ISU3243.c:14: FAIL - negative test case should not compile $ -- Summary: OpenMP #pragma omp taskwait after a label is not permitted - should fail at compile time Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: geir at cray dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42979