[flang-commits] [flang] [flang][OpenMP] Skip invalid conditional compilation sentinels (PR #126282)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Wed Feb 12 06:04:06 PST 2025
================
@@ -1432,6 +1432,21 @@ Prescanner::IsFixedFormCompilerDirectiveLine(const char *start) const {
}
*sp++ = ToLowerCaseLetter(*p);
}
+ // A fixed form OpenMP conditional compilation sentinel must satisfy the
+ // following criteria, for initial lines:
+ // - Columns 3 through 5 must have only white space or numbers.
+ // - Column 6 must be space or zero.
+ if (column == 3 && sentinel[0] == '$') {
----------------
luporl wrote:
Yes, `c$` is not considered a sentinel in `c$1x`.
If the loop above found a conditional compilation sentinel, it will always break on column 3, when it finds either a white space or digit.
https://github.com/llvm/llvm-project/pull/126282
More information about the flang-commits
mailing list