diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-07 06:36:55 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-07 06:36:55 +0000 |
commit | ab1290759ca45ad580a7de2e18af3e17cbc80788 (patch) | |
tree | 89f8ace7255b869a0b352a67d12b9eb752a32289 /libgomp | |
parent | 64c9a6cd4d12b4299914e0db14e182ea7004af66 (diff) | |
download | gcc-ab1290759ca45ad580a7de2e18af3e17cbc80788.tar.gz |
PR middle-end/53580
* omp-low.c (scan_omp): Change first argument to
gimple_seq *, call walk_gimple_seq_mod instead of
walk_gimple_seq.
(scan_sharing_clauses, scan_omp_parallel, scan_omp_task,
scan_omp_for, scan_omp_sections, scan_omp_single,
execute_lower_omp): Adjust callers.
(scan_omp_1_stmt): Likewise. 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/trunk@188298 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 11 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr26943-2.c | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr26943-3.c | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr26943-4.c | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/vla4.f90 | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/vla5.f90 | 6 |
6 files changed, 30 insertions, 8 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index f22c41a728f..df2bfb50450 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,14 @@ +2012-06-07 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/53580 + * 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. + 2012-06-06 Jakub Jelinek <jakub@redhat.com> PR libgomp/52993 diff --git a/libgomp/testsuite/libgomp.c/pr26943-2.c b/libgomp/testsuite/libgomp.c/pr26943-2.c index c052e811288..2ed21ae963e 100644 --- a/libgomp/testsuite/libgomp.c/pr26943-2.c +++ b/libgomp/testsuite/libgomp.c/pr26943-2.c @@ -3,6 +3,7 @@ extern int omp_set_dynamic (int); extern void abort (void); +extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; @@ -20,7 +21,7 @@ main (void) { if (a != 8 || b != 12 || e[0] != 'a' || f[0] != 'b') j++; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); #pragma omp atomic a += i; b += i; @@ -31,7 +32,7 @@ main (void) f[0] += i; g[0] = 'g' + i; h[0] = 'h' + i; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); if (a != 8 + 6 || b != 12 + i || c != i || d != i) j += 8; if (e[0] != 'a' + 6 || f[0] != 'b' + i || g[0] != 'g' + i) diff --git a/libgomp/testsuite/libgomp.c/pr26943-3.c b/libgomp/testsuite/libgomp.c/pr26943-3.c index dc3d5010da1..855a4b27446 100644 --- a/libgomp/testsuite/libgomp.c/pr26943-3.c +++ b/libgomp/testsuite/libgomp.c/pr26943-3.c @@ -4,6 +4,7 @@ extern int omp_set_dynamic (int); extern int omp_get_thread_num (void); extern void abort (void); +extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; @@ -26,7 +27,7 @@ main (void) { if (a != 8 || b != 12 || e[0] != 'a' || f[0] != 'b') j++; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); #pragma omp atomic a += i; b += i; @@ -37,7 +38,7 @@ main (void) f[0] += i; g[0] = 'g' + i; h[0] = 'h' + i; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); if (a != 8 + 6 || b != 12 + i || c != i || d != i) j += 8; if (e[0] != 'a' + 6 || f[0] != 'b' + i || g[0] != 'g' + i) diff --git a/libgomp/testsuite/libgomp.c/pr26943-4.c b/libgomp/testsuite/libgomp.c/pr26943-4.c index 0f1d4197a5f..24f253d236d 100644 --- a/libgomp/testsuite/libgomp.c/pr26943-4.c +++ b/libgomp/testsuite/libgomp.c/pr26943-4.c @@ -4,6 +4,7 @@ extern int omp_set_dynamic (int); extern int omp_get_thread_num (void); extern void abort (void); +extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; @@ -27,7 +28,7 @@ main (void) { if (a != 8 || b != 12 || e[0] != 'a' || f[0] != 'b') j++; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); #pragma omp atomic a += i; b += i; @@ -38,7 +39,7 @@ main (void) f[0] += i; g[0] = 'g' + i; h[0] = 'h' + i; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); if (a != 8 + 6 || b != 12 + i || c != i || d != i) j += 8; if (e[0] != 'a' + 6 || f[0] != 'b' + i || g[0] != 'g' + i) diff --git a/libgomp/testsuite/libgomp.fortran/vla4.f90 b/libgomp/testsuite/libgomp.fortran/vla4.f90 index cdd4849b6ad..0bee30cf817 100644 --- a/libgomp/testsuite/libgomp.fortran/vla4.f90 +++ b/libgomp/testsuite/libgomp.fortran/vla4.f90 @@ -10,6 +10,10 @@ contains subroutine foo (c, d, e, f, g, h, i, j, k, n) use omp_lib + interface + subroutine GOMP_barrier () bind(c, name="GOMP_barrier") + end subroutine + end interface integer :: n character (len = *) :: c character (len = n) :: d @@ -94,7 +98,7 @@ contains forall (p = 1:2, q = 3:7, r = 1:7) u(p, q, r) = 30 - x - p + q - 2 * r forall (p = 1:5, q = 3:7, p + q .le. 8) v(p, q) = w(1:7) forall (p = 1:5, q = 3:7, p + q .gt. 8) v(p, q) = w(20:26) -!$omp barrier ! { dg-warning "may not be closely nested" } + call GOMP_barrier y = '' if (x .eq. 0) y = '0' if (x .eq. 1) y = '1' diff --git a/libgomp/testsuite/libgomp.fortran/vla5.f90 b/libgomp/testsuite/libgomp.fortran/vla5.f90 index 9b611505219..cdd561d3961 100644 --- a/libgomp/testsuite/libgomp.fortran/vla5.f90 +++ b/libgomp/testsuite/libgomp.fortran/vla5.f90 @@ -10,6 +10,10 @@ contains subroutine foo (c, d, e, f, g, h, i, j, k, n) use omp_lib + interface + subroutine GOMP_barrier () bind(c, name="GOMP_barrier") + end subroutine + end interface integer :: n character (len = *) :: c character (len = n) :: d @@ -66,7 +70,7 @@ contains forall (p = 1:2, q = 3:7, r = 1:7) u(p, q, r) = 30 - x - p + q - 2 * r forall (p = 1:5, q = 3:7, p + q .le. 8) v(p, q) = w(1:7) forall (p = 1:5, q = 3:7, p + q .gt. 8) v(p, q) = w(20:26) -!$omp barrier ! { dg-warning "may not be closely nested" } + call GOMP_barrier y = '' if (x .eq. 0) y = '0' if (x .eq. 1) y = '1' |