[Bug fortran/38979] OpenMP extension: THREADPRIVATE for EQUIVALENCEd symbols
--- 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
[Bug fortran/38947] New: openmp, fortran - request for extension allowing usage of equivalence statement for threadprivate data
Legacy f77 code often uses equivalence statements between array elements and common members extensively, e.g.: COMMON/GCPARM/IPARAM,PCUTGA,PCUTEL,PCUTNE,PCUTHA,PCUTMU + ,NSPARA,MPSTAK,NPGENE REAL PACUTS(5) EQUIVALENCE (PACUTS(1),PCUTGA) When parallelizing such code with OpenMP one would aspire to achieve this with the following pragma: !$omp threadprivate(/GCPARM/, PACUTS) OpenMP specification states that common members and variables with the threadprivate specifier must not be present in equivalence statements. The proposed extension would lift this restriction for cases when the equivalence is requested among variables that are all threadprivate within the same compilation unit. -- Summary: openmp, fortran - request for extension allowing usage of equivalence statement for threadprivate data Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: matevz dot tadel at cern dot ch GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38947