aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr58257.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr58257.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr58257.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr58257.c b/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr58257.c
new file mode 100644
index 000000000..8f8d24a99
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr58257.c
@@ -0,0 +1,15 @@
+/* PR middle-end/58257 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp -Wall" } */
+
+int
+foo (int n)
+{
+ int a[10][10];
+ int x, y;
+#pragma omp parallel for collapse(2) /* { dg-bogus "may be used uninitialized in this function" } */
+ for (x = 0; x < n; x++) /* { dg-bogus "may be used uninitialized in this function" } */
+ for (y = 0; y < n; y++)
+ a[x][y] = x + y * y;
+ return a[0][0];
+}