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

Martin Nowak <c...@dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzi...@digitalmars.com,
                   |                            |c...@dawg.eu

--- Comment #1 from Martin Nowak <c...@dawg.eu> ---
There is a difference between the mangling of the symbol included in
phobos64.lib and the one requested.

phobos64.lib has:
_D4core4time8Duration46__T10opOpAssignVAyaa1_2dTS4core4time8DurationZ10opOpAssignMFNaNbNcNiNjNfxS4core4time8DurationZS4core4time8Duration
linker wants:
_D4core4time8Duration46__T10opOpAssignVAyaa1_2dTS4core4time8DurationZ10opOpAssignMFNaNbNcNiNfxS4core4time8DurationZS4core4time8Duration

ddemangle doesn't yet know Nj, it stands for FuncAttrReturn
(https://dlang.org/spec/abi.html#FuncAttrReturn).

So what we have here is likely a difference in return inference in different
compilations, leading the test below to think that the template was already
instantiated by druntime, therefor not emitting it itself, but the
instantiation in druntime inferred a different STCreturn.

It's only reproducible w/ -inline b/c that runs semantic3 on imported functions
and templates.

Happens because the released library is build with -dip25 which enables return
inference and obviously creates ABI incompatibilities.

--

Reply via email to