Re: Need a FORTRAN compiler for Win7 (or XP)
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Wed, 17 Aug 2011 17:25:50 +0000 (UTC)
Alois Steindl <Alois.Steindl@xxxxxxxxxxxx> wrote:
Am 17.08.2011 14:33, schrieb Nomen Nescio:
Good compilers generate object code. gcc generates C and then generates
code from that. That is a good way to deal with having to support many
languages, but it's far from optimal from a clean sheet of paper point of
view. It's slow and generates subpar code compared to other, long
established methods.
are you sure that you talk about gcc?
(As far as I remember, f2c did translate fortran 77 to C;
also the NAG F90 compiler behaved that way.)
gfortran uses the back end of the gcc C compiler.
The usual way of writing a compiler is to translate the input
source into an intermediate form representing the operations
that need to be done, (optionally) optimize that code, then
generate the code for the target machine. Those steps are,
roughly, called the front end, middle end, and back end.
Now, since gfortran is based on a C back end there might be
some operations that work differently. One recently in discussion
is that C requires static data to be initialized to zero.
gfortran then, unless one specifically put in a special case,
would also naturally do that. I have also noticed that the
gfortran generated code for the ENTRY statement uses little
routines that then call the actual function (C notation) that
has all the possible arguments. (This can be seen when using
the debugger, and setting breakpoints on an entry point.)
That may or may not be a side effect of the C back end.
Using a common back end allows improvements to apply to all
languages, and saves work. The intermediate code usually uses
mostly language independent operations, though there may be
some hints as to the original source language left.
-- glen
.
- Follow-Ups:
- Re: Need a FORTRAN compiler for Win7 (or XP)
- From: Tobias Burnus
- Re: Need a FORTRAN compiler for Win7 (or XP)
- References:
- Re: Need a FORTRAN compiler for Win7 (or XP)
- From: Steven G. Kargl
- Re: Need a FORTRAN compiler for Win7 (or XP)
- From: Nomen Nescio
- Re: Need a FORTRAN compiler for Win7 (or XP)
- From: Alois Steindl
- Re: Need a FORTRAN compiler for Win7 (or XP)
- Prev by Date: Re: zero-initialization of variables
- Next by Date: Re: Need a FORTRAN compiler for Win7 (or XP)
- Previous by thread: Re: Need a FORTRAN compiler for Win7 (or XP)
- Next by thread: Re: Need a FORTRAN compiler for Win7 (or XP)
- Index(es):
Relevant Pages
|