aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/dependent-expr8.C
blob: 33fb51debdd738d59bb94de8c5f02afebfa6fc57 (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
// Origin PR c++/48574
// { dg-do compile { target c++11 } }

struct A
{
  virtual int foo();
};

void baz (int);

template <typename T>
void
bar(T x)
{
  A &b = *x;
  baz (b.foo ());
}

void
foo()
{
  A a;
  bar(&a);
}