[Patch, Fortran] PR32359 OpenMP threadprivate: SAVE is implied by explicit initialization
Daniel Franke
franke.daniel@gmail.com
Sat Jun 16 10:55:00 GMT 2007
On Saturday 16 June 2007 10:58:13 Tobias Burnus wrote:
> Build and check-gfortran and check-libgomp tested on
> x86_64-unknown-linux-gnu
> Ok for the trunk?
Tobias,
any specific reason why you high-jacked that PR?
I had it already assigned to me :)
Comments to your patch: it fixes only the one issue with threadprivate, but
there may be other situations in which we only check for an explicit SAVE
statement, but should also know about implied SAVEs -- as shown in this PR.
Instead of fixes them one by one, I'd suggest to change the save-attribute in
in 'symbol_attribute' from a boolean to a tri-state, say: SAVE_NONE = 0,
SAVE_EXPLICIT, SAVE_IMPLICIT.
Checks as
if (attr->save)
/* */
would then actually test (verbally): "if there is an explicit SAVE statement
or if SAVE is implied, then", thus fixing all tests for SAVE in one go. This
would also propage the implied SAVE attribute into modules (which currently
is only done if explicitely stated).
The attached patch works and was regtested on i686-pc-linux-gnu.
Regards
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr32359.patch
Type: text/x-diff
Size: 1842 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070616/1f8565f5/attachment.bin>
More information about the Fortran
mailing list