Bug 11376 – ICE on __traits(compiles, ...) with invalid array-op
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-29T03:50:00Z
Last change time
2013-11-30T08:38:11Z
Keywords
ice, pull
Assigned to
nobody
Creator
john.loughran.colvin
Comments
Comment #0 by john.loughran.colvin — 2013-10-29T03:50:13Z
//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, ...)