summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/ref3.C
blob: 68372b2277ab8a6e9147feed9311d609922ff839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do run  }
// { dg-prune-output "mangled name" }
// Origin: John Wilkinson <jfw@sgi.com>

template <class T, int& Size> 
struct Base {
    Base() : obj(Size) {}
    T obj;
};

int globalInt = 5;

struct A {
    A(int arg) : ia(arg) {}
    int ia;
};

int main()
{
  Base<A, globalInt> ob;
  if (ob.obj.ia != 5)
    return 1;
}