[Bug c/42979] OpenMP #pragma omp taskwait after a label is not permitted - should fail at compile time
gang.chen.5i5j at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Nov 21 13:34:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42979
--- Comment #3 from Chen Gang <gang.chen.5i5j at gmail dot com> ---
For "The taskwait directive may not be used in place of the statement following
an if, while, do, switch, or label."
if "if, while, do, switch, or label" is just flowed with a code block which let
"#pragma omp taskwait" as its first statement. Should compiler also report
error? (I guess not), e.g.
#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;
}
More information about the Gcc-bugs
mailing list