[prog] Fortran g77 question

Conor Daly c.daly at met.ie
Sat Feb 25 00:20:35 EST 2006

hi all,
When compiling a fortran program with g77, uninitialised variables are not
set to zero while using Solaris' f77, they are.  Is there a switch for g77
to initialise uninitialised variables to zero?  I had a look at
'-Wuninitialised' but 'info g77' says:
     Warn whenever an automatic variable is used without first being
     These warnings are possible only in optimizing compilation,
     because they require data-flow information that is computed only
     when optimizing.  If you don't specify `-O', you simply won't get
     these warnings.
     These warnings occur only for variables that are candidates for
     register allocation.  Therefore, they do not occur for a variable
     whose address is taken, or whose size is other than 1, 2, 4 or 8
     bytes.  Also, they do not occur for arrays, even when they are in
     Note that there might be no warning about a variable that is used
     only to compute a value that itself is never used, because such
     computations may be deleted by data-flow analysis before the
     warnings are printed.
It's probably unlikely that some of our variables will be "candidates for
register allocation" so this is not sufficient.  Certainly it doesn't detect
one that we have identified.
Yes, I know the correct thing to do is to identify and initialised all of
these but that's a pretty big body of work...

Conor Daly,                   Please avoid sending me 
Met Eireann, Glasnevin Hill,  Word or PowerPoint attachments.
Dublin 9, Ireland             http://www.gnu.org/philosophy/no-word-attachments.html
Ph +-3531 8064276 Fax +-3531 8064247

This e-mail and any files transmitted with it are confidential and intended solely for the addressee. If you have received this email in error please notify the sender.
This e-mail message has also been scanned for the presence of computer viruses.

T+AOE an r+AO0-omhphost seo, agus aon chomhad at+AOE nasctha leis, faoi r+APo-n agus is don t+AOk a seoladh chuige amh+AOE-in +AOk. M+AOE tharla go bhfuair t+APo an r+AO0-omhphost seo tr+AO0 dhearmad cuir in i+APo-l don t+AOk a sheol +AOk led+IBk thoil.

T+AOE an teachtaireacht r+AO0-omhphoist seo scuabtha le bogearra+AO0 frithv+AO0-reas.
NorthBridge Mail Server id e9yrhg43fncvj3974vjenw

More information about the Programming mailing list