This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs and g77


In a message dated 7/4/98 4:54:34 AM Pacific Daylight Time,
toon@moene.indiv.nluug.nl writes:

> >  Can I trust g77 to reliably generate the proper code with
>  >  optimizations turned on?  As I said I really don't want
>  >  to start a debate so please a simple yae or nae ... will
>  >  suffice.

Well, no one can give a simple answer; for one thing, bugs in codes often show
up when optimization is on.  Many such problems are results of incorrect
initialization, or other non-standard stuff which worked on many compilers
over the years.  The problem is not just with g77; commercial f90 compilers
have dropped backwards compatibility with non-standard ibm360 fortran.  I wish
g77 had more complete diagnostics for some of these uglies, but wishing also
obligates us to document where warnings are needed but not yet available.  One
area where better diagnostics would help is in the flagging of improper or
unreliable use of undeclared character strings.

I maintain one of those fortran codes which dates back over the years, and I
have fixed enough bugs so that g77 is the most modern compiler which runs it
totally cleanly, no matter which compiler switches are on, and g77 is the only
compiler which runs the same across architectures.

g77 has options which make all variables static and initially zero, and all
local variables are visible in debug even with optimization.   Use these
options when needed.  There is no automatic switching of uninitialized
variables to static.  Such features of other compilers, while they often
eliminate bugs, do cause performance problems, and they don't cure the non-
portability.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]