Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6718 from MartinNowak/fix17338
fixup for - #6717 [Reg 2.075] link failure unsupported symbol section
- Loading branch information
Showing
2 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// PERMUTE_ARGS: | ||
// Generate \sum_{i=0}^{14} 2^i = 32767 template instantiations | ||
// (each with 3 sections) to use more than 64Ki sections in total. | ||
version (Win32) | ||
{ | ||
// Apparently omf or optlink does not support more than 32767 symbols. | ||
void main() | ||
{ | ||
} | ||
} | ||
else | ||
{ | ||
size_t foo(size_t i, size_t mask)() | ||
{ | ||
static if (i == 14) | ||
return mask; | ||
else | ||
return foo!(i + 1, mask) + foo!(i + 1, mask | (1UL << i)); | ||
} | ||
|
||
void main() | ||
{ | ||
assert(foo!(0, 0) != 0); | ||
} | ||
} |