summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/offset3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/offset3.C')
-rwxr-xr-xgcc/testsuite/g++.old-deja/g++.jason/offset3.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset3.C b/gcc/testsuite/g++.old-deja/g++.jason/offset3.C
new file mode 100755
index 0000000..d980ba1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/offset3.C
@@ -0,0 +1,22 @@
+// PRMS Id: 5070 (bug 2)
+// Build don't link:
+
+struct A {
+ void f ();
+};
+
+struct Ptr {
+ A* operator->();
+};
+
+struct B {
+ Ptr p;
+};
+
+struct C: public B {
+ void g ();
+};
+
+void C::g() {
+ B::p->f(); // gets bogus error
+}