mirror-llvm-project/flang/test/Preprocessing
Eugene Epshteyn 21725d26de
[flang] Treat a bare carriage return as whitespace outside literals (#206171)
Free-form (and fixed-form) source files authored or transferred on
Windows can contain a stray carriage return (0x0d or \r) in the interior
of a line, for example between a token and a trailing '&' continuation
marker:

    COMMON/CM1/<CR>       &

flang rejected such files with "bad character (0x0d) in Fortran token",
whereas the other compilers accept them. Carriage returns that form a
clean CRLF line ending were already tolerated; only a CR in the
significant part of a line tripped the error.

The fix is to skip over the stray <CR> outside of character literals.

Assisted-by: AI
2026-06-29 12:53:44 -04:00
..
args.h
assert.F90
backslash-contin1.F90
bug518.F [flang] Skip over fixed form spaces when prescanning exponents & kind… (#145347) 2025-06-30 10:22:50 -07:00
bug890.F90 [flang] Fix prescanner bug w/ empty macros in line continuation (#141274) 2025-05-28 14:01:55 -07:00
bug1077.F90 [flang] Fix handling of identifier in column 1 of free form continuat… (#146430) 2025-07-03 14:32:38 -07:00
bug1126.F90 [flang] Don't create bogus tokens from token pasting (##) (#147596) 2025-07-14 11:11:43 -07:00
bug64837.F90
bug117297.F90 [flang] Fix continuation when line begins with empty macro expansion (#117407) 2024-12-02 12:26:07 -08:00
bug126459.F90 [flang] Preserve compiler directives in -E output (#133959) 2025-04-04 09:49:57 -07:00
bug129131.F [flang] Fix Preprocessing/bug129131.F test on Darwin (#123094) 2025-01-16 10:21:21 -03:00
bug134986.F90 [flang] Don't insert spaces in -E output after line continuation (#135063) 2025-04-10 09:57:08 -07:00
bug136845.F [flang] Treat conditional comments as comments (#165881) 2025-10-31 10:28:04 -07:00
bug164470.cuf [flang] Line continuation for !@acc and !@cuf conditional lines (#164475) 2025-10-21 13:38:29 -07:00
bug164727.cuf [flang] Let !@acc and !@cuf conditional lines be continuations (#164892) 2025-10-24 14:15:16 -05:00
bug168077.F90 [flang] Tokenize all -D macro bodies, and do it better (#168116) 2025-11-19 08:53:59 -08:00
bug178481.F90 [flang] Recognize compiler directives after expansion in comment (#183626) 2026-03-02 14:47:08 -08:00
carriage-return.f90 [flang] Treat a bare carriage return as whitespace outside literals (#206171) 2026-06-29 12:53:44 -04:00
compiler_defined_macros.F90 [flang][NFC] Strip trailing whitespace from tests (10 of N) 2025-12-04 13:50:39 -07:00
cond-comment.f [flang] Treat conditional comments as comments (#165881) 2025-10-31 10:28:04 -07:00
cond-comment.f90 [flang] Treat conditional comments as comments (#165881) 2025-10-31 10:28:04 -07:00
cond-contin.F90
counter.F90 [flang] Add __COUNTER__ preprocessor macro (#136827) 2025-05-30 08:33:53 -04:00
dash-E.F90
defined-in-macro.F90
defines.F90
defines_pic_frontend.F90 [Flang][Driver] Predefine pic/pie macros based on configured level (#153449) 2025-08-14 17:48:20 +01:00
directive-contin-with-pp.F90 [flang][preprocessor] Directive continuation must skip empty macros (#134149) 2025-04-04 08:43:56 -07:00
disable-expansion.F90
empty.h
exponent-bug.F90 [flang] Don't perform macro replacement on exponents (#136176) 2025-04-18 12:52:04 -07:00
fd-lines-as.f90 [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (#127605) 2025-03-03 11:55:36 +00:00
ff-args.h
ff-include-args.F
fixed-free.f [Flang] Move builtin .mod generation into runtimes (Reapply #137828) (#171515) 2026-05-29 10:50:52 +02:00
fixed-rescan.F
func-on-command-line.F90 [flang] Support -D for function-like macros (#139812) 2025-05-15 11:26:03 -07:00
hollerith.f
implicit-contin1.F90
implicit-contin2.F90
implicit-contin3.F90 [flang] Fix fixed-form continuations of !$ OpenMP conditional lines (#135852) 2025-04-18 12:50:34 -07:00
implicit-contin4.F90
inc-contin-1.F
inc-contin-1.h
inc-contin-2.F90
inc-contin-2a.h
inc-contin-2b.h
include-args.F90
include-comment.F90
include-file.h
include-line.F90
kind-suffix.F90 [flang] Fix preprocessor regression (#134405) 2025-04-09 12:30:05 -07:00
kw-in-char.F90
line-in-contin.F90 [flang] Preserve compiler directives in -E output (#133959) 2025-04-04 09:49:57 -07:00
macro-in-include.F90
multi-cont.F90
no-pp-if.f90 [Flang] Move builtin .mod generation into runtimes (Reapply #137828) (#171515) 2026-05-29 10:50:52 +02:00
not-an-exponent.F90 [flang] Don't tokenize an exponent that isn't one (#117061) 2024-11-21 10:48:53 -08:00
omp-sentinel-fixed-form.F [flang][OpenMP] Use OmpDirectiveSpecification in METADIRECTIVE (#159577) 2025-09-22 12:35:21 -05:00
parse-preprocessed.F
pp001.F
pp002.F
pp003.F
pp004.F
pp005.F
pp006.F
pp007.F
pp008.F
pp009.F
pp010.F
pp011.F
pp012.F
pp013.F
pp014.F
pp015.F
pp016.F
pp017.F
pp018.F
pp019.F
pp020.F
pp021.F
pp022.F
pp023.F
pp024.F
pp025.F
pp026.F
pp027.F
pp028.F
pp029.F
pp030.F
pp031.F
pp032.F
pp033.F
pp034.F
pp035.F
pp036.F
pp037.F
pp038.F
pp039.F [flang] Make a non-digit in fixed-form label field an error unless -E (#174836) 2026-01-08 08:58:45 -08:00
pp040.F
pp041.F
pp042.F
pp043.F
pp044.F
pp045.F
pp046.F [flang] Don't check fixed form label field too early (#117040) 2024-11-21 10:48:36 -08:00
pp047.F [flang][preprocessor] Further macro replacement of continued identifiers (#134302) 2025-04-04 08:44:22 -07:00
pp048.F [flang] Fix #else with trailing text (#138045) 2025-05-01 23:07:52 -04:00
pp101.F90
pp102.F90
pp103.F90
pp104.F90
pp105.F90
pp106.F90
pp107.F90
pp108.F90
pp109.F90
pp110.F90
pp111.F90 [flang] Fix handling of identifier in column 1 of free form continuat… (#146430) 2025-07-03 14:32:38 -07:00
pp112.F90 [flang] Fix handling of identifier in column 1 of free form continuat… (#146430) 2025-07-03 14:32:38 -07:00
pp113.F90
pp114.F90
pp115.F90 [flang] Fix handling of identifier in column 1 of free form continuat… (#146430) 2025-07-03 14:32:38 -07:00
pp116.F90 [flang] Fix handling of identifier in column 1 of free form continuat… (#146430) 2025-07-03 14:32:38 -07:00
pp117.F90
pp118.F90
pp119.F90
pp120.F90
pp121.F90
pp122.F90
pp123.F90
pp124.F90
pp125.F90
pp126.F90
pp127.F90
pp128.F90
pp129.F90
pp130.F90
pp131.F90
pp132.f90 [flang][NFC] Strip trailing whitespace from tests (10 of N) 2025-12-04 13:50:39 -07:00
pp133.f90
pp134.F90
pp135.F90 [flang][preprocessor] Further macro replacement of continued identifiers (#134302) 2025-04-04 08:44:22 -07:00
preprocessed-dirs.F90 [flang] Preserve compiler directives in -E output (#133959) 2025-04-04 09:49:57 -07:00
preserve-brace-include.F90
renaming.F
sentinel-after-semi.F90
show-macros-stdin.f90 [flang] Fix -E -dM macro dumping for stdin and .f90 inputs (#200144) 2026-05-28 12:30:20 +01:00
show-macros1.F90
show-macros2.F90
show-macros3.F90
timestamp.F90
unclosed-FLM.F90