diff options
Diffstat (limited to 'gcc_arm/testsuite/g++.old-deja/g++.gb/sig26.C')
-rwxr-xr-x | gcc_arm/testsuite/g++.old-deja/g++.gb/sig26.C | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc_arm/testsuite/g++.old-deja/g++.gb/sig26.C b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig26.C new file mode 100755 index 0000000..399737b --- /dev/null +++ b/gcc_arm/testsuite/g++.old-deja/g++.gb/sig26.C @@ -0,0 +1,34 @@ +// Special g++ Options: -fhandle-signatures +// GROUPS passed gb sigptr default-implementation +// Test calling default implementation through signature pointer. + +extern "C" +{ + int printf (char *, ...); +} + +class C { }; + +class D +{ +public: + char * f (void) { return "SS"; } +}; + +signature S +{ + char * f (void) { return "PA"; } + char * g (void) { return f (); } +}; + +int main (void) +{ + C a; + D b; + S * p = &a; + S * q = &b; + + printf ("%s%s\n", p->g (), q->g ()); + + return 0; +} |