summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/dependent-expr7.C
blob: b2468203590e23903c81866d7d76c7a31f36eab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Origin PR c++/48574
// { dg-do compile }

struct A
{
  virtual void foo();
};

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

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