From: Thomas Koenig Date: Thu, 3 Oct 2019 12:39:42 +0000 (+0000) Subject: re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3aad513c68676dc93ae24ed70022093dc3920e18;p=gcc.git re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427) 2019-10-03 Thomas Koenig PR fortran/84487 * trans-decl.c (gfc_get_symbol_decl): For __def_init, set DECL_ARTIFICAL and do not set TREE_READONLY. 2019-10-03 Thomas Koenig PR fortran/84487 * gfortran.dg/typebound_call_22.f03: xfail. From-SVN: r276506 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 64812f28574..9367322df6f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-10-03 Thomas Koenig + + PR fortran/84487 + * trans-decl.c (gfc_get_symbol_decl): For __def_init, set + DECL_ARTIFICAL and do not set TREE_READONLY. + 2019-10-03 Mark Eggleston * array.c (check_element_type): Call gfc_typename with the gfc_expr diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index a113f08e26b..b701f493440 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1911,9 +1911,13 @@ gfc_get_symbol_decl (gfc_symbol * sym) if (sym->attr.associate_var) GFC_DECL_ASSOCIATE_VAR_P (decl) = 1; + /* We no longer mark __def_init as read-only so it does not take up + space in the read-only section and dan go into the BSS instead, + see PR 84487. Marking this as artificial means that OpenMP will + treat this as predetermined shared. */ if (sym->attr.vtab || (sym->name[0] == '_' && gfc_str_startswith (sym->name, "__def_init"))) - TREE_READONLY (decl) = 1; + DECL_ARTIFICIAL (decl) = 1; return decl; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 10de7b95a13..9acbf0e8eb4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-10-03 Thomas Koenig + + PR fortran/84487 + * gfortran.dg/typebound_call_22.f03: xfail. + 2019-10-03 Mark Eggleston * gfortran.dg/bad_operands.f90: New test. diff --git a/gcc/testsuite/gfortran.dg/typebound_call_22.f03 b/gcc/testsuite/gfortran.dg/typebound_call_22.f03 index b9f0b712573..30f86937fe2 100644 --- a/gcc/testsuite/gfortran.dg/typebound_call_22.f03 +++ b/gcc/testsuite/gfortran.dg/typebound_call_22.f03 @@ -26,4 +26,4 @@ program test call x%bar () end program -! { dg-final { scan-tree-dump-times "base \\(\\);" 1 "optimized" } } +! { dg-final { scan-tree-dump-times "base \\(\\);" 1 "optimized" { xfail *-*-* } } }