[Bug fortran/125016] Complex designator syntax error in OpenMP construct
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 25 06:12:37 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125016
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Ivan Pribec from comment #2)
> That sounds convincing, but what purpose (if any) does OpenMP 5.2 [96:27-28]
> serve then? Couldn't it be part of the "unless otherwise specified"? This is
> confusing.
That means that if a body of certain OpenMP construct uses t%re or t%im, it is
treated as if it references the whole t.
> I was allowed to use a%kind in the simdlen clause, but okay in that case it
> was as an integer expression. A different example of privatizing the type
> parameter inquiry %kind is also rejected.
Sure, in expressions it is fine. Parts of variables are generally allowed in
e.g. map clause. For the privatization clauses with a few exceptions one needs
to specify a variable name in the list alone and that privatizes the whole
variable. Exceptions are e.g. exactly for reduction clauses in [131:7] - array
sections are allowed in reduction clauses (that is the unless otherwise
specified), or e.g. in C++ in methods one can privatize members of the current
class separately from the whole class object.
More information about the Gcc-bugs
mailing list