diff options
author | Jakub Jelinek <jakub@redhat.com> | 2018-12-12 23:49:35 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-12-12 23:49:35 +0100 |
commit | 7a289b7d0ac7f26a7f5e8d27608ce5e67317cc37 (patch) | |
tree | 99a5b349277ac3b08c6de974105bedd12b412151 /gcc/fortran/trans-openmp.c | |
parent | 44cacba39d28fcf92f328957be7e20398dee7de2 (diff) | |
download | gcc-7a289b7d0ac7f26a7f5e8d27608ce5e67317cc37.zip gcc-7a289b7d0ac7f26a7f5e8d27608ce5e67317cc37.tar.gz gcc-7a289b7d0ac7f26a7f5e8d27608ce5e67317cc37.tar.bz2 |
re PR fortran/88463 (Rejects conforming source, OpenMP Parallel region Default(None) reference to module parameter array, separate source)
PR fortran/88463
* trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
* testsuite/libgomp.fortran/pr88463-1.f90: New test.
* testsuite/libgomp.fortran/pr88463-2.f90: New test.
From-SVN: r267069
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index bf3f469..37acef6 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -149,7 +149,8 @@ gfc_omp_predetermined_sharing (tree decl) variables at all (they can't be redefined), but they can nevertheless appear in parallel/task regions and for default(none) purposes treat them as shared. For vtables likely the same handling is desirable. */ - if (VAR_P (decl) && TREE_READONLY (decl) && TREE_STATIC (decl)) + if (VAR_P (decl) && TREE_READONLY (decl) + && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) return OMP_CLAUSE_DEFAULT_SHARED; return OMP_CLAUSE_DEFAULT_UNSPECIFIED; |