D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18867 - backend/cgcod.c crash on assignment to vector element
Summary: backend/cgcod.c crash on assignment to vector element
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 All
: P1 normal
Assignee: No Owner
URL:
Keywords: backend, ice, pull, SIMD
Depends on:
Blocks:
 
Reported: 2018-05-16 19:55 UTC by kinke
Modified: 2020-12-23 01:39 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kinke 2018-05-16 19:55:47 UTC
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 ag0aep6g 2018-05-16 21:05:19 UTC
Without the import:

----
alias __vector(ulong[2]) ulong2;

ulong2 foo(ulong s)
{
    ulong2 v;
    v[0] = s;
    return v;
}
----
Comment 2 Dlang Bot 2020-12-23 00:57:20 UTC
@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 Dlang Bot 2020-12-23 01:39:03 UTC
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