summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/async.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/async.c')
-rw-r--r--gdb/testsuite/gdb.base/async.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/async.c b/gdb/testsuite/gdb.base/async.c
new file mode 100644
index 00000000000..0d9c8752b70
--- /dev/null
+++ b/gdb/testsuite/gdb.base/async.c
@@ -0,0 +1,48 @@
+
+
+#ifdef PROTOTYPES
+int
+foo (void)
+#else
+int
+foo ()
+#endif
+{
+ int x, y;
+
+ x = 5;
+ y = 3;
+
+ return x + y;
+}
+
+#ifdef PROTOTYPES
+int
+main (void)
+#else
+int
+main ()
+#endif
+{
+ int y, z;
+
+ y = 2;
+ z = 9;
+ y = foo ();
+ z = y;
+ y = y + 2;
+ y = baz ();
+ return 0;
+}
+
+
+#ifdef PROTOTYPES
+int
+baz (void)
+#else
+int
+baz ()
+#endif
+{
+ return 5;
+}