aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2015-04-29 11:04:31 +0200
committerThomas Schwinge <tschwinge@gcc.gnu.org>2015-04-29 11:04:31 +0200
commit2c8f068300e1fc38c73a992f82c0d19af55ded04 (patch)
treed5215eb965e1453034a609a2f7d2d090278f787d /gcc/cp
parentb504063421d10afa572be9734468fc6ccff51186 (diff)
downloadgcc-2c8f068300e1fc38c73a992f82c0d19af55ded04.zip
gcc-2c8f068300e1fc38c73a992f82c0d19af55ded04.tar.gz
gcc-2c8f068300e1fc38c73a992f82c0d19af55ded04.tar.bz2
Fix OpenMP's target update directive in templated code.
FAIL: g++.dg/gomp/tpl-target-update.C -std=c++98 (internal compiler error) FAIL: g++.dg/gomp/tpl-target-update.C -std=c++98 (test for excess errors) FAIL: g++.dg/gomp/tpl-target-update.C -std=c++11 (internal compiler error) FAIL: g++.dg/gomp/tpl-target-update.C -std=c++11 (test for excess errors) FAIL: g++.dg/gomp/tpl-target-update.C -std=c++14 (internal compiler error) FAIL: g++.dg/gomp/tpl-target-update.C -std=c++14 (test for excess errors) [...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C: In instantiation of 'void f(T, T) [with T = int]': [...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C:19:9: required from here [...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C:10:9: internal compiler error: tree check: expected oacc_parallel or oacc_kernels or oacc_data or oacc_host_data or omp_parallel or omp_task or omp_for or omp_simd or cilk_simd or cilk_for or omp_distribute or oacc_loop or omp_teams or omp_target_data or omp_target or omp_sections or omp_single, have omp_target_update in tsubst_expr, at cp/pt.c:14209 0xf5aae1 tree_range_check_failed(tree_node const*, char const*, int, char const*, tree_code, tree_code) [...]/source-gcc/gcc/tree.c:9384 0x66e201 tree_range_check [...]/source-gcc/gcc/tree.h:2979 0x66e201 tsubst_expr [...]/source-gcc/gcc/cp/pt.c:14209 0x6695e3 tsubst_expr [...]/source-gcc/gcc/cp/pt.c:13752 0x66ac07 tsubst_expr [...]/source-gcc/gcc/cp/pt.c:13938 0x667c41 instantiate_decl(tree_node*, int, bool) [...]/source-gcc/gcc/cp/pt.c:20367 0x6ae386 instantiate_pending_templates(int) [...]/source-gcc/gcc/cp/pt.c:20484 0x6edc3d cp_write_global_declarations() [...]/source-gcc/gcc/cp/decl2.c:4456 gcc/cp/ * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES. gcc/testsuite/ * g++.dg/gomp/tpl-target-update.C: New file. From-SVN: r222564
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a2d2a7c..cc716b8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
+
+ * pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
+ OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
+
2015-04-28 Jason Merrill <jason@redhat.com>
PR c++/65896
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ea0d3bc..8e0e789 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -14203,7 +14203,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
tmp = tsubst_omp_clauses (OMP_TARGET_UPDATE_CLAUSES (t), false,
args, complain, in_decl);
t = copy_node (t);
- OMP_CLAUSES (t) = tmp;
+ OMP_TARGET_UPDATE_CLAUSES (t) = tmp;
add_stmt (t);
break;