May 17, 2022

I am compiling some test code which dmd v2.100.and linking against a libdecimal.a compiled in March, probably compiled with dmd v2.099.0.

   $ dmd -g mytest.d decimal.git/libdecimal.a

Now the linker complains:

decimal.git/libdecimal.a(decimal_4f_a27.o):(.data._D7decimalQi25InvalidOperationException6__vtblZ+0x48): undefined reference to `_D6object9Throwable7messageMxFZAxa'
decimal.git/libdecimal.a(decimal_50_94f.o):(.data._D7decimalQi23DivisionByZeroException6__vtblZ+0x48): undefined reference to `_D6object9Throwable7messageMxFZAxa'
decimal.git/libdecimal.a(decimal_51_703.o):(.data._D7decimalQi17OverflowException6__vtblZ+0x48): undefined reference to `_D6object9Throwable7messageMxFZAxa'
decimal.git/libdecimal.a(decimal_52_765.o):(.data._D7decimalQi18UnderflowException6__vtblZ+0x48): undefined reference to `_D6object9Throwable7messageMxFZAxa'
decimal.git/libdecimal.a(decimal_53_67b.o):(.data._D7decimalQi16InexactException6__vtblZ+0x48): undefined reference to `_D6object9Throwable7messageMxFZAxa'
decimal.git/libdecimal.a(decimal_4e_65e.o):(.data._D7decimalQi16DecimalException6__vtblZ+0x48): more undefined references to `_D6object9Throwable7messageMxFZAxa' follow
collect2: ld returned 1 exit status
Error: linker exited with status 1

which demangles to

decimal.git/libdecimal.a(decimal_4e_65e.o):(.data.decimal.decimal.DecimalException.__vtbl+0x48): more undefined references to `const const(char)[] object.Throwable.message()' follow

When switching back to dmd v2.099.1 linking succeeds. Could not find any hint in https://dlang.org/changelog/2.100.0.html.

May 18, 2022
As far as I know, no D compiler guarantees compatibility between objects built on different version of itself.

The change would have been[0].

[0] https://github.com/dlang/druntime/commit/c6762914682d4fa894e2b746bf4bd9ce3ec9f7cb