GNU Info

Info Node: (g77-295.info)Debugging and Interfacing

(g77-295.info)Debugging and Interfacing


Next: Collected Fortran Wisdom Prev: Installation Up: Top
Enter node , (file) or (file)node

Debugging and Interfacing
*************************

   GNU Fortran currently generates code that is object-compatible with
the `f2c' converter.  Also, it avoids limitations in the current GBE,
such as the inability to generate a procedure with multiple entry
points, by generating code that is structured differently (in terms of
procedure names, scopes, arguments, and so on) than might be expected.

   As a result, writing code in other languages that calls on, is
called by, or shares in-memory data with `g77'-compiled code generally
requires some understanding of the way `g77' compiles code for various
constructs.

   Similarly, using a debugger to debug `g77'-compiled code, even if
that debugger supports native Fortran debugging, generally requires
this sort of information.

   This section describes some of the basic information on how `g77'
compiles code for constructs involving interfaces to other languages
and to debuggers.

   *Caution:* Much or all of this information pertains to only the
current release of `g77', sometimes even to using certain compiler
options with `g77' (such as `-fno-f2c').  Do not write code that
depends on this information without clearly marking said code as
nonportable and subject to review for every new release of `g77'.  This
information is provided primarily to make debugging of code generated
by this particular release of `g77' easier for the user, and partly to
make writing (generally nonportable) interface code easier.  Both of
these activities require tracking changes in new version of `g77' as
they are installed, because new versions can change the behaviors
described in this section.

Main Program Unit
How `g77' compiles a main program unit.
Procedures
How `g77' constructs parameter lists
for procedures.
Functions
Functions returning floating-point or character data.
Names
Naming of user-defined variables, procedures, etc.
Common Blocks
Accessing common variables while debugging.
Local Equivalence Areas
Accessing `EQUIVALENCE' while debugging.
Complex Variables
How `g77' performs complex arithmetic.
Arrays
Dealing with (possibly multi-dimensional) arrays.
Adjustable Arrays
Special consideration for adjustable arrays.
Alternate Entry Points
How `g77' implements alternate `ENTRY'.
Alternate Returns
How `g77' handles alternate returns.
Assigned Statement Labels
How `g77' handles `ASSIGN'.
Run-time Library Errors
Meanings of some `IOSTAT=' values.

automatically generated by info2www version 1.2.2.9