summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/pr49898-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c/pr49898-2.c')
-rw-r--r--libgomp/testsuite/libgomp.c/pr49898-2.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/pr49898-2.c b/libgomp/testsuite/libgomp.c/pr49898-2.c
new file mode 100644
index 000000000..03ba0f8ff
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/pr49898-2.c
@@ -0,0 +1,18 @@
+/* PR middle-end/49898 */
+/* { dg-do run } */
+
+extern void abort (void);
+
+int
+main ()
+{
+ int i, j, sum = 0;
+#pragma omp parallel for reduction(+:sum)
+ for (i = 0; i < 10; i++)
+ #pragma omp parallel for reduction(+:sum)
+ for (j = 0; j < 10; j++)
+ sum += j;
+ if (sum != 450)
+ abort ();
+ return 0;
+}