[Issue 22427] betterC: casting an array causes linker error in string comparison.
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Jul 11 14:29:28 UTC 2023
    
    
  
https://issues.dlang.org/show_bug.cgi?id=22427
--- Comment #5 from RazvanN <razvan.nitu1305 at gmail.com> ---
It seems that the cast is lowered to __ArrayCast which in turn ends up
instantiating __equals with the same template parameters, but in a speculative
context (static if). Somehow, the template emission strategy decides that the
instance does not require codegen (from what I can tell, the compiler decides
that it's better to put the instance in the imported module - core.memory in
this case), hence the linker errors.
I think that this strategy should be disabled in the case of betterC as it
currently is with -allinst.
--
    
    
More information about the Digitalmars-d-bugs
mailing list