Thread overview
[Issue 19672] Function uses the stack to read a static array parameter but it is passed in the registers
Feb 13, 2019
Walter Bright
Feb 13, 2019
Walter Bright
Feb 13, 2019
Walter Bright
Feb 13, 2019
Simen Kjaeraas
Feb 13, 2019
Seb
Feb 15, 2019
Dlang Bot
February 13, 2019
https://issues.dlang.org/show_bug.cgi?id=19672

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=15075

--
February 13, 2019
https://issues.dlang.org/show_bug.cgi?id=19672

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
Note that if S is used as the parameter type, rather than S[1], the test passes. The parameters should be passed in registers RDI and RSI for both cases, i.e. S and S[1] should behave the same.

--
February 13, 2019
https://issues.dlang.org/show_bug.cgi?id=19672

--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> ---
https://github.com/dlang/dmd/pull/9357

--
February 13, 2019
https://issues.dlang.org/show_bug.cgi?id=19672

Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simen.kjaras@gmail.com

--- Comment #3 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
Additional information:

Happens when S.sizeof is between 9 and 16, and only for long and ulong fields.
Order doesn't matter.
Tested with other 8-byte types like double, int[2], short[4], ubyte[8], and it
works fine. The type of the padding field also doesn't seem to matter.

--
February 13, 2019
https://issues.dlang.org/show_bug.cgi?id=19672

Seb <greeenify@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |greeenify@gmail.com
         Resolution|---                         |FIXED

--
February 15, 2019
https://issues.dlang.org/show_bug.cgi?id=19672

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #9364 "Merge remote-tracking branch 'upstream/stable' into merge_stable" was merged:

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

--