This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization bug in g77
Mark Mitchell wrote:
> I wrote:
> >> I went ahead and tried the following (patch against a CVS'd
> >> copy of the egcs_1_1_branch obtained a few hours ago):
> Toone, I'm sorry I didn't get back to you sooner. I was out of town
> for a couple of days.
Ah, this wasn't meant as criticism - it's just that I had some spare
time on a rainy sunday afternoon :-)
> Jeffrey> For those codes which do trip the problem folks can
> Jeffrey> disable this optimization.
>
> But, for most users, it's very difficult, if not impossible, to figure
> out *what* optimization is causing the problem. Most likely, they'll
> compile a large program and find it behave unexpectedly, and just not
> know why. This reflects poorly on EGCS.
Exactly my feelings. On reflection, I *think* I have a pretty good
handle on how to describe the situation to Fortran users:
An EQUIVALENCE of an array and a sequence of scalars,
of which either the array or the sequence of scalars
resides in COMMON.
... but I'm still not sure this covers all the failure modes.
> I think it's a good deal more responsible to invert your suggestion:
> disable the (known to be broken) optimization by default, and then
> provide an option to *enable* it. Thus, the "power users", who want
> maximum speed, can know what they're getting into: the documentation
> will say explicitly that the option is, in general, known to be
> unsafe.
Agree (as with the followup mails on this subject).
Thanks,
--
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: fortran@gnu.org; egcs: egcs-bugs@cygnus.com