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, ...)
Comment #1 by k.hara.pg — 2013-11-02T04:52:13Z
Comment #2 by github-bugzilla — 2013-11-07T22:27:46Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/38a4d2e7e7514e8e2cacaf3dd4393b914e5563d2 fix Issue 11376 - ICE on __traits(compiles, ...) with invalid array-op https://github.com/D-Programming-Language/dmd/commit/864fcda2b9635b5d24c6ef55813f4c2575984744 Merge pull request #2706 from 9rnsr/fix11376 Issue 11376 - ICE on __traits(compiles, ...) with invalid array-op
Comment #3 by github-bugzilla — 2013-11-30T08:38:11Z