]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR fortran/84487 (Large rodate section increase in 465.tonto with r254427)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 7 Oct 2019 20:10:22 +0000 (20:10 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 7 Oct 2019 20:10:22 +0000 (20:10 +0000)
2019-10-07  Thomas Koenig <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/84487
* trans-decl.c (gfc_get_symbol_decl): For __def_init, set
DECL_ARTIFICAL and do not set TREE_READONLY.

2019-10-07  Thomas Koenig <tkoenig@gcc.gnu.org>

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

From-SVN: r276672

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

index 4c9a1122285cf251d3ac6c68eeb8d1283d5ca76b..12c7221335afda1e0c610fe3e8f4dcbd9b57d88a 100644 (file)
@@ -1,3 +1,10 @@
+2019-10-07  Thomas Koenig <tkoenig@gcc.gnu.org>
+
+       Backport from trunk
+       PR fortran/84487
+       * trans-decl.c (gfc_get_symbol_decl): For __def_init, set
+       DECL_ARTIFICAL and do not set TREE_READONLY.
+
 2019-10-05  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/47054
@@ -22,7 +29,7 @@
        PR fortran/91864
        * gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
        read into.
-       * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter 
+       * gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
        can be neither an allocate-object nor stat variable.
        (gfc_match_deallocate): An inquiry parameter cannot be deallocated.
 
index f5149eed981bc5c01425ea7ba5cac8ccfe472fe1..eb92259f8801a52a7e7dac3f1df2a22938aa08a6 100644 (file)
@@ -1892,9 +1892,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 43d8244a996cff6196d7d1219b9a318e4176d26f..a308c86d5d6e892e11877dc35b329ad3d22c3ab0 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-07  Thomas Koenig <tkoenig@gcc.gnu.org>
+
+       Backport from trunk
+       PR fortran/84487
+       * gfortran.dg/typebound_call_22.f03: xfail.
+
 2019-10-07  Bill Schmidt  <wschmidt@linux.ibm.com>
 
        Backport from mainline
@@ -25,7 +31,7 @@
 
 2019-10-04  Dragan Mladjenovic <dmladjenovic@wavecomp.com>
 
-       Backport from mainline  
+       Backport from mainline
        2019-10-03  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>
 
        PR target/91769
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 *-*-* } } }