Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flang/lib/Parser/prescan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ const char *Prescanner::FreeFormContinuationLine(bool ampersand) {
if (p >= limit_) {
return nullptr;
}
p = SkipWhiteSpace(p);
p = SkipWhiteSpaceIncludingEmptyMacros(p);
if (*p == '!') {
++p;
if (InCompilerDirective()) {
Expand Down
9 changes: 9 additions & 0 deletions flang/test/Preprocessing/directive-contin-with-pp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define COMMENT !
#define OMP_START !$omp
#define OMP_CONT !$omp&
#define EMPTY

module m
contains
Expand Down Expand Up @@ -50,6 +51,11 @@ subroutine s1(x1, x2, x3, x4, x5, x6, x7)
OMP_CONT reduction(+:x)
do j3 = 1, n
end do

EMPTY !$omp parallel &
EMPTY !$omp do
do j4 = 1, n
end do
end

COMMENT &
Expand Down Expand Up @@ -79,6 +85,9 @@ subroutine s3
!CHECK: !$OMP PARALLEL DO REDUCTION(+: x)
!CHECK: DO j3=1_4,n
!CHECK: END DO
!CHECK: !$OMP PARALLEL DO
!CHECK: DO j4=1_4,n
!CHECK: END DO
!CHECK: END SUBROUTINE
!CHECK: SUBROUTINE s2
!CHECK: END SUBROUTINE
Expand Down
Loading