pr29160.cpp
901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// RUN: %clang_cc1 -std=c++11 -triple i686-linux-gnu %s -o /dev/null -S -emit-llvm
//
// This test's failure mode is running ~forever. (For some value of "forever"
// that's greater than 25 minutes on my machine)
template <typename... Ts>
struct Foo {
template <typename... T>
static void ignore() {}
Foo() { ignore<Ts...>(); }
};
struct Base {
Base();
~Base();
};
#define STAMP(thiz, prev) using thiz = Foo< \
prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, \
prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, \
prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev, prev \
>;
STAMP(A, Base);
STAMP(B, A);
STAMP(C, B);
STAMP(D, C);
STAMP(E, D);
STAMP(F, E);
STAMP(G, F);
STAMP(H, G);
STAMP(I, H);
STAMP(J, I);
STAMP(K, J);
STAMP(L, K);
STAMP(M, L);
STAMP(N, M);
STAMP(O, N);
STAMP(P, O);
STAMP(Q, P);
int main() { Q q; }