[Issue 21515] extern(C) and extern(C++) returns creal in wrong order

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 25 01:07:36 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12073 "fix Issue 21515 extern(C) and extern(C++)
returns creal in wrong order" was merged into master:

- 7e445d61509f97de902528b9c68bd5d247563e14 by Iain Buclaw:
  fix Issue 21515 - extern(C) and extern(C++) returns creal in wrong order

  In loadComplex and complex_eq87, the real part of x87 complex numbers
  are pushed to the FPU register stack first (ST1), then the imaginary
  part (ST0).  However, on the I64 ABI, real part is instead returned in
  ST0 and the imaginary part in ST1. To handle this, FXCH is inserted
  before returning from, and after calling a complex long double function.

https://github.com/dlang/dmd/pull/12073

--


More information about the Digitalmars-d-bugs mailing list