At 11:51 AM 11/7/2004, Peter Shenkin wrote: >Hi, > >On Sun, 7 Nov 2004, 12:12am -0500, [log in to unmask] wrote: > > As Mike Metcalf pointed out, this should be an ifc bug. > > The compiler is 'too' clever. Thanks to all. > >We all know that Jim Giles would consider this a bug. My >recollection, at least, is that others disagree. > >Is there anyone out there who does disagree? That is, who >thinks that this is not a bug, but a feature? I recall in Fortran 66 that some people were proud of their code when they persuaded the compiler to optimize away a second timer call, thus producing a calculation showing negligible time spent. Since f95, it should be a bug, if a compiler has optimized away repeat calls to a function which is not declared PURE. BTW, I would be more confident in the example, if the USE file which goes with the library had been present. Who's to say what the correct result of a commonly used library function, not defined in the Fortran standard, and not declared, should be? And how confident should we be when a non-standard replacement is used for a standard f90 intrinsic, thus telling us the code hasn't been maintained for 15 years? Tim Prince