Bug 24599 – [REG2.103] Wrongly elided TypeInfo emission leading to undefined symbols at link-time
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-06-11T10:07:37Z
Last change time
2024-11-16T23:27:09Z
Keywords
pull
Assigned to
No Owner
Creator
kinke
Comments
Comment #0 by kinke — 2024-06-11T10:07:37Z
This dustmited testcase regressed with v2.103, failing to link due to an undefined TypeInfo (`_D24TypeInfo_xS3mod8Variable6__initZ`), introduced by https://github.com/dlang/dmd/pull/14844:
```
module mod;
struct Variable
{
size_t toHash() const { return 0; }
}
enum hasInoutConstruction(T) = __traits(compiles, { struct S { T a; } });
struct Algebraic(T)
{
static if (hasInoutConstruction!T)
{
}
}
Algebraic!Variable foo();
struct S
{
Variable[] symbols;
}
void main() {}
```
Comment #1 by dlang-bot — 2024-06-11T10:17:06Z
@kinke updated dlang/dmd pull request #15868 "Draft: Tentative fix for missing struct TypeInfo symbols" fixing this issue:
- Fix Bugzilla 24599 - Wrongly elided TypeInfo emission
Reverting #14844, which caused such missing TypeInfos, *and* making
sure the special TypeInfo members are fully analyzed and ready for
codegen (otherwise hitting an assertion for the real-world project).
https://github.com/dlang/dmd/pull/15868
Comment #2 by dlang-bot — 2024-07-02T17:31:42Z
dlang/dmd pull request #15868 "[stable] Fix Bugzilla 24599 - Wrongly elided TypeInfo emission" was merged into stable:
- 0a859242d93ffc9fb0a5fdda921e9c393e5d11f9 by Martin Kinkelin:
Fix Bugzilla 24599 - Wrongly elided TypeInfo emission
Reverting #14844, which caused such missing TypeInfos, *and* making
sure the special TypeInfo members are fully analyzed and ready for
codegen (otherwise hitting an assertion for the real-world project).
https://github.com/dlang/dmd/pull/15868
Comment #3 by dlang-bot — 2024-10-07T09:00:25Z
dlang/dmd pull request #16967 "Rebase stable6" was merged into master:
- 9581a91ad65b85c80e9b33a84be731271cb045c8 by Martin Kinkelin:
Fix Bugzilla 24599 - Wrongly elided TypeInfo emission (#15868)
Reverting #14844, which caused such missing TypeInfos, *and* making
sure the special TypeInfo members are fully analyzed and ready for
codegen (otherwise hitting an assertion for the real-world project).
https://github.com/dlang/dmd/pull/16967
Comment #4 by dlang-bot — 2024-11-16T23:27:09Z
dlang/dmd pull request #17069 "Merge stable" was merged into master:
- 7ab98b931aa1fe40ae3bae73ab3a64a44bb1c696 by Martin Kinkelin:
Fix Bugzilla 24599 - Wrongly elided TypeInfo emission (#15868)
Reverting #14844, which caused such missing TypeInfos, *and* making
sure the special TypeInfo members are fully analyzed and ready for
codegen (otherwise hitting an assertion for the real-world project).
https://github.com/dlang/dmd/pull/17069