Bug 19748 – [REG][wrong codegen] Returning 4 floats + DMD + 64-bit

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2019-03-17T15:13:52Z
Last change time
2019-06-16T20:34:33Z
Keywords
wrong-code
Assigned to
No Owner
Creator
ponce

Comments

Comment #0 by aliloko — 2019-03-17T15:13:52Z
Consider this file: ------------------------ repro.d ------------------------- struct A { float[4] array = [1, 2, 3, 4]; } A _mm_add_ss(A a, A b) pure @safe { a.array[0] += b.array[0]; return a; } void main() { A a; a = _mm_add_ss(a, a); // this assert fails, content is [1, 2, 3, 4] instead // This is a 2.085.0 regression assert(a.array == [2.0f, 2, 3, 4]); } ----------------------------------------------------------- Build with DMD 2.085.0 on Windows: $ dmd repro.d -O -inline -noboundscheck -m64 -inline -release -unittest $ repro.exe The assert fails, but it works in DMD 2.084.1
Comment #1 by r.sagitario — 2019-06-16T20:34:33Z
Seems fixed in dmd 2.086.0. Please reopen if it still occurs.