File tree Expand file tree Collapse file tree 2 files changed +49
-9
lines changed Expand file tree Collapse file tree 2 files changed +49
-9
lines changed Original file line number Diff line number Diff line change @@ -1177,16 +1177,14 @@ Prescanner::IsFixedFormCompilerDirectiveLine(const char *start) const {
1177
1177
char sentinel[5 ], *sp{sentinel};
1178
1178
int column{2 };
1179
1179
for (; column < 6 ; ++column, ++p) {
1180
- if (*p != ' ' ) {
1181
- if (*p == ' \n ' || *p == ' \t ' ) {
1182
- break ;
1183
- }
1184
- if (sp == sentinel + 1 && sentinel[0 ] == ' $' && IsDecimalDigit (*p)) {
1185
- // OpenMP conditional compilation line: leave the label alone
1186
- break ;
1187
- }
1188
- *sp++ = ToLowerCaseLetter (*p);
1180
+ if (*p == ' ' || *p == ' \n ' || *p == ' \t ' ) {
1181
+ break ;
1182
+ }
1183
+ if (sp == sentinel + 1 && sentinel[0 ] == ' $' && IsDecimalDigit (*p)) {
1184
+ // OpenMP conditional compilation line: leave the label alone
1185
+ break ;
1189
1186
}
1187
+ *sp++ = ToLowerCaseLetter (*p);
1190
1188
}
1191
1189
if (column == 6 ) {
1192
1190
if (*p == ' ' || *p == ' \t ' || *p == ' 0' ) {
Original file line number Diff line number Diff line change
1
+ ! RUN: %flang_fc1 - fopenmp - E %s | FileCheck %s
2
+ ! CHECK: program main
3
+ ! CHECK: interface
4
+ ! CHECK: subroutine sub(a, b)
5
+ ! CHECK:!dir$ ignore_tkr a
6
+ ! CHECK:!dir$ ignore_tkr b
7
+ ! CHECK: real (4 ):: a, b
8
+ ! CHECK: end subroutine
9
+ ! CHECK: end interface
10
+ ! CHECK: PRINT * , " Is ' '"
11
+ ! CHECK: 123 PRINT * , " Is '123 '"
12
+
13
+ !@cuf subroutine atcuf;
14
+ program main
15
+ interface
16
+ subroutine sub (a , b )
17
+ !dir$ ignore_tkr a
18
+ !dir$ ignore_tkr
19
+ !dir$+ b
20
+ real (4 ):: a, b
21
+ end subroutine
22
+ end interface
23
+ !
24
+ ! comment line
25
+ !@fp PRINT * , " This is a comment line"
26
+ !@f p PRINT * , " This is a comment line"
27
+ !$ PRINT * , " Is ' '"
28
+ !$123 PRINT * , " Is '123 '"
29
+ !$ABC PRINT * , " Is 'ABC '"
30
+ ! $ PRINT * , " This is a comment line 6"
31
+ c $This is a comment line
32
+ !0 $110This is a comment line
33
+
34
+ ! $ This is a comment line
35
+ ! $ 0This is a comment line
36
+ ! &This is a comment line
37
+ ! $ This is a comment line
38
+ ! $ This is a comment line
39
+ C $ This is a comment line
40
+ c $ his is a comment line
41
+ * $ This is a comment line
42
+ end
You can’t perform that action at this time.
0 commit comments