Hi Thomas,

Thanks for your determination in dealing with this. It has been on my
TODO list for a long time but, like you at the outset, I had no idea
how to deal with it.

OK on the fortran side.

Paul

On Sat, 13 Apr 2019 at 19:48, Thomas Koenig <tkoe...@netcologne.de> wrote:
>
> Hello world,
>
> the attached patch fixes a 8/9 regression where _def_init, an internal
> Fortran variable containing only zeros, was placed into the .rodata
> section. This led to a large increase in executable size.
>
> There should be no impact on other languages because the change to
> varasm.c is guarded by lang_GNU_Fortran ().
>
> Regarding the test case: I did find one other test which checks
> for .bss, so I suppose this is safe.
>
> Regression-tested with a full test (--enable-languages=all and
> make -j64 -k check) on POWER9.
>
> I would like to apply it to both affected branches.
>
> OK for the general and the Fortran part?
>
> Regards
>
>         Thomas
>
> 2019-04-13  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>          PR fortran/84487
>          * trans-decl.c (gfc_get_symbol_decl): Mark _def_init as
>          artificial.
>
> 2019-04-13  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>          PR fortran/84487
>          * varasm.c (bss_initializer_p): If we are compiling Fortran, the
>          decl is artifical and it has a size larger than 255, it can be
>          put into BSS.
>
> 2019-04-13  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>          PR fortran/84487
>          * gfortran.dg/def_init_1.f90: New test.
>
>


-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

Reply via email to