summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-14 17:48:38 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-14 17:48:38 +0000
commitf4046ef287ebc34ebe9becf8727cddf0fa24b9b8 (patch)
treed35512bb213148d0fc2fb989c4f5079c588f8957 /gcc/testsuite/gcc.dg
parent8af3b70e0ff91879ee6c47983fe0eb07cc48018e (diff)
downloadgcc-f4046ef287ebc34ebe9becf8727cddf0fa24b9b8.tar.gz
Backported from mainline
2012-06-07 Jakub Jelinek <jakub@redhat.com> PR middle-end/53580 * omp-low.c (scan_omp_1_stmt): If check_omp_nesting_restrictions returns false, replace stmt with GIMPLE_NOP. (check_omp_nesting_restrictions): Instead of issuing warnings, issue errors and return false if any errors were reported. * gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings. * gcc.dg/gomp/critical-4.c: Likewise. * gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise. * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise. * c-c++-common/gomp/pr53580.c: New test. * testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier, use GOMP_barrier () call instead. * testsuite/libgomp.c/pr26943-3.c: Likewise. * testsuite/libgomp.c/pr26943-4.c: Likewise. * testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier, call GOMP_barrier instead. * testsuite/libgomp.fortran/vla5.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188625 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/critical-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/gomp/nesting-1.c64
2 files changed, 34 insertions, 34 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/critical-4.c b/gcc/testsuite/gcc.dg/gomp/critical-4.c
index 530e7c976fc..8d4f6a79180 100644
--- a/gcc/testsuite/gcc.dg/gomp/critical-4.c
+++ b/gcc/testsuite/gcc.dg/gomp/critical-4.c
@@ -15,7 +15,7 @@ void
foo2 (void)
{
#pragma omp critical
- #pragma omp critical /* { dg-warning "with the same name" } */
+ #pragma omp critical /* { dg-error "with the same name" } */
bar (0);
}
@@ -23,6 +23,6 @@ void
foo3 (void)
{
#pragma omp critical(foo)
- #pragma omp critical(foo) /* { dg-warning "with the same name" } */
+ #pragma omp critical(foo) /* { dg-error "with the same name" } */
bar (0);
}
diff --git a/gcc/testsuite/gcc.dg/gomp/nesting-1.c b/gcc/testsuite/gcc.dg/gomp/nesting-1.c
index 6f27b907e6b..df57ac845f7 100644
--- a/gcc/testsuite/gcc.dg/gomp/nesting-1.c
+++ b/gcc/testsuite/gcc.dg/gomp/nesting-1.c
@@ -8,89 +8,89 @@ f1 (void)
#pragma omp for
for (i = 0; i < 3; i++)
{
- #pragma omp for /* { dg-warning "may not be closely nested" } */
+ #pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
- #pragma omp sections /* { dg-warning "may not be closely nested" } */
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
- #pragma omp single /* { dg-warning "may not be closely nested" } */
+ #pragma omp single /* { dg-error "may not be closely nested" } */
;
- #pragma omp master /* { dg-warning "may not be closely nested" } */
+ #pragma omp master /* { dg-error "may not be closely nested" } */
;
- #pragma omp barrier /* { dg-warning "may not be closely nested" } */
+ #pragma omp barrier /* { dg-error "may not be closely nested" } */
}
#pragma omp sections
{
- #pragma omp for /* { dg-warning "may not be closely nested" } */
+ #pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
- #pragma omp sections /* { dg-warning "may not be closely nested" } */
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
- #pragma omp single /* { dg-warning "may not be closely nested" } */
+ #pragma omp single /* { dg-error "may not be closely nested" } */
;
- #pragma omp master /* { dg-warning "may not be closely nested" } */
+ #pragma omp master /* { dg-error "may not be closely nested" } */
;
#pragma omp section
;
}
#pragma omp single
{
- #pragma omp for /* { dg-warning "may not be closely nested" } */
+ #pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
- #pragma omp sections /* { dg-warning "may not be closely nested" } */
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
- #pragma omp single /* { dg-warning "may not be closely nested" } */
+ #pragma omp single /* { dg-error "may not be closely nested" } */
;
- #pragma omp master /* { dg-warning "may not be closely nested" } */
+ #pragma omp master /* { dg-error "may not be closely nested" } */
;
- #pragma omp barrier /* { dg-warning "may not be closely nested" } */
+ #pragma omp barrier /* { dg-error "may not be closely nested" } */
}
#pragma omp master
{
- #pragma omp for /* { dg-warning "may not be closely nested" } */
+ #pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
- #pragma omp sections /* { dg-warning "may not be closely nested" } */
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
- #pragma omp single /* { dg-warning "may not be closely nested" } */
+ #pragma omp single /* { dg-error "may not be closely nested" } */
;
#pragma omp master
;
- #pragma omp barrier /* { dg-warning "may not be closely nested" } */
+ #pragma omp barrier /* { dg-error "may not be closely nested" } */
}
#pragma omp task
{
- #pragma omp for /* { dg-warning "may not be closely nested" } */
+ #pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
- #pragma omp sections /* { dg-warning "may not be closely nested" } */
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
- #pragma omp single /* { dg-warning "may not be closely nested" } */
+ #pragma omp single /* { dg-error "may not be closely nested" } */
;
- #pragma omp master /* { dg-warning "may not be closely nested" } */
+ #pragma omp master /* { dg-error "may not be closely nested" } */
;
- #pragma omp barrier /* { dg-warning "may not be closely nested" } */
+ #pragma omp barrier /* { dg-error "may not be closely nested" } */
}
#pragma omp parallel
{
@@ -117,20 +117,20 @@ f2 (void)
int i, j;
#pragma omp ordered
{
- #pragma omp for /* { dg-warning "may not be closely nested" } */
+ #pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
- #pragma omp sections /* { dg-warning "may not be closely nested" } */
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
- #pragma omp single /* { dg-warning "may not be closely nested" } */
+ #pragma omp single /* { dg-error "may not be closely nested" } */
;
#pragma omp master
;
- #pragma omp barrier /* { dg-warning "may not be closely nested" } */
+ #pragma omp barrier /* { dg-error "may not be closely nested" } */
}
}
@@ -139,7 +139,7 @@ f3 (void)
{
#pragma omp critical
{
- #pragma omp ordered /* { dg-warning "may not be closely nested" } */
+ #pragma omp ordered /* { dg-error "may not be closely nested" } */
;
}
}
@@ -149,7 +149,7 @@ f4 (void)
{
#pragma omp task
{
- #pragma omp ordered /* { dg-warning "may not be closely nested" } */
+ #pragma omp ordered /* { dg-error "may not be closely nested" } */
;
}
}
@@ -161,7 +161,7 @@ f5 (void)
#pragma omp for
for (i = 0; i < 10; i++)
{
- #pragma omp ordered /* { dg-warning "must be closely nested" } */
+ #pragma omp ordered /* { dg-error "must be closely nested" } */
;
}
#pragma omp for ordered
@@ -190,9 +190,9 @@ f7 (void)
#pragma omp critical
;
#pragma omp critical (bar)
- #pragma omp critical (bar) /* { dg-warning "may not be nested" } */
+ #pragma omp critical (bar) /* { dg-error "may not be nested" } */
;
#pragma omp critical
- #pragma omp critical /* { dg-warning "may not be nested" } */
+ #pragma omp critical /* { dg-error "may not be nested" } */
;
}