2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / other / vararg-5.C
blob9327bd6570f93a842d29d012b4e0a8bee3df9874
1 // PR middle-end/78716
2 // { dg-do compile }
4 template <typename = int, typename = int, typename = int, typename = int,
5                    typename = int>
6                    struct a;
7                    template <typename> struct b;
8                    template <typename = int, typename d = void> class e : b<d>::c {
9                      public:
10                          typedef e f;
11                            typedef typename b<d>::c g;
12                              e(__builtin_va_list *s) : g(__builtin_va_arg(*s, int)) {}
13                    };
14 template <> struct b<void> { typedef e<> c; };
15 template <> struct e<> { template <typename h> e(h); };
16 template <typename i> class a<i> : public e<i> {};
17 template <typename i, typename j, typename k, typename l>
18 class a<i, j, k, l> : e<typename a<j>::f> {
19   public:
20       template <typename m, typename n, typename o, typename p>
21           a(a<m, n, o, p>) : a::f(0) {}
23 template <typename i, typename j, typename k, typename l> a<> r(i, j, k, l);
24 void q() { a<float, float>(r(4, 6, 9, 7)); }