summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/sharing-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/sharing-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/sharing-3.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/sharing-3.c b/gcc/testsuite/gcc.dg/gomp/sharing-3.c
new file mode 100644
index 000000000..36f72e3ab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/sharing-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+#define N 50
+#define CHUNKSIZE 5
+
+main ()
+{
+ int i, chunk;
+ float c[N];
+
+ chunk = CHUNKSIZE;
+#pragma omp parallel for shared (c, chunk) schedule (dynamic, chunk)
+ for (i = 0; i < N; i++)
+ c[i] = i;
+
+ return 0;
+}