aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-11-27 09:59:55 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-11-27 09:59:55 +0100
commitaec17bfe911ec61571db80eb5b0093a5b19e39e4 (patch)
treee72671d0f3333ec8e1457d802ba502e75e9746ea /libgomp
parent5e48d8a09e4aefa3cdd6e0971c52b1665ef69e34 (diff)
downloadgcc-aec17bfe911ec61571db80eb5b0093a5b19e39e4.zip
gcc-aec17bfe911ec61571db80eb5b0093a5b19e39e4.tar.gz
gcc-aec17bfe911ec61571db80eb5b0093a5b19e39e4.tar.bz2
re PR c/63326 (whether a #pragma is a statement depends on the type of pragma)
PR c/63326 * c-parser.c (c_parser_compound_statement_nostart): If last_label is true, use pragma_stmt instead of pragma_compound as second c_parser_pragma argument. (c_parser_omp_ordered, c_parser_omp_target_update, c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass false as second argument to c_parser_skip_to_pragma_eol after diagnosing standalone directives used in pragma_stmt context. * parser.c (cp_parser_statement): Clear in_compound after labels. * gcc.dg/gomp/barrier-2.c (f2): Expect another error after label. * c-c++-common/gomp/pr63326.c: New test. * testsuite/libgomp.c/cancel-parallel-2.c (foo): Add semicolon in between case label and OpenMP standalone directives. * testsuite/libgomp.c++/cancel-parallel-2.C (foo): Likewise. From-SVN: r230999
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog7
-rw-r--r--libgomp/testsuite/libgomp.c++/cancel-parallel-2.C4
-rw-r--r--libgomp/testsuite/libgomp.c/cancel-parallel-2.c4
3 files changed, 11 insertions, 4 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 75a9b4a..9b320b3c 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,10 @@
+2015-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/63326
+ * testsuite/libgomp.c/cancel-parallel-2.c (foo): Add semicolon
+ in between case label and OpenMP standalone directives.
+ * testsuite/libgomp.c++/cancel-parallel-2.C (foo): Likewise.
+
2015-11-26 David Edelsohn <dje.gcc@gmail.com>
* configure: Regenerate.
diff --git a/libgomp/testsuite/libgomp.c++/cancel-parallel-2.C b/libgomp/testsuite/libgomp.c++/cancel-parallel-2.C
index 340423b..23b8caa 100644
--- a/libgomp/testsuite/libgomp.c++/cancel-parallel-2.C
+++ b/libgomp/testsuite/libgomp.c++/cancel-parallel-2.C
@@ -17,7 +17,7 @@ foo (int *x)
int thr = omp_get_thread_num ();
switch (x[thr])
{
- case 4:
+ case 4:;
#pragma omp cancel parallel
break;
case 3:
@@ -31,7 +31,7 @@ foo (int *x)
case 2:
usleep (1000);
/* FALLTHRU */
- case 1:
+ case 1:;
#pragma omp cancellation point parallel
break;
}
diff --git a/libgomp/testsuite/libgomp.c/cancel-parallel-2.c b/libgomp/testsuite/libgomp.c/cancel-parallel-2.c
index cae0aa4..20adb55 100644
--- a/libgomp/testsuite/libgomp.c/cancel-parallel-2.c
+++ b/libgomp/testsuite/libgomp.c/cancel-parallel-2.c
@@ -13,7 +13,7 @@ foo (int *x)
int thr = omp_get_thread_num ();
switch (x[thr])
{
- case 4:
+ case 4:;
#pragma omp cancel parallel
break;
case 3:
@@ -27,7 +27,7 @@ foo (int *x)
case 2:
usleep (1000);
/* FALLTHRU */
- case 1:
+ case 1:;
#pragma omp cancellation point parallel
break;
}