[Issue 20130] New: ICE illegal instruction when casting imported string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 13 21:49:25 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20130
Issue ID: 20130
Summary: ICE illegal instruction when casting imported string
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: remi.thebault at gmail.com
The following code crashes DMD with error 'Illegal instruction'.
---
int main() {
immutable array = cast(immutable(uint)[])import("12bytes.bin");
return array.length == 3 ? 0 : 1;
}
---
The following compiles and runs succesfully.
---
int main() {
immutable str = import("12bytes.bin");
immutable array = cast(immutable(uint)[])str;
return array.length == 3 ? 0 : 1;
}
---
$ dmd --version | head -n 1
DMD64 D Compiler v2.087.1
The code worked at least up to 2.084.0.
--
More information about the Digitalmars-d-bugs
mailing list