summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/nestedfn-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c/nestedfn-2.c')
-rw-r--r--libgomp/testsuite/libgomp.c/nestedfn-2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/nestedfn-2.c b/libgomp/testsuite/libgomp.c/nestedfn-2.c
new file mode 100644
index 000000000..fdbbe0f73
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/nestedfn-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int i;
+ void
+ foo (void)
+ {
+#pragma omp master
+ i += 8;
+ }
+ i = 4;
+ foo ();
+ if (i != 12)
+ abort ();
+ return 0;
+}