diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2012-04-02 14:36:04 +0100 |
---|---|---|
committer | Andrew Stubbs <ams@codesourcery.com> | 2012-04-02 14:36:04 +0100 |
commit | 2b5c455db98582ca4483231687db44079a217fda (patch) | |
tree | 9ead3c557952cc7ec49e6419608e492f37491214 /libgomp | |
parent | 067e7538701918c5b55902ab975e296647861454 (diff) |
Merge from FSF (GCC SVN branches/gcc-4_7-branch:186061)
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 13 | ||||
-rw-r--r-- | libgomp/config/linux/sparc/futex.h | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr52547.c | 36 |
3 files changed, 50 insertions, 5 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index c0d578f3e9e..47f88a1c520 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,16 @@ +2012-03-22 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/52547 + * testsuite/libgomp.c/pr52547.c: New test. + +2012-03-22 Release Manager + + * GCC 4.7.0 released. + +2012-02-29 Eric Botcazou <ebotcazou@adacore.com> + + * config/linux/sparc/futex.h (cpu_relax): Read from CC register. + 2012-02-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR libstdc++/52188 diff --git a/libgomp/config/linux/sparc/futex.h b/libgomp/config/linux/sparc/futex.h index 6c600446eb9..96e37b820c5 100644 --- a/libgomp/config/linux/sparc/futex.h +++ b/libgomp/config/linux/sparc/futex.h @@ -90,9 +90,5 @@ futex_wake (int *addr, int count) static inline void cpu_relax (void) { -#if defined __arch64__ || defined __sparc_v9__ - __asm volatile ("membar #LoadLoad" : : : "memory"); -#else - __asm volatile ("" : : : "memory"); -#endif + __asm volatile ("rd %%ccr, %%g0" : : : "memory"); } diff --git a/libgomp/testsuite/libgomp.c/pr52547.c b/libgomp/testsuite/libgomp.c/pr52547.c new file mode 100644 index 00000000000..f746e2ec469 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/pr52547.c @@ -0,0 +1,36 @@ +/* PR middle-end/52547 */ +/* { dg-do run } */ + +extern void abort (void); + +__attribute__((noinline, noclone)) int +baz (int *x, int (*fn) (int *)) +{ + return fn (x); +} + +__attribute__((noinline, noclone)) int +foo (int x, int *y) +{ + int i, e = 0; +#pragma omp parallel for reduction(|:e) + for (i = 0; i < x; ++i) + { + __label__ lab; + int bar (int *z) { return z - y; } + if (baz (&y[i], bar) != i) + e |= 1; + } + return e; +} + +int +main () +{ + int a[100], i; + for (i = 0; i < 100; i++) + a[i] = i; + if (foo (100, a)) + abort (); + return 0; +} |