OSDN Git Service

New test case
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Sep 1998 12:13:07 +0000 (12:13 +0000)
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Sep 1998 12:13:07 +0000 (12:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22501 138bc75d-0d04-0410-961f-82ee72b054a4

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
+}