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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex <[email protected]>:

https://gcc.gnu.org/g:440449a667190137ad3465a9c1f921567e5e2604

commit r17-6101-g440449a667190137ad3465a9c1f921567e5e2604
Author: Waffl3x <[email protected]>
Date:   Fri Oct 30 02:10:27 2026 -0600

    OpenMP/C++: Reject omp_{cgroup,pteam,thread}_mem_alloc for static vars in
ALLOCATE directive [PR122892]

    Trivial fix to reject omp_cgroup_mem_alloc, omp_pteam_mem_alloc, and
    omp_thread_mem_alloc for variables of static lifetime.

    Also adjusts the related testcase as it incorrectly uses static on global
    variables, which instead means internal linkage in this context.

            PR c/122892

    gcc/cp/ChangeLog:

            * semantics.cc (finish_omp_allocate): Reject
            omp_{cgroup,pteam,thread}_mem_alloc for static vars.

    gcc/testsuite/ChangeLog:

            * c-c++-common/gomp/allocate-20.c: Remove sorry, add tests, remove
            static from globals.

    Signed-off-by: Waffl3x <[email protected]>

Reply via email to