This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug fortran/35916] problem running gfortran 4.4.0 in Vista


Jerry DeLisle wrote:
However, some large Fortran libraries which were built a decade or so ago for g77, are still very much in use, with very little chance of them ever being updated. I have tried to build one of these from source, with the provided make files, using gfortran, but gave up very quickly after being inundated with errors and warnings.
Regarding g77 and gfortran compatibility. We would really like to see examples of code that is causing the issues.
gfortran should be able to compile about any g77 code; there are very few things of g77 which gfortran does not support. On the other hand, gfortran contains several vendor extensions which g77 did not. Thus, in total, gfortran should be able to compile more legacy programs than g77. (At least this is my experience.)

As Jerry already said: We are very interested to see Fortran code which g77 compiles but gfortran does not; and with very few exceptions, we intent to implement those missing bits in gfortran.

In my experience, one of the main differences is the definition of structures, and the structure syntax (e.g. the use of "%" instead of "."). Is there a way (compiler option or something) to compile old code with old structure definitions, using gfortran, and without replacing them in the source code?

This sounds like DEC's STRUCTUREs. This is something which gfortran will almost certainly never support. (The reason is that it is very difficult to support such that it works with user-defined operators which also use dots. Additionally, Fortran 90 introduced TYPE which does the same - and even more. Intel's ifort supports STRUCTURE and Intel struggled for quite a while to get it properly working with user-defined operators.)


However, to my knowledge g77 did not support STRUCTURE, UNION, RECORD, MAP neither. (Which both a quick test and the g77 manual confirmed.)

For gfortran, the answer is to replace STRUCTURE by Fortran 90's TYPE as written at
http://gcc.gnu.org/onlinedocs/gfortran/STRUCTURE-and-RECORD.html


Since you wrote that it works with g77, I'm curious about what exactly you have; as STRUCTURE is not supported by g77 it must be something else, but what?

If you have STUCTURE, it is relatively easy to replace it by Fortran 90 syntax using, e.g., "sed" or "perl" or anything else which supports regular expressions.

Tobias

PS: No idea about your Windows Vista problem -- I also use Linux; hopefully someone else will find out how to get gfortran running on your machine.


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