[flang-commits] [clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Mon Dec 18 13:44:15 PST 2023
DanielCChen wrote:
@mjklemm This PR caused some regressions of C-interop test cases in our local test run. The test cases typically have a Fortran main (compiled with Flang) that calls a C function (compiled with clang). The linking is by `flang-new`.
The error looks like:
```
ld.lld: error: duplicate symbol: main
>>> defined at ./bind_c09i.c
>>> bind_c09i.o:(.The_Code)
>>> defined at Fortran_main.c
>>> Fortran_main.c.o:(.text.main+0x0) in archive ./libFortran_main.a
flang-new: error: linker command failed with exit code 1 (use -v to see invocation)
```
https://github.com/llvm/llvm-project/pull/73124
More information about the flang-commits
mailing list