2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / lto / 20110311-1_0.C
blob331c9ed28dc585606b43c9dfb0d98359942ef7d7
1 /* { dg-lto-do link } */
2 /* { dg-extra-ld-options "-r -nostdlib -flinker-output=nolto-rel" } */
4 struct NullType {};
6 template <class T, class U>
7 struct TList
9     typedef T Head;
10     typedef U Tail;
13 template <class T>
14 struct TListLength {};
16 template <class T, class U>
17 struct TListLength<TList<T,U> >
19     enum
20     {
21         Ret = 1 + TListLength<U>::Ret
22     };
25 template <>
26 struct TListLength<NullType>
28     enum
29     {
30         Ret = 0
31     };
34 template <class Moves>
35 class DDQMC
37 public:
38     int* moves[TListLength<Moves>::Ret];
39     inline DDQMC();
40 private:
43 template <class Moves>
44 DDQMC<Moves>::DDQMC()
48 int main()
50     typedef DDQMC< TList<float, TList<int, NullType> > > mytype;