From: Jakub Jelinek Date: Thu, 30 Jun 2016 17:39:52 +0000 (+0200) Subject: re PR fortran/71705 (ICE in lower_omp_target, at omp-low.c:16136) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=351beab7f57e82ee88abaedc407ff793542c08ab;p=gcc.git 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 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6ac8eafb667..ea16f8587a8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2016-06-30 Jakub Jelinek + + PR fortran/71705 + * trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on + decls in to/from clauses. + 2016-06-29 Jerry DeLisle PR fortran/71686 diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index ab07fe45be9..b005d392f47 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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4081bd6846b..e9c6f19712a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-06-30 Jakub Jelinek + + PR fortran/71705 + * gfortran.dg/gomp/pr71705.f90: New test. + 2016-06-30 Kelvin Nilsen * gcc.target/powerpc/dfp/dfp.exp: New dejagnu test script. diff --git a/gcc/testsuite/gfortran.dg/gomp/pr71705.f90 b/gcc/testsuite/gfortran.dg/gomp/pr71705.f90 new file mode 100644 index 00000000000..4813aacfdc3 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/pr71705.f90 @@ -0,0 +1,7 @@ +! PR fortran/71705 +! { dg-do compile } + + real :: x + x = 0.0 + !$omp target update to(x) +end