This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [Patch,Fortran] PR 44945 - Fix DECL of module variables (wrong-code "regression")


Tobias,

OK for trunk and 4.5 after a delay of a week or two.

As I say elsewhere, I would be sure that the different treatment of
derived types came about form TYPE_CANONICAL not being set.

Thanks

Paul

On Fri, Jul 16, 2010 at 4:04 PM, Tobias Burnus <burnus@net-b.de> wrote:
> gfortran can produce the multiple declarations for module variables.
> This causes problems when inlining is done as then the alias analysis
> breaks.
>
> For instance, the recent patch to the string intrinsics (marking some as
> PURE) "caused" gfortran.dg/char_array_structure_constructor.f90 to break
> with -m32 on x86_64-apple-darwin10.
>
> The patch fixes this for -fwhole-file. Does anyone know why derived
> types were excluded?
>
> I have now added -fwhole-file to the test case to silence the error
> (with this patch applied), but I think the real solution it to switch to
> -fwhole-file by default.
>
> Build and regtested on x86-64-linux. OK for the trunk? What about 4.5?
>
> * * *
>
> RFC: Is there any compelling reason not to switch to -fwhole-file by
> default? I think we have slowly reached the state when there are more
> bugs without that option than with that option.
>
> Advantages
> - Fixes some wrong-code issues
> - Improves diagnostic
> - Improves (non-LTO) optimizations
> - More consistent codepath: The same for default, LTO and -fwhole-program
>
> Disadvantage
> - Some bugs, leading to wrong code
>
> I think most wrong-code issues come apparent with -fwhole-program, which
> allows for more optimizations - but that option implies -fwhole-file
> (thus there is no change). Using -flto, one sees fewer problems as this
> fixes some bad DECL.
>
> Tobias
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy


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