https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103385

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
To expand on this, reduction(+:temps[0]) is handled by creating private double
temps_priv[1]; variable and arranging for temps to be remapped to
*&temps_priv[0].  Only temps[0] or &temps[1] can be accessed safely in that
case.
reduction(+:temps[1]) is handled by creating private double temps_priv2[1];
variable and arranging for temps to be remapped to *(&temps_priv2[0] - 1)
(which is not valid C/C++, but compiler can of course do it).  Only temps[1] or
&temps[2] can be accessed safely in that case.
But, if you privatize both, what will temps become?

We do have exceptions that one can privatize in methods the non-static data
members of the current class but have restrictions that one can't access those
through this->member, but only member, so member1 and member2 are then
privatized separately.  That is not what we have for this case.

Reply via email to