Skip to content

Commit

Permalink
Add workaround for issue 14203
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Feb 20, 2015
1 parent 4091ddc commit c73f7fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/e2ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3767,11 +3767,13 @@ elem *toElem(Expression *e, IRState *irs)
switch (elem->type->toBasetype()->ty)
{
case Tfloat32:
((targ_float *)&e->EV.Vcent)[i] = elem->toReal();
// Must not call toReal directly, to avoid dmd bug 14203 from breaking ddmd
((targ_float *)&e->EV.Vcent)[i] = creall(elem->toComplex());
break;

case Tfloat64:
((targ_double *)&e->EV.Vcent)[i] = elem->toReal();
// Must not call toReal directly, to avoid dmd bug 14203 from breaking ddmd
((targ_double *)&e->EV.Vcent)[i] = creall(elem->toComplex());
break;

case Tint64:
Expand Down

0 comments on commit c73f7fe

Please sign in to comment.