summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/vla-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gomp/vla-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/gomp/vla-4.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gomp/vla-4.c b/gcc/testsuite/gcc.dg/gomp/vla-4.c
new file mode 100644
index 00000000000..2c3c0aa43b7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/vla-4.c
@@ -0,0 +1,11 @@
+// { dg-do compile }
+
+void foo(int n, int i)
+{
+ int A[n];
+
+ #pragma omp parallel firstprivate(A)
+ {
+ A[i] = 1;
+ }
+}