2020-04-07 Jakub Jelinek <jakub@redhat.com>
+ PR c++/94512
+ * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
+ if c_parser_omp_master succeeded.
+
Backported from mainline
2020-03-23 Jakub Jelinek <jakub@redhat.com>
stmt = c_finish_omp_parallel (loc,
cclauses[C_OMP_CLAUSE_SPLIT_PARALLEL],
block);
- OMP_PARALLEL_COMBINED (stmt) = 1;
if (ret == NULL)
return ret;
+ OMP_PARALLEL_COMBINED (stmt) = 1;
return stmt;
}
else if (!flag_openmp) /* flag_openmp_simd */
2020-04-07 Jakub Jelinek <jakub@redhat.com>
+ PR c++/94512
+ * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
+ if cp_parser_omp_master succeeded.
+
Backported from mainline
2020-04-04 Jakub Jelinek <jakub@redhat.com>
cp_parser_end_omp_structured_block (parser, save);
stmt = finish_omp_parallel (cclauses[C_OMP_CLAUSE_SPLIT_PARALLEL],
block);
- OMP_PARALLEL_COMBINED (stmt) = 1;
if (ret == NULL_TREE)
return ret;
+ OMP_PARALLEL_COMBINED (stmt) = 1;
return stmt;
}
else if (!flag_openmp) /* flag_openmp_simd */
2020-04-07 Jakub Jelinek <jakub@redhat.com>
+ PR c++/94512
+ * g++.dg/gomp/pr94512.C: New test.
+
PR target/94488
* gcc.c-torture/compile/pr94488.c: New test.
--- /dev/null
+// PR c++/94512
+
+void
+foo ();
+
+template <int>
+void
+bar ()
+{
+#pragma omp parallel master taskloop
+ foo (); // { dg-error "for statement expected before" }
+}
+
+void
+baz ()
+{
+ bar<0> ();
+}