[Bug c/105536] New: [OpenMP] Bogus "expected ‘concurrent’ before ‘reproducible’"

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 9 16:40:40 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105536

            Bug ID: 105536
           Summary: [OpenMP] Bogus "expected ‘concurrent’ before
                    ‘reproducible’"
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

I think the message shown by C/C++ for the following is bogus:

repro.c:3:23: error: expected ‘concurrent’ before ‘reproducible’
    3 | #pragma omp for order(reproducible)
      |                       ^~~~~~~~~~~~

The standard requires 'order(reproducible:concurrent)' – Thus, I expect *after*
and not *before* in the error message.
Cf. https://www.openmp.org/spec-html/5.1/openmpsu47.html#x72-720002.11.3

void f(void)
{
#pragma omp for order(reproducible)
 for (int i=0; i < 1; i++)
   ;
}


Side remark: Fortran is fine as it gives the following:

    1 | !$omp do order(reproducible)
      |                1
Error: Expected ORDER(CONCURRENT) at (1) with optional ‘reproducible’ or
‘unconstrained’ modifier


More information about the Gcc-bugs mailing list