[Issue 13434] New: [ICE] indexing array with empty tuple causes dmd segfault
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 6 18:54:34 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13434
Issue ID: 13434
Summary: [ICE] indexing array with empty tuple causes dmd
segfault
Product: D
Version: unspecified
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: hsteoh at quickfur.ath.cx
Code:
------
alias tuple(A...) = A;
void main() {
float[] arr;
arr[tuple!()] = 0.0;
}
------
Indexing with a tuple of 1 integral element works correctly, and indexing with
a tuple of more than 1 element correctly generates an error message about
non-convertibility to ulong.
Indexing with an empty tuple should also generate an error message, rather than
crash.
--
More information about the Digitalmars-d-bugs
mailing list