@@ -1,3 +1,10 @@
+2021-02-24 Julian Brown <julian@codesourcery.com>
+
+ Backport from mainline
+
+ * trans-openmp.c (gfc_trans_omp_clauses): Use class_pointer attribute
+ for BT_CLASS.
+
2021-02-24 Julian Brown <julian@codesourcery.com>
Backport from mainline
@@ -2973,7 +2973,10 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
if (lastcomp->u.c.component->ts.type == BT_DERIVED
|| lastcomp->u.c.component->ts.type == BT_CLASS)
{
- if (sym_attr.pointer || (openacc && sym_attr.allocatable))
+ bool pointer
+ = (lastcomp->u.c.component->ts.type == BT_CLASS
+ ? sym_attr.class_pointer : sym_attr.pointer);
+ if (pointer || (openacc && sym_attr.allocatable))
{
tree data, size;