digitalmars.D.bugs - [Issue 15407] New: Assert hit in toElem e2ir.c:1962
- via Digitalmars-d-bugs (32/32) Dec 04 2015 https://issues.dlang.org/show_bug.cgi?id=15407
https://issues.dlang.org/show_bug.cgi?id=15407 Issue ID: 15407 Summary: Assert hit in toElem e2ir.c:1962 Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ljdelight gmail.com Created attachment 1568 --> https://issues.dlang.org/attachment.cgi?id=1568&action=edit gdb bt I was playing around and caused the compiler to hit an assert. The code: import std.conv; void main(string[] args) { ubyte[6] array; if (array[0..5] == 6*[to!ubyte(0)]) { } } The assert: $ dmd ./test.d dmd: e2ir.c:1962: elem* toElem(Expression*, IRState*)::ToElemVisitor::toElemBin(BinExp*, int): Assertion `!((tb1->ty == Tarray || tb1->ty == Tsarray || tb2->ty == Tarray || tb2->ty == Tsarray) && tb2->ty != Tvoid && op != OPeq && op != OPandand && op != OPoror)' failed. [1] 497 abort (core dumped) dmd ./test.d --
Dec 04 2015