On git master, consider three modules: /////////////////////////////////// module system; enum Endian { bigEndian, /// Big endian byte order littleEndian /// Little endian byte order } /// The endianness that the program was compiled for. Endian endian = Endian.littleEndian; /////////////////////////////////// module registry; import system; void _RVT_from_Endian(Endian endian) {} /////////////////////////////////// module main; import system, registry; void main() { _RVT_from_Endian(Endian.littleEndian); } /////////////////////////////////// Build a library with dmd -lib -ofreg.lib -g -m64 system.d registry.d and link with main: dmd main.d -m64 -g reg.lib reg.lib(registry_2_61c.obj) : fatal error LNK1103: debugging information corrupt; recompile module
@rainers created dlang/dmd pull request #10407 "fix issue 20212 - invalid debug info with enum type in library" fixing this issue: - fix issue 20212 - invalid debug info with enum type in library reusing an old type index does not work because it might be in a different object file. Let cv_debtyp() sort out duplicates instead. https://github.com/dlang/dmd/pull/10407
regression introduced by https://github.com/dlang/dmd/pull/10328
dlang/dmd pull request #10407 "fix issue 20212 - invalid debug info with enum type in library" was merged into master: - 385d172caec72f2a2610e48df9c3358e7266a5dc by Rainer Schuetze: fix issue 20212 - invalid debug info with enum type in library reusing an old type index does not work because it might be in a different object file. Let cv_debtyp() sort out duplicates instead. https://github.com/dlang/dmd/pull/10407