aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
blob: 6c4874b21380a356fef34981166426848c51755b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do link }
// { dg-additional-sources " linkage1-main.cc" }

// Copyright 2002 Free Software Foundation

// Derived by Alexandre Oliva <aoliva@redhat.com> from code posted by
// Mark Mitchell <mark@codesourcery.com>

// Verify that a member of a class is given global linkage when it's a
// member of a function whose name is taken from a typedef, by
// checking that another translation unit can call it.  We don't do
// the right things on functions, but we do on data members.

typedef struct {
  void f();
} S;

void S::f() {}