Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / g++.old-deja / g++.oliva / linkage1.C
blob6c4874b21380a356fef34981166426848c51755b
1 // { dg-do link }
2 // { dg-additional-sources " linkage1-main.cc" }
4 // Copyright 2002 Free Software Foundation
6 // Derived by Alexandre Oliva <aoliva@redhat.com> from code posted by
7 // Mark Mitchell <mark@codesourcery.com>
9 // Verify that a member of a class is given global linkage when it's a
10 // member of a function whose name is taken from a typedef, by
11 // checking that another translation unit can call it.  We don't do
12 // the right things on functions, but we do on data members.
14 typedef struct {
15   void f();
16 } S;
18 void S::f() {}