https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113436
Bug ID: 113436
Summary: [OpenMP] 'allocate' clause has no effect for
(first)private on 'target' directives
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: openmp, wrong-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
Created attachment 57112
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57112&action=edit
C/C++ testcase, compile with -fopenmp
The following code fails with an ABORT for the alignment check in the target
region as there is no 'omp_alloc' added for the privatized variables
(private/firstprivate).
It works in the parallel region.
See testcase.
* * *
For dynamic allocators, it depends on the WIP patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637415.html
but that should be a rather independent issue.
Found while working on PR c++/110347 – the being created patch contains for
that PR contains an #if 0 testcase, which shall be enabled once this PR is
fixed.