Files
llvm-project/flang/lib/Parser/source.cpp
Caroline Newcombe b37f8a54a0 [flang] Fix extra "./" prefix in source file paths (#186212)
When a relative file search path in the current working directory was
passed to LocateSourceFile, an extra `./` was appended, producing paths
like "././test.F90". This caused the `__FILE__` macro to expand
incorrectly and did not match the behavior of other Fortran compilers
such as gfortran. This caused failures when running an external test
suites that parses `__FILE__` to generate test log filenames.

In LocateSourceFile and LocateSourceFileAll: do not append the search
path if it is the current working directory (`.`). In all other cases,
append the search path to the file name (original behavior).

The test expectation in getsymbols02.f90 is updated because the old
CHECK patterns matched the buggy "././" output.
2026-03-18 09:35:17 -06:00

7.0 KiB