Showing with 15 additions and 4 deletions.
  1. +1 −4 src/e2ir.c
  2. +14 −0 test/runnable/testxmm.d
5 changes: 1 addition & 4 deletions src/e2ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3804,10 +3804,7 @@ elem *toElem(Expression *e, IRState *irs)
{
Expression *elem;
if (ve->e1->op == TOKarrayliteral)
{
ArrayLiteralExp *ea = (ArrayLiteralExp *)ve->e1;
elem = (*ea->elements)[i];
}
elem = ((ArrayLiteralExp *)ve->e1)->getElement(i);
else
elem = ve->e1;
switch (elem->type->toBasetype()->ty)
Expand Down
14 changes: 14 additions & 0 deletions test/runnable/testxmm.d
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,20 @@ void test13988()
foo13988(arr);
}

/*****************************************/
// 15123

void test15123()
{
alias Vector16s = TypeTuple!(
void16, byte16, short8, int4, long2,
ubyte16, ushort8, uint4, ulong2, float4, double2);
foreach (V; Vector16s)
{
auto x = V.init;
}
}

/*****************************************/

int main()
Expand Down