1 Getting Started
Gfortran is the GNU Fortran 95 compiler front end,
designed initially as a free replacement for,
or alternative to, the unix f95 command;
gfortran is the command you'll use to invoke the compiler.
Gfortran is still in an early state of development.
gfortran can generate code for most constructs and expressions,
but much work remains to be done.
When gfortran is finished,
it will do everything you expect from any decent compiler:
Gfortran consists of several components:
- A version of the gcc command
(which also might be installed as the system's cc command)
that also understands and accepts Fortran source code.
The gcc command is the driver program for
all the languages in the GNU Compiler Collection (GCC);
you can compile the source code of any language for
which a front end is available in GCC.
- The gfortran command itself,
which also might be installed as the
system's f95 command.
gfortran is just another driver program,
but specifically for the Fortran 95 compiler only.
The difference with gcc is that gfortran
will automatically link the correct libraries to your program.
- A collection of run-time libraries.
These libraries contain the machine code needed to support
capabilities of the Fortran language that are not directly
provided by the machine code generated by the
gfortran compilation phase,
such as intrinsic functions and subroutines,
and routines for interaction with files and the operating system.
- The Fortran compiler itself, (f951).
This is the gfortran parser and code generator,
linked to and interfaced with the GCC backend library.
f951 “translates” the source code to
assembler code. You would typically not use this
instead, the gcc or gfortran driver
programs will call it for you.