https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100319
Bug ID: 100319 Summary: Incorrect check for detach clause argument in data-sharing clauses Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ typedef enum omp_event_handle_t { __omp_event_handle_t_max__ = __UINTPTR_MAX__ } omp_event_handle_t; extern void omp_fulfill_event (omp_event_handle_t); void f (omp_event_handle_t x, omp_event_handle_t y, int z) { #pragma omp task detach (x) firstprivate (y, z) /* { dg-bogus "the event handle of a 'detach' clause should not be in a data-sharing clause" } */ ; #pragma omp task detach (x) shared (y) /* { dg-bogus "the event handle of a 'detach' clause should not be in a data-sharing clause" } */ ; } passes in C but fails in C++.