Previously, loop constructs were parsed in a piece-wise manner: the begin directive, the body, and the end directive were parsed separately. Later on in canonicalization they were all coalesced into a loop construct. To facilitate that end-loop directives were given a special treatment, namely they were parsed as OpenMP constructs. As a result syntax errors caused by misplaced end-loop directives were handled differently from those cause by misplaced non-loop end directives. The new loop nest parser constructs the complete loop construct, removing the need for the canonicalization step. Additionally, it is the basis for parsing loop-sequence-associated constructs in the future. It also removes the need for the special treatment of end-loop directives. While this patch temporarily degrades the error messaging for misplaced end-loop directives, it enables uniform handling of any misplaced end-directives in the future.
12 lines
196 B
Fortran
12 lines
196 B
Fortran
! RUN: not %flang_fc1 -fsyntax-only -fopenmp %s 2>&1 | FileCheck %s
|
|
|
|
! CHECK: error:
|
|
!$omp fuse looprange
|
|
|
|
! CHECK: error:
|
|
!$omp fuse looprange(1)
|
|
|
|
! CHECK: error:
|
|
!$omp fuse looprange(1,2,3)
|
|
end
|