https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99519
Bug ID: 99519 Summary: [OpenMP] PRIVATE/FIRSTPRIVATE with CLASS / polymorphic list items Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openmp Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- Follow-up to PR86470. Class variables need some special handling for PRIVATE/FIRSTPRIVATE in data-sharing constructs like: class(*), allocatable :: var1, var2 ... !$omp parallel private(var1) firstprivate(var2) ... !$omp end parallel The following patch handles FIRSTPRIVATE: https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566529.html Missing: * PRIVATE - which causes still ICEs, even though not for PR86470. → use dynamic type of var, apply default initializers * Polymorphic arrays not supported by FIRSTPRIVATE patch * Check that for TYPE, the default initializer is applied - what about the finalizer?