This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: optimization bug in g77


>>>>> "Jeffrey" == Jeffrey A Law <law@hurl.cygnus.com> writes:

    Jeffrey> I think this is a little overly conservative, but I can
    Jeffrey> live with it.  -f[no]structure-alias or something like
    Jeffrey> that?

    Jeffrey> The docs might look something like:

    Jeffrey> -fstructure-alias: Allow the compiler to assume that a
    Jeffrey> structure or array reference at a varying address can
    Jeffrey> never conflict with a scalar reference at a fixed
    Jeffrey> address.  In the vast majority of programs this is safe,
    Jeffrey> but in a small number programs a bug in GCC's alias
    Jeffrey> analysis can cause incorrect code generation.  Thus the
    Jeffrey> default is -fno-structure-alias.

This is good.  I would suggest a minor modification.  Instead of the
part from `In the vast majority' on, how about

   Although this optimization is safe, GCC can occasionally lose track
   of which references refer to scalars and which to structures,
   leading it to perform unsafe transformations.  Release 1.2 of EGCS
   will incorporate changes which allow GCC to track the
   scalar/structure distinction safely.  Thus, the optimization will
   always be same, and this option will likely be removed.

?

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com


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