Created attachment 1340
Test case for crashing the compiler
Compiling the attached test case reports:
recursion.d(6): Error: function recursion.recFunction CTFE recursion limit
exceeded
recursion.d(7): called from here: recFunction(i)
recursion.d(6): 1000 recursive calls to function recFunction
recursion.d(14): called from here: recFunction(0)
if dmd is run with -version=RecFunction, which makes very easy to spot the bug,
but just prints
Killed
after running out of memory if run with -version=RecTemplate.
Comment #1 by dlang-bugzilla — 2014-03-30T04:32:53Z
Duplicate of issue 12485?
Comment #2 by k.hara.pg — 2015-06-09T16:14:52Z
In 2.067 and git-head, -version=RecTemplate compilation reports:
test.d(3): Error: circular initialization of recTemplate
test.d(11): Error: template instance test.recTemplate!int error instantiating
Therefore the segfault issue is already fixed. However I think the diagnostic "circular initialization of recTemplate" is still unhelpful a little.