[LLVMdev] llvm-gfortran problems

Anton Korobeynikov anton at korobeynikov.info
Wed Aug 31 14:29:46 PDT 2011


Hello

> I am not very familiar with Fortran programs. I saw a few programs that had
> a "MAIN" subroutine defined, some others that did not. Am I missing
> something while compiling the code? Is there a different way to compile
> bitcode (from Fortran programs) to a native binary?
For Fortran MAIN is indeed something similar to C main, but not
exactly the same.
You have to link the runtime library (libgfortran.a) in order to get
"proper" main, mak sure all stuff is initialized properly, etc.

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list