summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/inline5.C
blob: b538cdba9cf13f8e605627dedb1fe582fea62ef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// { dg-do assemble  }
// { dg-options "-O2" }
// Origin: Matt Austern <austern@isolde.engr.sgi.com>

class X;

extern X* tab1;

struct Y {
  explicit Y(int);
};

void* x ();

Y k (void *);

inline void f() { k (x ()); }

inline void* x () 
{
  return 0;
}

static void g() {
  f();
}

static void h() {
  f();
}