Index: fortran/trans-decl.c =================================================================== --- fortran/trans-decl.c (Revision 275719) +++ fortran/trans-decl.c (Arbeitskopie) @@ -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; } Index: testsuite/gfortran.dg/typebound_call_22.f03 =================================================================== --- testsuite/gfortran.dg/typebound_call_22.f03 (Revision 275713) +++ testsuite/gfortran.dg/typebound_call_22.f03 (Arbeitskopie) @@ -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 *-*-* } } }