rajiv_agrawal@brachiosaur.cis.ohio-state.edu (04/08/90)
Recently we upgraded to MS Fortran 5.0 and I have been quite happy with the compiler. Much better than the previous versions except some new errors have crept up ... SAVE statement for COMMON blocks. Last time I compiled my code under MS FORTRAN 4.1, I never got any errors. Here is what happens: subroutine sub1 common /abc/ x,y,x save /abc/ .... end subroutine sub2 common /abc/ x,y,z save /abc/ ... end The compiler produces an error saying that ABC has already been declared SAVE. Other compilers, RM/Fortran , VAX Fortran do not give the above error. Maybe, its time I fished out an old dusty copy of the Fortran 77 standard and verified what is going on. I am pretty happy with the compiler. It is quite fast in compilation and produces fast code. Good utilities like NMAKE too. Rajiv.
maine@elxsi.dfrf.nasa.gov (Richard Maine) (04/09/90)
On 8 Apr 90 08:08:35 GMT, rajiv_agrawal@brachiosaur.cis.ohio-state.edu said: rajiv> Recently we upgraded to MS Fortran 5.0 and I have been quite happy with rajiv> the compiler. Much better than the previous versions except some new rajiv> errors have crept up ... SAVE statement for COMMON blocks. Last time rajiv> I compiled my code under MS FORTRAN 4.1, I never got any errors. Here is rajiv> what happens: rajiv> subroutine sub1 rajiv> common /abc/ x,y,x rajiv> save /abc/ rajiv> .... rajiv> end rajiv> subroutine sub2 rajiv> common /abc/ x,y,z rajiv> save /abc/ rajiv> ... rajiv> end rajiv> The compiler produces an error saying that ABC has already been rajiv> declared SAVE. Other compilers, RM/Fortran , VAX Fortran do rajiv> not give the above error. Maybe, its time I fished out an old rajiv> dusty copy of the Fortran 77 standard and verified what is rajiv> going on. You needn't bother dragging out the standard. My copy is more worn than dusty. What is going on is just another in the continuing saga of MS Fortran bugs. Not only does the standard allow the second declaration of /abc/ as save, the standard requires that you have both declarations. If a common block is declared saved in one subroutine, it must be declared saved in all subroutines in which it appears. I think I can detect some influence of c in MS Fortran's treatment of the save declaration as applying to all occurances in the file. For a similar problem with standard declarations, try subroutine sub1 intrinsic min integer min ... MS fortran barfs on that also. Admitedly, version 5.x seems to have fewer bugs than the prior versions, but it still has too many for me. I've been much happier with the Lahey compiler, which I've not yet seen a single bug in. (Oh, I'm sure it has some, in fact I've seen some bug lists on it, but I've never been bitten by one). -- Richard Maine maine@elxsi.dfrf.nasa.gov [130.134.64.6]
aj4640@dean1.usma.edu (Robertson John MAJ) (04/09/90)
I ran into a strange problem with the new Microsoft 5.0 Fortran compiler. I recompiled a well-used piece of production code with 5.0 and immediately began generating runtime erros. Curiously, when I re-compiled with the debug switch thrown, the errors went away--thus debugging with Code View was impossible. After painstakingly tracking the bug, I discovered that the compiler (with default settings) was generating code that spuriously changed the value of an integer*4 variable named NOLD to an apparently random value. Changing the variable name solved the problem. Also, running the compiler with the optimizer disabled (/Od, I think) also stopped the problem. Compilers at relase 5.0 should not have such odd behavior. Any other horror stories out there? Jack Robertson aj4640@dean1.acd.usma.edu
bobal@microsoft.UUCP (Bob ALLISON) (04/10/90)
Mea culpa. It turns out there are about six really stupid bugs in version 5 of MS FORTRAN. Call up MS Product Support, tell them your story, and they'll ship you a new version of the front end which solves the problems. All of these bugs show up in annoying obvious ways like this, so don't worry about corrupted code. This fixed version of the front end has been available for about seven months. It seems like no one is ever willing to call MS Product Support when they've got a problem. Let me state for the record that, while there have been substantial problems in the past (as there were when MS FORTRAN's version number was 3.31 or less), I believe that Product Support for FORTRAN is really trying to improve. Any problems they can't figure out are forwarded to developers. I have regular meetings with the PSS supervisor responsible for FORTRAN and she's very sincere in her efforts. I regularly try to review their responses for accuracy and completeness and believe that they are doing a pretty good job. In article <78998@tut.cis.ohio-state.edu> Rajiv Agrawal <agrawal@cis.ohio-state.edu> writes: >Recently we upgraded to MS Fortran 5.0 and I have been quite happy with >the compiler. Much better than the previous versions except some new >errors have crept up ... SAVE statement for COMMON blocks. Last time >I compiled my code under MS FORTRAN 4.1, I never got any errors. Here is >what happens: > > subroutine sub1 > common /abc/ x,y,x > save /abc/ > .... > end > subroutine sub2 > common /abc/ x,y,z > save /abc/ > ... > end > > >The compiler produces an error saying that ABC has already been declared >SAVE. Other compilers, RM/Fortran , VAX Fortran do not give the above >error. Maybe, its time I fished out an old dusty copy of the Fortran 77 >standard and verified what is going on. > >Rajiv. Anyway, sorry for any convenience and hope the updated version works out for you. Bob Allison uunet!microsoft!bobal
rajiv_agrawal@heron.cis.ohio-state.edu (04/10/90)
Is there any bug list for MS FORTRAN 5.0? If there isn't one, I am prepared to do the compilation. Please send any MS FORTRAN weirdness to me. On a similar note, does somebody have a buglist for other compilers such as NDP and Lahey. Any help will be greatly appreciated. Rajiv.
rhoward@msd.gatech.edu (Robert L. Howard) (04/11/90)
In article <215@dean1.usma.edu> aj4640@dean1.acd.usma.edu writes: >I ran into a strange problem with the new Microsoft 5.0 >Fortran compiler. : : > Also, running the compiler with >the optimizer disabled (/Od, I think) also stopped the >problem. I've had similar problems with the MS compilers (and others, including Sun's) that has led me to be F77 optimization shy. I also got some commercial F77 source code where the installation manual recommended disabling the optimizer since, in their words, most F77 compilers have *awful* optimizers. Robert -- Robert L. Howard (GTRI/STL/MSD) (404) 528-7165 Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!msd!rhoward Internet: rhoward@msd.gatech.edu
agrawal@rootbeer.eng.ohio-state.edu (Rajiv Agrawal) (04/12/90)
The troublesome SAVE statement in MS FORTRAN 5.0 release has apparently been fixed. I called up the product support group and they are sending me a patch. I have received some other bugs by mail and I am compiling a list. SO far its pretty small. Rajiv.
bauwens@euler.Berkeley.EDU (Luc Bauwens) (04/13/90)
In article <54010@microsoft.UUCP> bobal@microsoft.UUCP (Bob Allison) writes: > >This fixed version of the front end has been available for about seven >months. It seems like no one is ever willing to call MS Product Support >when they've got a problem. Let me state for the record that, while there >have been substantial problems in the past (as there were when MS FORTRAN's >version number was 3.31 or less), I have not had any serious problems with version 5. Just to make sure, how can I tell whether I have the "fixed version"? Luc