www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21591] New: Mangling problem wrt. backrefs and function types

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

          Issue ID: 21591
           Summary: Mangling problem wrt. backrefs and function types
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: kinke gmx.net

First off, I don't have a reduced testcase for reproduction, sorry.

While investigating a linker error with DMD v2.095.0, it turned out that a
library A defines an instantiation of

pure nothrow  nogc  trusted bool core.internal.array.equality.__equals!(void
function(), void function()).__equals(scope const(void function()[]), scope
const(void function()[]))

as
`_D4core8internal5array8equality__T8__equalsTPFZvTQfZQsFNaNbNiNeMxAPQwMxQgZb`.

The executable B also instantiates it, but all instances get culled (fine). The
external symbol is mangled slightly differently though:
`_D4core8internal5array8equality__T8__equalsTPFZvTQfZQsFNaNbNiNeMxAPFZvMxQhZb`
(missing backref for `FZv`).

Direct comparison:
A: _D4core8internal5array8equality__T8__equalsTPFZvTQfZQsFNaNbNiNeMxAPQwMxQgZb
B: _D4core8internal5array8equality__T8__equalsTPFZvTQfZQsFNaNbNiNeMxAPFZvMxQhZb

--
Jan 29