When a struct dtor is marked nothrow then the interface file generated with -H disagrees with the mangled name in the object file created with -c:
```
$ cat foo.d
module foo;
struct S
{
nothrow ~this() {}
}
$ dmd -H -c foo.d
$ cat foo.di
// D import file generated from 'foo.d'
module foo;
struct S
{
~this();
}
$ nm foo.o | grep __dtor
0000000000000000 T _D3foo1S6__dtorMFNbZv
```
This causes linker errors:
```
$ cat bar.d
module bar;
import foo;
void main()
{
auto s = S();
}
$ dmd bar.d foo.di foo.o
bar.o:bar.d:function _Dmain: error: undefined reference to '_D3foo1S6__dtorMFZv'
```
Difference between symbols:
```
.o: _D3foo1S6__dtorMFNbZv
.di: _D3foo1S6__dtorMFZv
```
Verified with:
- DMD64 D Compiler v2.085.1
- LDC 1.16.0 based on DMD v2.086.1 and LLVM 8.0.1
Comment #1 by robert.schadek — 2024-12-13T19:06:19Z