This test ICE's the dmd backend.
---
auto mul11ret3(T)(ref T s)
{
s ~= 11;
return [3];
}
auto test(int[] val)
{
(val ~= mul11ret3(val)) ~= 7;
return val;
}
void main()
{
static assert(test([2]) == [2, 11, 3, 7]);
assert(test([2]) == [2, 11, 3, 7]);
}
---
& el:0x55f78b3b1ce0 cnt=0 cs=0 & TY* 0x55f78b3b1c20
el:0x55f78b3b1c20 cnt=0 cs=0 call TYucent 0x55f78b3b1bc0 0x55f78b3b19d0
el:0x55f78b3b1bc0 cnt=0 cs=0 var TYC func _d_arrayappendT
el:0x55f78b3b19d0 cnt=0 cs=0 param TYvoid 0x55f78b3b1970 0x55f78b3b17b0
el:0x55f78b3b1970 cnt=0 cs=0 param TYvoid 0x55f78b3b1390 0x55f78b3b13f0
el:0x55f78b3b1390 cnt=0 cs=0 call TYucent 0x55f78b3b1190 0x55f78b3b1310
el:0x55f78b3b1190 cnt=0 cs=0 var TYD func _D3bug__T9mul11ret3TAiZQoFNaNbNfKQnZQq
el:0x55f78b3b1310 cnt=0 cs=0 relconst TY* 0+& val
el:0x55f78b3b13f0 cnt=0 cs=0 relconst TY* 0+& val
el:0x55f78b3b17b0 cnt=0 cs=0 var TY* _D11TypeInfo_Ai6__initZ
dmd: src/dmd/backend/cgcs.d:375: Assertion `0' failed.
Aborted
Comment #1 by ibuclaw — 2020-11-18T16:09:03Z
(In reply to Iain Buclaw from comment #0)
> This test ICE's the dmd backend.
> ---
> auto mul11ret3(T)(ref T s)
Aside: A more accurate description of that function would be cat11ret3.