Go to the first, previous, next, last section, table of contents.
Most Fortran users will want to use no optimization when developing and testing programs, and use `-O' or `-O2' when compiling programs for late-cycle testing and for production use. However, note that certain diagnostics--such as for uninitialized variables--depend on the flow analysis done by `-O', i.e. you must use `-O' or `-O2' to get such diagnostics.
The following flags have particular applicability when compiling Fortran programs:
-malign-double
g77
programs making
heavy use of REAL(KIND=2)
(DOUBLE PRECISION
) data
on some systems.
In particular, systems using Pentium, Pentium Pro, 586, and
686 implementations
of the i386 architecture execute programs faster when
REAL(KIND=2)
(DOUBLE PRECISION
) data are
aligned on 64-bit boundaries
in memory.
This option can, at least, make benchmark results more consistent
across various system configurations, versions of the program,
and data sets.
Note: The warning in the gcc
documentation about
this option does not apply, generally speaking, to Fortran
code compiled by g77
.
Also note: `-malign-double' applies only to
statically-allocated data.
Double-precision data on the stack can still
cause problems due to misalignment.
See section Aligned Data.
Also also note: The negative form of `-malign-double'
is `-mno-align-double', not `-benign-double'.
-ffloat-store
-fforce-mem
-fforce-addr
-fno-inline
-ffast-math
-fstrength-reduce
-frerun-cse-after-loop
-fexpensive-optimizations
-fdelayed-branch
-fschedule-insns
-fschedule-insns2
-fcaller-saves
-funroll-loops
-funroll-all-loops
See section `Options That Control Optimization' in Using and Porting GNU CC, for more information on options to optimize the generated machine code.
Go to the first, previous, next, last section, table of contents.