On Tue, Feb 17, 2026 at 05:40:39PM +0100, Tobias Burnus wrote:
> It seems to be uncontroversial that mixing groupprivate + threadprivate won't
> work.
> And OpenMP spec issue 4663 also passed the first vote to restrict this.
>
> Any comments before I commit the attached patch?
>
> Tobias
> OpenMP/Fortran: Error for groupprivate + threadprivate
>
> As OpenMP spec issue 4663 has been voted on, replace warning by error when
> mixing threadprivate with groupprivate.
>
> gcc/fortran/ChangeLog:
>
> * symbol.cc (gfc_check_conflict): Reject mixing OpenMP threadprivate
> with groupprivate.
> * trans-common.cc (build_common_decl): Remove warning when mixing
> threadprivate with groupprivate.
> * trans-decl.cc (add_attributes_to_decl): Likewise.
>
> gcc/testsuite/ChangeLog:
>
> * gfortran.dg/gomp/groupprivate-1.f90: Update test.
> * gfortran.dg/gomp/groupprivate-4.f90: Likewise.
> * gfortran.dg/gomp/groupprivate-6.f90: Likewise.
> * gfortran.dg/gomp/groupprivate-7.f90: Extend test.
LGTM.
Jakub