-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Regression from LDC 1.30 to 1.38 on referencing template instances symbols #4724
Comments
This seems a weka compiler specific issue. New versions of the compiler doesn't generate constants in |
I believe this is what weka ldc reverted backthen https://github.com/ldc-developers/ldc/pull/3424/files#diff-000f1d90d6a1b2686a37dfa10b8660f9882420ca96695e5222fe333d3bae9c86L229-L239 . So, therefore, I believe this also regress LDC but on old versions. CC @kinke what is the idea to not compile with old LDC:
new LDC:
|
Also, another question is: shouldn't |
There's fortunately (hopefully) enough context in the linked PR's comments. |
Also, please specify which linker and version you are using, and whether you get different results with different linkers. |
This is not entirely correct. See https://godbolt.org/z/hzzc1PeMW . It generates the symbol with comdat rules, even though the target is linux. On the comments @JohanEngelen explains exactly what is going on here in #3589 , so I'll mark this issue as duplicate. Can the mentioned issue be marked as a regression and lets discuss there. |
For the following code:
Somehow, the same template instance of
fooref_sym
references two addresses for the samefoo_sym
.This regression was detected at Weka in a sanity check.
Instead of
foo
andfooref
, we havewtracer_desc
andwtracer_tinfo
section names.These two entries of
fooref
(wtracer_desc
) are exactly the same, but compiler seem to generate two different symbols, which, the first references an actual symbol (index11
) but the second doesn't (index23
). See:LOG_DESCRIPTOR_PTR
is analogous tofooref_sym
.I expect the address to be the same, if the template instance is the same.
The thing is that this seem to only happens with certain types in the template. I didn't figure out which do it.
CC @JohanEngelen
The text was updated successfully, but these errors were encountered: