New test case
authorMartin v. Löwis <loewis@gcc.gnu.org>
Sun, 20 Sep 1998 12:13:07 +0000 (12:13 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Sun, 20 Sep 1998 12:13:07 +0000 (12:13 +0000)
From-SVN: r22501

gcc/testsuite/g++.old-deja/g++.martin/ambig1.C [new file with mode: 0644]

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 (file)
index 0000000..3ee730d
--- /dev/null
@@ -0,0 +1,22 @@
+//Build don't link:
+//Based on a report by Bill Currie <bcurrie@tssc.co.nz>
+struct foo {
+  protected:
+    int x;
+};
+
+struct bar {
+  public:
+    int x();
+};
+
+struct foobar: public foo, public bar {
+  foobar();
+};
+
+int func(int);
+
+foobar::foobar()
+{
+    func(x);       // ERROR - ambiguous member access
+}