aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/offset4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/offset4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/offset4.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/offset4.C b/gcc/testsuite/g++.old-deja/g++.jason/offset4.C
new file mode 100644
index 00000000000..2a5049105a4
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.jason/offset4.C
@@ -0,0 +1,15 @@
+// Bug: g++ complains about the use of A::p below.
+// Build don't link:
+
+struct A {
+ void *p;
+};
+
+struct B: public A {
+ int f ()
+ {
+ if (A::p)
+ return 1;
+ return 0;
+ }
+};