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

Tobias Burnus Tobias_Burnus@mentor.com
Wed Mar 10 14:20:51 GMT 2021


If a variable appears in DATA, the following applies:

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."

The attached testcase was rejected as the implicit save was not honored.
There is no need to distinguish between SAVE and COMMON as common was/is
already accepted.

The code used only '&&' conditions without a '!' before the '('. Thus,
there is no need to indent half of the conditions ...

OK for mainline?

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omp-threadprivate.diff
Type: text/x-patch
Size: 1892 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210310/03dc564a/attachment.bin>


More information about the Gcc-patches mailing list