]> gcc.gnu.org Git - gcc.git/commitdiff
new
authorJason Merrill <jason@gcc.gnu.org>
Sat, 27 Mar 1999 01:12:06 +0000 (20:12 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 27 Mar 1999 01:12:06 +0000 (20:12 -0500)
From-SVN: r26011

gcc/testsuite/g++.old-deja/g++.other/field2.C [new file with mode: 0644]

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 (file)
index 0000000..5eb6755
--- /dev/null
@@ -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);
+}
This page took 0.0638 seconds and 5 git commands to generate.