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

            Bug ID: 90365
           Summary: OpenMP default(none) + schedule(dynamic, variable) -
                    difference with clang
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lebedev.ri at gmail dot com
  Target Milestone: ---

void sink();
void test(int chunkSize) {
#pragma omp parallel for default(none) schedule(dynamic, chunkSize)
    for(int i = 0; i < 10; i++)
        sink();
}

clang takes this, gcc does not:
source>: In function 'void test(int)':

<source>:4:5: error: 'chunkSize' not specified in enclosing 'parallel'
    4 |     for(int i = 0; i < 10; i++)
      |     ^~~
<source>:3:9: error: enclosing 'parallel'
    3 | #pragma omp parallel for default(none) schedule(dynamic, chunkSize)
      |         ^~~
Compiler returned: 1

Is the diagnostic correct here?

Reply via email to