From: Jason Merrill Date: Sat, 27 Mar 1999 01:12:06 +0000 (-0500) Subject: new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92a217ad7421218d9dcebac9bbb8b9782bea5eb9;p=gcc.git new From-SVN: r26011 --- 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 00000000000..5eb67554fdf --- /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 + +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); +}