diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-06-30 19:39:52 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-06-30 19:39:52 +0200 |
commit | 351beab7f57e82ee88abaedc407ff793542c08ab (patch) | |
tree | 3a088fb6ebdb57541d5260fd4ddb760455645693 /gcc/fortran/trans-openmp.c | |
parent | 5a3a6a5eaed91e241fe879af65162507eafd6e5f (diff) | |
download | gcc-351beab7f57e82ee88abaedc407ff793542c08ab.zip gcc-351beab7f57e82ee88abaedc407ff793542c08ab.tar.gz gcc-351beab7f57e82ee88abaedc407ff793542c08ab.tar.bz2 |
re PR fortran/71705 (ICE in lower_omp_target, at omp-low.c:16136)
PR fortran/71705
* trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
decls in to/from clauses.
* gfortran.dg/gomp/pr71705.f90: New test.
From-SVN: r237887
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index ab07fe4..b005d39 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -2182,6 +2182,8 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses, tree decl = gfc_get_symbol_decl (n->sym); if (gfc_omp_privatize_by_reference (decl)) decl = build_fold_indirect_ref (decl); + else if (DECL_P (decl)) + TREE_ADDRESSABLE (decl) = 1; if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (decl))) { tree type = TREE_TYPE (decl); |