[all-commits] [llvm/llvm-project] ea3a3b: [flang] Handle continuation line edge case (#74751)
Peter Klausler via All-commits
all-commits at lists.llvm.org
Mon Dec 11 13:09:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ea3a3b25b93664c8be750ac3cd550855dcd1848b
https://github.com/llvm/llvm-project/commit/ea3a3b25b93664c8be750ac3cd550855dcd1848b
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2023-12-11 (Mon, 11 Dec 2023)
Changed paths:
M flang/lib/Parser/prescan.cpp
M flang/lib/Parser/prescan.h
R flang/test/Parser/continuation-before-quote.f90
A flang/test/Parser/continuation-without-ampersand.f90
Log Message:
-----------
[flang] Handle continuation line edge case (#74751)
For a character literal that is split over more than one source line
with free form line continuation using '&'
at the end of one line but missing the standard-required '&' on the
continuation line, also handle the case of spaces at the beginning of
the continuation line.
For example,
PRINT *, 'don'&
't poke the bear'
now prints "don't poke the bear", like nearly all other Fortran
compilers do.
This is not strictly standard conforming behavior, and the compiler
emits a portability warning with -pedantic.
Fixes llvm-test-suite/Fortran/gfortran/regression/continuation_1.f90,
.../continuation_12.f90, and .../continuation_13.f90.
More information about the All-commits
mailing list