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

Tom Eccles via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 10:00:54 PST 2023


tblah wrote:

> > That example is different because you used `program` in the fortran source. The use case here is applications which implement `main` in C then call into fortran code
> 
> Do you have a link line for ifort? It seems that your example fails with ifort, but indeed works with gfortran. The simple reason is that gfortran emits a main function into the translation unit if it has a program unit. If it does not, the main function is not generated.

Sorry I don't have access to `ifort`

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


More information about the cfe-commits mailing list