aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C b/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
new file mode 100644
index 00000000000..dc378b23e6f
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/ptrmem4.C
@@ -0,0 +1,12 @@
+// Test to make sure g++ can handle target types that aren't identical
+// with pointers to members.
+
+struct A { int i; };
+struct B : public A { };
+
+int main ()
+{
+ int A::*p = &A::i;
+ const int B::*q = &A::i;
+ return p != q;
+}