summaryrefslogtreecommitdiff
path: root/gcc_arm/testsuite/g++.old-deja/g++.gb/sig27.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.gb/sig27.C')
-rwxr-xr-xgcc_arm/testsuite/g++.old-deja/g++.gb/sig27.C38
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.gb/sig27.C b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig27.C
new file mode 100755
index 0000000..7b9e7d2
--- /dev/null
+++ b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig27.C
@@ -0,0 +1,38 @@
+// Special g++ Options: -fhandle-signatures
+// GROUPS passed gb sigptr multiple-inheritance
+// Test class defined by multiple inheritance as implementation of signature.
+
+extern "C"
+{
+ int printf (char *, ...);
+}
+
+class C
+{
+public:
+ char * f (void) { return "PA"; }
+};
+
+class D
+{
+public:
+ char * g (void) { return "SS"; }
+};
+
+class E : public C, public D { };
+
+signature S
+{
+ char * f (void);
+ char * g (void);
+};
+
+int main (void)
+{
+ E a;
+ S * p = &a;
+
+ printf ("%s%s\n", p->f (), p->g ());
+
+ return 0;
+}