2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.oliva / linkage1.C
blob23295ea363da7b926f49bec04c0ecfe8e69aa940
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 // { dg-bogus "" "" { xfail *-*-* } 0 }
16 typedef struct {
17   void f();
18 } S;
20 void S::f() {}