re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 3 Oct 2019 12:39:42 +0000 (12:39 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 3 Oct 2019 12:39:42 +0000 (12:39 +0000)
2019-10-03  Thomas Koenig <tkoenig@gcc.gnu.org>

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 <tkoenig@gcc.gnu.org>

PR fortran/84487
* gfortran.dg/typebound_call_22.f03: xfail.

From-SVN: r276506

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/typebound_call_22.f03

index 64812f28574d6f8ff8c8b8c53a150499bd9fb148..9367322df6f4d8e36c91764f9bfcf3229d073f5b 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-03  Thomas Koenig <tkoenig@gcc.gnu.org>
+
+       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  <mark.eggleston@codethink.com>
 
        * array.c (check_element_type): Call gfc_typename with the gfc_expr
index a113f08e26be87be7783c802c5b1129d64548801..b701f4934401a00341178bba846566ea790c6eac 100644 (file)
@@ -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 10de7b95a13c7f4714574deac95ef4ed0ab9bd14..9acbf0e8eb45cdf4c86cc9b86ae7e03526675c3c 100644 (file)
@@ -1,3 +1,8 @@
+2019-10-03  Thomas Koenig <tkoenig@gcc.gnu.org>
+
+       PR fortran/84487
+       * gfortran.dg/typebound_call_22.f03: xfail.
+
 2019-10-03 Mark Eggleston <mark.eggleston@codethink.com>
 
        * gfortran.dg/bad_operands.f90: New test.
index b9f0b71257329f2ae7f65058648c1a6348ae25e8..30f86937fe2fc2545632b208d49715cb737563b0 100644 (file)
@@ -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 *-*-* } } }