diff options
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index c1267dc..df5b6ce 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -12520,7 +12520,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx) || omp_is_allocatable_or_ptr (ovar)) { type = TREE_TYPE (type); - if (TREE_CODE (type) != ARRAY_TYPE + if (POINTER_TYPE_P (type) + && TREE_CODE (type) != ARRAY_TYPE && ((OMP_CLAUSE_CODE (c) != OMP_CLAUSE_USE_DEVICE_ADDR && !omp_is_allocatable_or_ptr (ovar)) || (omp_is_reference (ovar) @@ -12784,7 +12785,8 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx) if (omp_is_reference (var)) { type = TREE_TYPE (type); - if (TREE_CODE (type) != ARRAY_TYPE + if (POINTER_TYPE_P (type) + && TREE_CODE (type) != ARRAY_TYPE && (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_USE_DEVICE_ADDR || (omp_is_reference (var) && omp_is_allocatable_or_ptr (var)))) |