[Bug fortran/99514] incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization )

2021-03-15 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99514

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Tobias Burnus  ---
FIXED on mainline (GCC 11).

Thanks for the report!

[Bug fortran/99514] incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization )

2021-03-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99514

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Tobias Burnus :

https://gcc.gnu.org/g:d0655763483008a421608d059cf26c93077621a9

commit r11-7649-gd0655763483008a421608d059cf26c93077621a9
Author: Tobias Burnus 
Date:   Fri Mar 12 16:34:10 2021 +0100

Fortran/OpenMP: Accept implicit-save DATA vars for threadprivate [PR99514]

gcc/fortran/ChangeLog:

PR fortran/99514
* resolve.c (resolve_symbol): Accept vars which are in DATA
and hence (either) implicit SAVE (or in common).

gcc/testsuite/ChangeLog:

PR fortran/99514
* gfortran.dg/gomp/threadprivate-1.f90: New test.

[Bug fortran/99514] incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization )

2021-03-10 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99514

--- Comment #3 from Tobias Burnus  ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566548.html

[Bug fortran/99514] incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization )

2021-03-10 Thread dominiq at lps dot ens.fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99514

Dominique d'Humieres  changed:

   What|Removed |Added

   Last reconfirmed||2021-03-10
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
For the record

program main

  integer :: NTest = 1
  !$omp threadprivate(Ntest)

end program main

compiles.

[Bug fortran/99514] incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization )

2021-03-10 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99514

--- Comment #1 from Tobias Burnus  ---
(In reply to markus.weil...@ipp.mpg.de from comment #0)
> I believe the ifort behavior is correct here, because the initialization of
> NTest via DATA causes an implicit save, which seems not to be identified by
> gfortran.

Concur, except if there is a common (which there isn't):

F2018: 8.6.7  DATA statement
"Except for variables in named common blocks, a named variable has the
 SAVE attribute if any part of it is initialized in a DATA statement,
 and this may be confirmed by explicit specification."