* parser.c (cp_parser_omp_parallel): For non-combined parallel
call cp_parser_statement rather than
cp_parser_already_scoped_statement.
* testsuite/libgomp.c/pr34513.c: New test.
* testsuite/libgomp.c++/pr34513.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131059
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/34513
+ * parser.c (cp_parser_omp_parallel): For non-combined parallel
+ call cp_parser_statement rather than
+ cp_parser_already_scoped_statement.
+
2007-12-18 Jason Merrill <jason@redhat.com>
PR c++/34206
switch (p_kind)
{
case PRAGMA_OMP_PARALLEL:
- cp_parser_already_scoped_statement (parser);
+ cp_parser_statement (parser, NULL_TREE, false, NULL);
par_clause = clauses;
break;
+2007-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/34513
+ * testsuite/libgomp.c/pr34513.c: New test.
+ * testsuite/libgomp.c++/pr34513.C: New test.
+
2007-12-17 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/32765
--- /dev/null
+// PR c++/34513
+// { dg-do run }
+
+#include <omp.h>
+
+extern "C" void abort ();
+
+static int errors = 0;
+static int thrs = 4;
+
+int
+main ()
+{
+ omp_set_dynamic (0);
+
+ #pragma omp parallel num_threads (thrs)
+ {
+ static int shrd = 0;
+
+ #pragma omp atomic
+ shrd += 1;
+
+ #pragma omp barrier
+
+ if (shrd != thrs)
+ #pragma omp atomic
+ errors += 1;
+ }
+
+ if (errors)
+ abort ();
+}
--- /dev/null
+/* PR c++/34513 */
+/* { dg-do run } */
+
+#include <omp.h>
+
+extern void abort ();
+
+static int errors = 0;
+static int thrs = 4;
+
+int
+main ()
+{
+ omp_set_dynamic (0);
+
+ #pragma omp parallel num_threads (thrs)
+ {
+ static int shrd = 0;
+
+ #pragma omp atomic
+ shrd += 1;
+
+ #pragma omp barrier
+
+ if (shrd != thrs)
+ #pragma omp atomic
+ errors += 1;
+ }
+
+ if (errors)
+ abort ();
+ return 0;
+}