summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/langs2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/langs2.c')
-rw-r--r--gdb/testsuite/gdb.base/langs2.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/langs2.c b/gdb/testsuite/gdb.base/langs2.c
index be2a60cfbb8..502b80063f0 100644
--- a/gdb/testsuite/gdb.base/langs2.c
+++ b/gdb/testsuite/gdb.base/langs2.c
@@ -1,4 +1,20 @@
/* This is intended to be a vague simulation of cfront output. */
+#ifdef PROTOTYPES
+#line 1 "langs2.cxx"
+extern int csub (int);
+int
+foo__Fi (int x)
+{
+ return csub (x / 2);
+}
+
+extern int cppsub_ (int *y);
+int
+cppsub_ (int * y)
+{
+ return foo__Fi (*y);
+}
+#else
#line 1 "langs2.cxx"
extern int csub ();
int
@@ -13,3 +29,4 @@ cppsub_ (y) int *y;
{
return foo__Fi (*y);
}
+#endif