[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

Daniel Chen via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 19 14:14:10 PST 2023


DanielCChen wrote:

Ok. I see. The Fortran `main` is actually coming out of internal compiler generated code rather than user code. 
It seems users who have Fortran-C-interop code will need to toggle the `-fno-fortran-main` option ON and OFF depends on who the `main` is.
I think there are some real issues on AIX as Kelvin mentioned on top of what we have encountered on Linux. However, these issues are not directly related to this PR. 
Thanks to all for the response and explanation!

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


More information about the cfe-commits mailing list