[Issue 11376] New: ICE on __traits(compiles, ...)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 29 03:50:16 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11376

           Summary: ICE on __traits(compiles, ...)
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: john.loughran.colvin at gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2013-10-29 10:50:13 GMT ---
//arrayTest.d
template I(T ...)
{
    alias I = T;
}

auto sumArrs(T0, T1)(T0[] a, T1[] b)
{
    a[] += b[]; //no ICE without this line
    return a;
}

pragma(msg, __traits(compiles, sumArrs(I!(string[], string).init)));



$dmd arrayTest.d
false
Statement::toCBuffer()

Internal error: s2ir.c 135



This is a very heavy reduced test-case from a much larger program. The original
__traits(compiles, ...) was in a static if, not a pragma(msg, ...)

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


More information about the Digitalmars-d-bugs mailing list