diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.martin/ambig1.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.martin/ambig1.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C b/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C new file mode 100644 index 000000000..1ccc217a4 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C @@ -0,0 +1,22 @@ +// { dg-do assemble } +//Based on a report by Bill Currie <bcurrie@tssc.co.nz> +struct foo { + protected: + int x; // { dg-error "" } candidate +}; + +struct bar { + public: + int x(); // { dg-error "" } candidate +}; + +struct foobar: public foo, public bar { + foobar(); +}; + +int func(int); + +foobar::foobar() +{ + func(x); // { dg-error "" } ambiguous member access +} |