summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/g++.old-deja/g++.gb/sig07.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.gb/sig07.C')
-rwxr-xr-xgcc_arm/testsuite/g++.old-deja/g++.gb/sig07.C29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.gb/sig07.C b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig07.C
new file mode 100755
index 0000000..18a47be
--- /dev/null
+++ b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig07.C
@@ -0,0 +1,29 @@
+// Special g++ Options: -fhandle-signatures
+// GROUPS passed gb sigptr default-argument
+// Test calling a signature member function with default argument.
+
+extern "C"
+{
+ int printf (char *, ...);
+}
+
+class C
+{
+public:
+ char * f (char * text) { return text; }
+};
+
+signature S
+{
+ char * f (char * text = "PA");
+};
+
+C a;
+S * p = &a;
+
+int main (void)
+{
+ printf ("%s%s\n", p->f (), p->f ("SS"));
+
+ return 0;
+}