https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92730
Bug ID: 92730
Summary: [OpenMP] Common blocks in map() clause not accepted
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: openmp
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
See also PR 92728 and the thread at
https://gcc.gnu.org/ml/gcc-patches/2019-11/threads.html#00717
Pre-remark, as remembered just now:
"Named common blocks of the same name shall be of the same size in all scoping
units of a program in which they appear, but blank common blocks may be of
different sizes." (Fortran 2018, 8.10.2.5)
From the thread:
> In OpenMP 5, common blocks appear twice – once [2.1, p.39, ll.11ff.] as
> general rule in the definition of "list item" (which are inherited by
> "extended list item" and "locator-list item"). [There are also some
> constraints and notes regarding common blocks)]. It does not really tell
> whether blank commons are permitted or not; some description is
> explicitly for named-common variables, leaving blank-common ones out
> (and undefined). But later sections explicitly make reference to blank
> commons, hence, one can assume they are permitted unless explicitly
> stated that they are not.
>
> And then very selectively for some items:
> * allocate – only with default allocator.
> * declare target – some restrictions and no blank commons
> * depend clause – no common permitted
> * threadprivate – some notes and explanation of the syntax (why?)
> also only here requirement regarding common blocks with bind(c)
> (why not also for declare target?)
> * linear clause – no common permitted
> * copyin – some notes
> * copyprivate – some notes
>
> As target test cases were suspiciously left out, I tries '!$omp target
> map(/name/)' which was rejected.