diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/cp-gimplify.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4c1518995e0f..e86a37f3526e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2017-09-15 Jakub Jelinek <jakub@redhat.com> + + Backported from mainline + 2017-09-14 Jakub Jelinek <jakub@redhat.com> + + PR c++/81314 + * cp-gimplify.c (omp_var_to_track): Look through references. + (omp_cxx_notice_variable): Likewise. + 2017-09-09 Eric Botcazou <ebotcazou@adacore.com> PR bootstrap/81926 diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index eae2a55a029f..7e7f3a2d1018 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -924,6 +924,8 @@ omp_var_to_track (tree decl) tree type = TREE_TYPE (decl); if (is_invisiref_parm (decl)) type = TREE_TYPE (type); + else if (TREE_CODE (type) == REFERENCE_TYPE) + type = TREE_TYPE (type); while (TREE_CODE (type) == ARRAY_TYPE) type = TREE_TYPE (type); if (type == error_mark_node || !CLASS_TYPE_P (type)) @@ -976,6 +978,8 @@ omp_cxx_notice_variable (struct cp_genericize_omp_taskreg *omp_ctx, tree decl) tree type = TREE_TYPE (decl); if (is_invisiref_parm (decl)) type = TREE_TYPE (type); + else if (TREE_CODE (type) == REFERENCE_TYPE) + type = TREE_TYPE (type); while (TREE_CODE (type) == ARRAY_TYPE) type = TREE_TYPE (type); get_copy_ctor (type, tf_none); |