Error: Global variable type does not match previous declaration with same mangled name:

Johan Engelen j at
Mon Nov 23 11:52:44 UTC 2020

On Sunday, 22 November 2020 at 19:53:51 UTC, kinke wrote:
> On Sunday, 22 November 2020 at 17:46:16 UTC, Adam D. Ruppe 
> wrote:
>> pragma(mangle, "_D" ~ T.mangleof[1..$] ~ "6__initZ")
>> // llvm says it is supposed to be { [2 x i8*]*, i8* }       
>> __gshared extern immutable idk initializer;
> Yeah, this trick only works for (non-zero-initialized) structs.

Hi Adam,
   Keep us posted about your progress. I've also worked on this a 
few months ago, to fix the druntime implementation of emplace 
that stack allocates large structs.
Current fix in production:

Here is my attempt at avoiding the duplication of the symbol:
For classes, I have no solution either...


More information about the digitalmars-d-ldc mailing list