aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@gcc.gnu.org>1999-03-26 20:12:06 -0500
committerJason Merrill <jason@gcc.gnu.org>1999-03-26 20:12:06 -0500
commit92a217ad7421218d9dcebac9bbb8b9782bea5eb9 (patch)
treef2dcb07849581e65db8e42b5310791bc344881ec
parenta3590d340d7755da57d9364cd324936c5308bcb2 (diff)
downloadgcc-92a217ad7421218d9dcebac9bbb8b9782bea5eb9.zip
gcc-92a217ad7421218d9dcebac9bbb8b9782bea5eb9.tar.gz
gcc-92a217ad7421218d9dcebac9bbb8b9782bea5eb9.tar.bz2
new
From-SVN: r26011
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/field2.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/field2.C b/gcc/testsuite/g++.old-deja/g++.other/field2.C
new file mode 100644
index 0000000..5eb6755
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/field2.C
@@ -0,0 +1,20 @@
+// Test for proper handling of field calls.
+// Contributed by Jason Merrill <jason@cygnus.com>
+
+struct A {
+ inline A* operator()() { return this; }
+};
+
+struct B {
+ int i;
+ union { A a; };
+};
+
+int
+main ()
+{
+ B b;
+ A* ap = &b.a;
+ A* ap2 = b.a();
+ return (ap != ap2);
+}