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

Michael Klemm via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 09:34:00 PST 2023


mjklemm wrote:

gfortran and also ifort should fail for codes that have both a program unit and a makn() function coming from C. 

These compilers have a main() function that calls into the Fortran program unit and link that via an object file. 

Id be interested to see the link line for these compilers before we revert the PR.  The behavior now should actually be consistent with these other compilers. 

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


More information about the cfe-commits mailing list