]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/pt.c
openmp: Improve OpenMP target support for C++ (PR92120)
[thirdparty/gcc.git] / gcc / cp / pt.c
index d3efc6ea23805251dafc25aca1842e2003a5fdb4..9834baf34dbc2eb98d77bd3ee700de8a771f18c3 100644 (file)
@@ -18975,6 +18975,11 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
       t = copy_node (t);
       OMP_BODY (t) = stmt;
       OMP_CLAUSES (t) = tmp;
+
+      if (TREE_CODE (t) == OMP_TARGET)
+       finish_omp_target_clauses (EXPR_LOCATION (t), OMP_BODY (t),
+                                  &OMP_CLAUSES (t));
+
       if (TREE_CODE (t) == OMP_TARGET && OMP_TARGET_COMBINED (t))
        {
          tree teams = cp_walk_tree (&stmt, tsubst_find_omp_teams, NULL, NULL);