Bug 23219 – ICE: AssertError@src/dmd/hdrgen.d(1910): Assertion failure

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-29T10:43:09Z
Last change time
2024-12-13T19:23:36Z
Keywords
SIMD
Assigned to
No Owner
Creator
Iain Buclaw
See also
https://issues.dlang.org/show_bug.cgi?id=23218, https://issues.dlang.org/show_bug.cgi?id=23220, https://issues.dlang.org/show_bug.cgi?id=23221
Moved to GitHub: dmd#20125 →

Comments

Comment #0 by ibuclaw — 2022-06-29T10:43:09Z
Similar to issue 23218, but expecting element-wise int-to-float conversion. --- auto convtest(int[4] a) { return cast(__vector(float[4]))a; } void main() { // AssertError@src/dmd/hdrgen.d(1910): Assertion failure pragma(msg, convtest([1,2,3,4])[0]); // ??? //static assert(convtest([1,2,3,4])[0] == 1); // ??? //assert(convtest([1,2,3,4])[0] == 1); }
Comment #1 by razvan.nitu1305 — 2023-04-05T14:52:04Z
I cannot reproduce the ICE anymore. I get: test.d(9): Error: array cast from `int[4]` to `float[4]` is not supported at compile time test.d(9): while evaluating `pragma(msg, convtest([1, 2, 3, 4])[0])` test.d(11): Error: array cast from `int[4]` to `float[4]` is not supported at compile time test.d(11): while evaluating: `static assert((cast(float[4])convtest([1, 2, 3, 4]))[0] == 1.0F)` It seems that the cast is not supported at ctfe.
Comment #2 by robert.schadek — 2024-12-13T19:23:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20125 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB