Bug 38947 - Request for extension allowing usage of equivalence statement for threadprivate data
Summary: Request for extension allowing usage of equivalence statement for threadpriva...
Status: RESOLVED DUPLICATE of bug 38979
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.2
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: openmp
Depends on:
Blocks:
 
Reported: 2009-01-23 16:23 UTC by Matevz Tadel
Modified: 2009-01-26 18:50 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matevz Tadel 2009-01-23 16:23:43 UTC
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.
Comment 1 Daniel Franke 2009-01-26 18:50:32 UTC
Closing this as dupe as the other PR has the same plus additional information.

*** This bug has been marked as a duplicate of 38979 ***