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

--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> ---
[OpenACC]
The following patch fixes the "firstprivate(z)" issue – but it also assumes
that a pointer variable is not undefined (only null/not associated or
associated is fine); interestingly, it also yields "copy(.z)" – not only
"copy(z)".

--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -7311 +7311 @@ oacc_default_clause (struct gimplify_omp_ctx *ctx, tree decl,
unsigned flags)
-      else if (AGGREGATE_TYPE_P (type))
+      else if (AGGREGATE_TYPE_P (type) || omp_is_allocatable_or_ptr (decl))

Reply via email to