[Issue 12487] New: DMD correctly reports excessive CTFE recursion, but not template recursion

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 28 06:56:41 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12487

           Summary: DMD correctly reports excessive CTFE recursion, but
                    not template recursion
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: lultimouomo at gmail.com


--- Comment #0 from Luca Niccoli <lultimouomo at gmail.com> 2014-03-28 06:56:19 PDT ---
Created an attachment (id=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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list