4

Can I compile Fortran 90 files with a Fortran 95 compiler? There seems to be a lot for Fortran 95 but not Fortran 90.

2

2 Answers 2

11

Yes, you can compile Fortran 90 programs with a Fortran 95 compiler. Actually, most of the compilers out there are now largely but not totally compliant with Fortran 2003. Unless you have unusual requirements, you are better off with a Fortran 95/2003/2008 compiler rather than a Fortran 90 only one. Fortran 95 is somewhat of a "bug fix" to Fortran 90 ... it was a modest update based upon the experience with actually using Fortran 90, which was a huge change from Fortran 77. For example, it is easier to have memory leaks in Fortran 90 ... in Fortran 95 local allocatable variables must be automatically deallocated upon exit from a subroutine so the programmer doesn't have to explicitly do the deallocation. In Fortran 90, if the deallocation wasn't explicitly coded, a memory leak was allowed to occur.

For a free compiler, recent versions of gfortran are quite good.

3

This one can:

NAGWare f95 Compiler Release 5.1

See also:

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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