diff options
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index 7c381db..b068330 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -50,9 +50,12 @@ gfc_omp_privatize_by_reference (tree decl) if (TREE_CODE (type) == POINTER_TYPE) { - /* POINTER/ALLOCATABLE have aggregate types, all user variables - that have POINTER_TYPE type are supposed to be privatized - by reference. */ + /* Array POINTER/ALLOCATABLE have aggregate types, all user variables + that have POINTER_TYPE type and don't have GFC_POINTER_TYPE_P + set are supposed to be privatized by reference. */ + if (GFC_POINTER_TYPE_P (type)) + return false; + if (!DECL_ARTIFICIAL (decl)) return true; |