aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-10-29 14:31:20 +0000
committerJulian Brown <jules@gcc.gnu.org>2018-10-29 14:31:20 +0000
commit87a5ccfb7cbabcf510f7909387a16cc0f73931f3 (patch)
tree1427799828cfe5acd429f9f6512bd95c631c1afc /gcc
parent5d8c32cb86043e388fddc9833d9c2cd90ed05284 (diff)
downloadgcc-87a5ccfb7cbabcf510f7909387a16cc0f73931f3.zip
gcc-87a5ccfb7cbabcf510f7909387a16cc0f73931f3.tar.gz
gcc-87a5ccfb7cbabcf510f7909387a16cc0f73931f3.tar.bz2
[OpenACC] Support C++ "this" in OpenACC directives
2018-10-29 Joseph Myers <joseph@codesourcery.com> Julian Brown <julian@codesourcery.com> * semantics.c (handle_omp_array_sections_1): Allow array sections with "this" pointer for OpenACC. Co-Authored-By: Julian Brown <julian@codesourcery.com> From-SVN: r265591
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/semantics.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 27b739c..9130b86 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-29 Joseph Myers <joseph@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+
+ PR c++/66053
+ * semantics.c (handle_omp_array_sections_1): Allow array
+ sections with "this" pointer for OpenACC.
+
2018-10-25 Jason Merrill <jason@redhat.com>
* parser.c (cp_parser_sizeof_operand): Remove redundant use of
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index c7f53d1..4c05365 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -4600,7 +4600,8 @@ handle_omp_array_sections_1 (tree c, tree t, vec<tree> &types,
omp_clause_code_name[OMP_CLAUSE_CODE (c)]);
return error_mark_node;
}
- else if (TREE_CODE (t) == PARM_DECL
+ else if (ort == C_ORT_OMP
+ && TREE_CODE (t) == PARM_DECL
&& DECL_ARTIFICIAL (t)
&& DECL_NAME (t) == this_identifier)
{