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: [Fortran] RFC: Enabling -fwhole-file by default


Dear Tobias,

Many thanks to you for completing this job.  It is one amongst many
that I would have liked to have done myself.

On Fri, Jul 23, 2010 at 6:04 PM, Tobias Burnus <burnus@net-b.de> wrote:
> I would like to enable -fwhole-file by default. As written before, the
> advantages are
>
> - Fixes some wrong-code issues (e.g. PR 44945)
> - Improves diagnostic
> - Improves (non-LTO) optimizations
> - More consistent codepath: The same for default, LTO and -fwhole-program
>
>
> I think -fwhole-file is now stable enough to be enabled by default; one
> can still use -fno-whole-file to disable it. (Though, I like to remove
> that "no" option in the next release, i.e. 4.7.)

I don't think that I can agree to that, largely for legacy reasons.  I
see no harm in leaving the option and would suggest that for
std=legacy it is automatically set.

Anyway, it's for discussion :-)

>
> Before one can enable -fwhole-file, one should apply the following two
> patches:
> http://gcc.gnu.org/ml/fortran/2010-07/msg00311.html
> http://gcc.gnu.org/ml/fortran/2010-07/msg00320.html
>
> In addition, some changes to the test suite were necessary: Some changed
> messages due to the different code path, a bunch of warnings, some code
> fixes - see attached patch.

The patch brings back lots of memories - I did the same at one stage.

>
> With the two patches mentioned above and the attached patch, I only see
> one test-suite failure:
> ?gfortran.dg/common_resize_1.f
> where a warning about different COMMON sizes disappears with
> -fwhole-file (cf. PR 45045 and related PR 45044). I would suggest to
> XFAIL that check if we cannot fix it soon.

mmm!  I am not sure that I like that.  I wonder why it happens?
Remind me in a couple of weeks, when I am back from vacation.
>
> The change to the compare_parameter is for gfortran.dg/hollerith.f90;
> otherwise, one gets the warning: "Type mismatch in argument 'h' at (1);
> passed HOLLERITH to INTEGER(8)". I think this warning does not make much
> sense for Hollerith (enabled by default; error with -pedantic) ?- and
> with -pedantic one already gets warnings - e.g. for the line in question
> a "Hollerith constant" warning.
>
> Build and regtested on x86-64-linux - with common_resize_1.f as only
> failure.
> OK for the trunk?

I think that we should try and fix the failure.  It's most odd that it
should appear with -fwhole-file.  Maybe the XFAIL is good but make
sure that we all remember it.

>
> Jakub might want to have a look at the libgomp/testsuite/ change.
>
> Tobias
>
> PS: If it is OK, I will write a changelog.

Write the ChangeLog  and get it committed!

OK for trunk :-)

Paul

>
> ?gcc/fortran/interface.c ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1
> ?gcc/fortran/options.c ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2
> ?gcc/testsuite/gfortran.dg/bounds_check_strlen_1.f90 ? ? ? ? ? ?| ? ?2
> ?gcc/testsuite/gfortran.dg/bounds_temporaries_1.f90 ? ? ? ? ? ? | ? ?2
> ?gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90 | ? ?5 +
> ?gcc/testsuite/gfortran.dg/entry_17.f90 ? ? ? ? ? ? ? ? ? ? ? ? | ? ?4
> ?gcc/testsuite/gfortran.dg/func_decl_4.f90 ? ? ? ? ? ? ? ? ? ? ?| ? 13 ++-
> ?gcc/testsuite/gfortran.dg/func_decl_5.f90 ? ? ? ? ? ? ? ? ? ? ?| ? 15 +++
> ?gcc/testsuite/gfortran.dg/g77/19990218-0.f ? ? ? ? ? ? ? ? ? ? | ? ?2
> ?gcc/testsuite/gfortran.dg/g77/19990218-1.f ? ? ? ? ? ? ? ? ? ? | ? ?2
> ?gcc/testsuite/gfortran.dg/g77/970625-2.f ? ? ? ? ? ? ? ? ? ? ? | ? ?2
> ?gcc/testsuite/gfortran.dg/generic_actual_arg.f90 ? ? ? ? ? ? ? | ? ?2
> ?gcc/testsuite/gfortran.dg/global_references_1.f90 ? ? ? ? ? ? ?| ? ?6 -
> ?gcc/testsuite/gfortran.dg/integer_exponentiation_2.f90 ? ? ? ? | ? 20 ++--
> ?gcc/testsuite/gfortran.dg/intrinsic_std_1.f90 ? ? ? ? ? ? ? ? ?| ? 16 +--
> ?gcc/testsuite/gfortran.dg/intrinsic_std_6.f90 ? ? ? ? ? ? ? ? ?| ? 41
> ++++++++++
> ?gcc/testsuite/gfortran.dg/loc_1.f90 ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?3
> ?gcc/testsuite/gfortran.dg/pr20865.f90 ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2
> ?gcc/testsuite/gfortran.dg/pr37243.f ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?6 -
> ?gcc/testsuite/gfortran.dg/sizeof.f90 ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?4
> ?gcc/testsuite/gfortran.dg/use_only_1.f90 ? ? ? ? ? ? ? ? ? ? ? | ? ?1
> ?gcc/testsuite/gfortran.dg/used_before_typed_4.f90 ? ? ? ? ? ? ?| ? ?2
> ?libgomp/testsuite/libgomp.fortran/appendix-a/a.28.5.f90 ? ? ? ?| ? ?5 +
> ?23 files changed, 115 insertions(+), 43 deletions(-)
>


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