OSDN Git Service

PR libstdc++/37907
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.oliva / linkage1.C
1 // { dg-do link }
2 // { dg-additional-sources " linkage1-main.cc" }
3
4 // Copyright 2002 Free Software Foundation
5
6 // Derived by Alexandre Oliva <aoliva@redhat.com> from code posted by
7 // Mark Mitchell <mark@codesourcery.com>
8
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.
13
14 // { dg-bogus "" "" { xfail *-*-* } 0 }
15
16 typedef struct {
17   void f();
18 } S;
19
20 void S::f() {}