Does anyone know a compiler for Fortran 77 available as a free download?

I have pre-written 77 code from a source published in the early 90's that I just need to compile, build, and run. But I don't know enough about Fortran to update it myself.

  • 2
    $\begingroup$ Standard Fortran 77 program is also legal Fortran 90 program and (with small exceptions that compilers still accept) even Fortran 2008 program. Just use any modern compiler and do not search for 77. $\endgroup$ Sep 30, 2013 at 10:40

4 Answers 4


GFortran is free and open source and usually works pretty well.

  • 1
    $\begingroup$ On Linux you can also use Open64 and Solaris Studio for free. The latter also has some useful tools (dbx, analyzer etc). $\endgroup$
    – stali
    Sep 26, 2013 at 21:45
  • $\begingroup$ make sure you read the documentation on gfortran for source code file extensions. $\endgroup$
    – user7257
    Jun 26, 2014 at 14:43

While not as free or available as GFortran that Bill mentions, the Intel Fortran Compiler also works F77 (or atleast works for the legacy code I work with). I am just putting this here to give an alternative, I would still recomment GFortran for most use cases simply due to the cost of ifort.

  • 4
    $\begingroup$ One could note that if it is for a non-commercial use, Intel Fortran Compilers can be downloaded and used for free. However, public research is considered as a commercial use for Intel. $\endgroup$
    – MBR
    Sep 27, 2013 at 16:17
  • 1
    $\begingroup$ @MBR: I think you should read their license more carefully. I believe it says that if the use is educational, you can get a free license. Research is not education. They really mean classroom and homework only. $\endgroup$
    – Bill Barth
    Sep 28, 2013 at 14:14
  • $\begingroup$ If you are paid for the teaching, it is commercial activity. At least in this licence. $\endgroup$ Sep 30, 2013 at 10:37
  • $\begingroup$ @BillBarth: well, I didn't say the contrary. As soon as you're paid for your job, it is considered as a commercial use. $\endgroup$
    – MBR
    Oct 1, 2013 at 8:38

G95 is another alternative free fortran compiler, available for quite a few platforms. I think it is a bit easier to install on Windows compared to Gfortran (the OP did not mention what platform they were interested in).


G95 has seen less updating and maintenance compared to Gfortran (whihch is part of the main GCC distribution since 4.0), but if you just need F77, G95 should work great. Gfortran actually began as a fork of G95.


Disclaimer: I'm about to make statements based on my own experience, so it may not necessarily be true for your situation.

In my experience, gFortran is a strict compiler when it comes to fortran 77. If the code is written according to the F77 language standard, then everything should work out. This doesn't seem to be the case very often in code obtained from textbooks and other sources, especially in my field (mechanical engineering, fluid structure interaction, dynamics, FEM, CFD). There were many situations where code obtained verbatim from these sources would either not compile, or result in confusing error messages at runtime. Switching to PGFortran or Ifort always seemed to solve the problem.

This has happened to me with code from:

  • Ferziger, Joel H., and Milovan Perić. Computational methods for fluid dynamics. Vol. 3. Berlin: Springer, 2002.
  • Cebeci, Tuncer. Analysis of turbulent boundary layers. Elsevier, 2012.

To summarize, if for some reason gFortran doesn't work out, don't hesitate to try other fortran compilers as well. Alternatively, you can try the various flags to make gFortran a bit less strict.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.