]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/runnable/test17338.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / runnable / test17338.d
1 // PERMUTE_ARGS:
2 // Generate \sum_{i=0}^{14} 2^i = 32767 template instantiations
3 // (each with 3 sections) to use more than 64Ki sections in total.
4 version (Win32)
5 {
6 // Apparently omf or optlink does not support more than 32767 symbols.
7 void main()
8 {
9 }
10 }
11 else
12 {
13 size_t foo(size_t i, size_t mask)()
14 {
15 static if (i == 14)
16 return mask;
17 else
18 return foo!(i + 1, mask) + foo!(i + 1, mask | (1UL << i));
19 }
20
21 void main()
22 {
23 assert(foo!(0, 0) != 0);
24 }
25 }