[Issue 12377] ICE (backend\cgxmm.c 622) on x64 for math on cdouble array items

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 4 03:39:18 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12377

jean-loup.tastet at epfl.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jean-loup.tastet at epfl.ch

--- Comment #1 from jean-loup.tastet at epfl.ch ---
Created attachment 1352
  --> https://issues.dlang.org/attachment.cgi?id=1352&action=edit
Test case

Here is some extra information and commented test cases about DMD (64 bit,
2.065) ICEs (backend\cgxmm.c 622 and 647) with arrays of complex numbers.

This code compiles and all unit tests pass with GDC 4.9.0 and LDC2 0.12.0 (both
64 bit).

There are actually two distinct issues :
 - ICEs when function/delegate directly returns the sum (622) or difference
(647) of two built-in complex numbers.
 - segfault with cfloat at line 13, when using vector operation array[] =
scalar;

It seems that DMD tries to optimize these operations using SSE instructions for
float and double complex types, but not real (no 80-bit SSE instructions).
It reaches an assert(0) in function 'unsigned xmmoperator(tym_t tym, unsigned
oper);' in file backend\cgxmm.c .

Multiplication and division works correctly.

The code can also be found at http://dpaste.dzfl.pl/a93ad0763d62

--


More information about the Digitalmars-d-bugs mailing list