This is the mail archive of the
mailing list for the GCC project.
Re: [Patch,Fortran] PR 44945 - Fix DECL of module variables (wrong-code "regression")
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Fri, 16 Jul 2010 16:40:35 +0200
- Subject: Re: [Patch,Fortran] PR 44945 - Fix DECL of module variables (wrong-code "regression")
- References: <4C4066F9.email@example.com>
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.
On Fri, Jul 16, 2010 at 4:04 PM, Tobias Burnus <firstname.lastname@example.org> wrote:
> gfortran can produce the multiple declarations for module variables.
> This causes problems when inlining is done as then the alias analysis
> 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.
> - Fixes some wrong-code issues
> - Improves diagnostic
> - Improves (non-LTO) optimizations
> - More consistent codepath: The same for default, LTO and -fwhole-program
> - 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.
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy