[patch, fortran] Handling of .and. and .or. expressions
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Jun 18 09:34:00 GMT 2018
On Sat, Jun 16, 2018 at 11:14:08PM +0200, Thomas Koenig wrote:
> Hi Janus,
>
> > I happen to hold the opinion that optimizing out a call to a pure
> > function may be reasonable if it does not influence the result of an
> > expression, but optimizing out an effectively impure function (i.e. one
> > with side effects) is not a good idea at any time, since such an
> > 'optimization' can drastically change the program flow and all numerical
> > results of a piece of code.
>
> Well, I am of a different opinion, and so is the Fortran standard.
>
> I think the compiler should strive to, in that order,
>
> - conform to the language standard
> - generate fast programs
> - warn about features which may trip the user
>
> In my patch, I have tried to do all three things at the same time, and
> after this discussion, I still think that this is the right path
> to follow.
>
+1
--
Steve
More information about the Fortran
mailing list