Bug 18867 – backend/cgcod.c crash on assignment to vector element
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2018-05-16T19:55:47Z
Last change time
2020-12-23T01:39:03Z
Keywords
backend, ice, pull, SIMD
Assigned to
No Owner
Creator
kinke
Comments
Comment #0 by kinke — 2018-05-16T19:55:47Z
This crashes the backend with `-O`, since v2.073:
```
import core.simd;
ulong2 foo(ulong s)
{
ulong2 v;
v[0] = s;
return v;
}
```
Internal error: dmd/backend/cgcod.c 1695
See https://run.dlang.io/is/uFBgBt.
Comment #1 by ag0aep6g — 2018-05-16T21:05:19Z
Without the import:
----
alias __vector(ulong[2]) ulong2;
ulong2 foo(ulong s)
{
ulong2 v;
v[0] = s;
return v;
}
----
Comment #2 by dlang-bot — 2020-12-23T00:57:20Z
@WalterBright created dlang/dmd pull request #12047 "fix Issue 18867 - backend/cgcod.c crash on assignment to vector element" fixing this issue:
- fix Issue 18867 - backend/cgcod.c crash on assignment to vector element
https://github.com/dlang/dmd/pull/12047
Comment #3 by dlang-bot — 2020-12-23T01:39:03Z
dlang/dmd pull request #12047 "fix Issue 18867 - backend/cgcod.c crash on assignment to vector element" was merged into master:
- 67553e66427679009e8afba7abf3c9030e122dbc by Walter Bright:
fix Issue 18867 - backend/cgcod.c crash on assignment to vector element
https://github.com/dlang/dmd/pull/12047