[Bug fortran/38979] OpenMP extension: THREADPRIVATE for EQUIVALENCEd symbols

matevz dot tadel at cern dot ch gcc-bugzilla@gcc.gnu.org
Mon Jun 8 10:43:00 GMT 2009



------- Comment #9 from matevz dot tadel at cern dot ch  2009-06-08 10:42 -------
Replying to comment 7:

> do you require all equivalenced vars to be either threadprivate
> or non-threadprivate?
> or, does a single threadprivate var make all vars equivalenced somehow to
> it threadprivate?

It would be cleaner and less ambiguous if all equivalenced commons/variables
are required to be declared threadprivate.

> There is a problem for saved variables - there the equivalence does not work.
>  One has two options:
>  1. Remove the equivalence statements and replace the aliases in the code.
>  2. Create a "local" common block with the saved variables. If the variables
>     were initialized via data statements one has to take care of that at the
>     first entry into the routine.

This was more a technical comment as SAVE statement was not discussed before
and in our legacy code we also had 3 such occurrences (equivalence among saved
array elements and local variables). The patch does not address the SAVEd
variables, so an error is still generated. Potentially the scope of the patch
could be extended to also cover the SAVE statement.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38979



More information about the Gcc-bugs mailing list