[flang-commits] [flang] [flang] Treat a bare carriage return as whitespace outside literals (PR #206171)

via flang-commits flang-commits at lists.llvm.org
Fri Jun 26 14:50:07 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 4393 tests passed
* 250 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Flang
<details>
<summary>Flang.Preprocessing/carriage-return.f90</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 10
printf 'program p\n  integer :: i, j\n  common /blk/\r &\n    i, j\nend\n' > C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-free.f90
# executed command: printf 'program p\n  integer :: i, j\n  common /blk/\r &\n    i, j\nend\n'
# note: command had no output on stdout or stderr
# RUN: at line 11
c:\_work\llvm-project\llvm-project\build\bin\flang.exe -fc1 -fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc -fsyntax-only C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-free.f90
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\flang.exe' -fc1 '-fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc' -fsyntax-only 'C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-free.f90'
# note: command had no output on stdout or stderr
# RUN: at line 14
printf '      program p\n      integer i, j\n      common /blk/ i\r, j\n      end\n' > C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-fixed.f
# executed command: printf '      program p\n      integer i, j\n      common /blk/ i\r, j\n      end\n'
# note: command had no output on stdout or stderr
# RUN: at line 15
c:\_work\llvm-project\llvm-project\build\bin\flang.exe -fc1 -fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc -fsyntax-only -ffixed-form C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-fixed.f
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\flang.exe' -fc1 '-fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc' -fsyntax-only -ffixed-form 'C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-fixed.f'
# note: command had no output on stdout or stderr
# RUN: at line 19
printf 'module m\n  character(*), parameter :: s = '\''a\rb'\''\n  integer, parameter :: slen = len(s)\n  integer, parameter :: midval = iachar(s(2:2))\nend module\n' > C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-literal.f90
# executed command: printf 'module m\n  character(*), parameter :: s = \a\rb\\n  integer, parameter :: slen = len(s)\n  integer, parameter :: midval = iachar(s(2:2))\nend module\n'
# note: command had no output on stdout or stderr
# RUN: at line 20
c:\_work\llvm-project\llvm-project\build\bin\flang.exe -fc1 -fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc -fdebug-unparse C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-literal.f90 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Preprocessing\carriage-return.f90
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\flang.exe' -fc1 '-fintrinsic-modules-path=C:\_work\llvm-project\llvm-project\build\lib\clang\23\finclude\flang\x86_64-pc-windows-msvc' -fdebug-unparse 'C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-literal.f90'
# .---command stderr------------
# | error: Could not scan C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-literal.f90
# | C:\_work\llvm-project\llvm-project\build\tools\flang\test\Preprocessing\Output\carriage-return.f90.tmp-literal.f90:2:34: error: bad character (0x07) in Fortran token
# |     character(*), parameter :: s = 
# | b
# |                                    ^
# `-----------------------------
# error: command failed with exit status: 1
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\flang\test\Preprocessing\carriage-return.f90'
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Preprocessing\carriage-return.f90
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/206171


More information about the flang-commits mailing list