[flang-commits] [clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Dec 1 09:07:46 PST 2023
tblah wrote:
Simple reproducer:
main.c
```
int main(void) {
// call fortran code
return 0;
}
```
fortran.f90
```
function pow(a, b)
real :: a, b, pow
pow = a ** b
end function
```
```
clang -c main.c -o main.o
flang-now -c fortran.f90 -o fortran.o
flang-new fortran.o main.o -o out
```
This can be built with gfortran
https://github.com/llvm/llvm-project/pull/73124
More information about the flang-commits
mailing list