aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.c/nestedfn-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.c/nestedfn-2.c')
-rw-r--r--gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.c/nestedfn-2.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.c/nestedfn-2.c b/gcc-4.2.1-5666.3/libgomp/testsuite/libgomp.c/nestedfn-2.c
new file mode 100644
index 000000000..fdbbe0f73
--- /dev/null
+++ b/gcc-4.2.1-5666.3/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;
+}