diff options
| author | Jing Yu <jingyu@google.com> | 2012-02-15 15:40:16 -0800 |
|---|---|---|
| committer | Jing Yu <jingyu@google.com> | 2012-02-15 15:40:16 -0800 |
| commit | 3f73d6ef90458b45bbbb33ef4c2b174d4662a22d (patch) | |
| tree | 1b5f0d96c51b51168b3713058a1b62e92f1136eb /gcc-4.6/libgomp/testsuite/libgomp.c/pr49897-2.c | |
| parent | d7030123e04baab5dbff9c9ee04c0de99bd9a774 (diff) | |
| download | toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.tar.gz toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.tar.bz2 toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.zip | |
Sync down FSF r184235@google/gcc-4_6_2-mobile branch
1) Get mostly new patches from FSF gcc-4.6 branch
2) Fix PR52129
3) Insert GNU-stack note for all ARM targets
Change-Id: I2b9926981210e517e4021242908074319a91d6bd
Diffstat (limited to 'gcc-4.6/libgomp/testsuite/libgomp.c/pr49897-2.c')
| -rw-r--r-- | gcc-4.6/libgomp/testsuite/libgomp.c/pr49897-2.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.6/libgomp/testsuite/libgomp.c/pr49897-2.c b/gcc-4.6/libgomp/testsuite/libgomp.c/pr49897-2.c new file mode 100644 index 000000000..c9ea5eced --- /dev/null +++ b/gcc-4.6/libgomp/testsuite/libgomp.c/pr49897-2.c @@ -0,0 +1,25 @@ +/* PR middle-end/49897 */ +/* { dg-do run } */ + +extern void abort (void); + +int +main () +{ + int i, j, x = 0, y, sum = 0; +#pragma omp parallel for reduction(+:sum) firstprivate(x) lastprivate(x, y) + for (i = 0; i < 10; i++) + { + x = i; + y = 0; + #pragma omp parallel for reduction(+:sum) firstprivate(y) lastprivate(y) + for (j = 0; j < 10; j++) + { + y = j; + sum += y; + } + } + if (x != 9 || y != 9 || sum != 450) + abort (); + return 0; +} |
