File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ bool Prescanner::MustSkipToEndOfLine() const {
564564 return true ; // skip over ignored columns in right margin (73:80)
565565 } else if (*at_ == ' !' && !inCharLiteral_ &&
566566 (!inFixedForm_ || tabInCurrentLine_ || column_ != 6 )) {
567- return !IsCompilerDirectiveSentinel (at_);
567+ return !IsCompilerDirectiveSentinel (at_ + 1 );
568568 } else {
569569 return false ;
570570 }
Original file line number Diff line number Diff line change 1+ !mod $ v1 sum: 17 d756d2fb56521c
2+ module m
3+ contains
4+ sub routine func1(foo)
5+ real(2 ):: foo
6+ ! dir$ ignore_tkr(d) foo
7+ end
8+ sub routine func3(foo)
9+ real(2 ):: foo
10+ ! dir$ ignore_tkr(d) foo
11+ end
12+ sub routine func4(foo)
13+ real(2 ):: foo
14+ ! dir$ ignore_tkr(d) foo
15+ end
16+ end
Original file line number Diff line number Diff line change 1+ module m
2+ contains
3+
4+ ! Directive inside macro on same line; works
5+ #define MACRO(X) subroutine func1(X); real(2) :: X; !dir$ ignore_tkr(d) X; end subroutine func1;
6+ MACRO(foo)
7+
8+ ! Same subroutine, but after preprocessor expansion (-e -fno-reformat); syntax error
9+ ! subroutine func2(foo); real(2) :: foo; !dir$ ignore_tkr(d) foo; end subroutine func2;
10+
11+ ! Parses with line wrap before !dir$
12+ subroutine func3 (foo ); real (2 ) :: foo;
13+ ! dir$ ignore_tkr(d) foo; end subroutine func3;
14+
15+ ! Parses with line wrap after !dir$, but swallows the directive
16+ subroutine func4 (foo ); real (2 ) :: foo; ! dir$ ignore_tkr(d) foo;
17+ end subroutine func4 ;
18+
19+ end module
You can’t perform that action at this time.
0 commit comments