To fix issue 15579, PR 5361 was merged. https://github.com/D-Programming-Language/dmd/pull/5361. But I noticed that it has changed extern (D) class layout, not only for extern (C++). https://github.com/D-Programming-Language/dmd/pull/5361/files#r51126555 Test case: extern (D) //extern (C++) { class Base { ~this() {} size_t x = 4; } interface Interface { int Method(); } class Derived : Base, Interface { size_t y = 5; int Method() { return 3; } } } void main() { Derived d; // dmd 2.069 master pragma(msg, d.x.offsetof); // (void*).sizeof * 2 pragma(msg, d.y.offsetof); // (void*).sizeof * 3 -> 4 } I'm not sure it was expected, so I open this regression issue. If it's an intentional change, we should update http://dlang.org/spec/abi ABI page, so there's an explanation for D class object layout.
You're right, the D ABI shouldn't have changed.
https://github.com/D-Programming-Language/dmd/pull/5387
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5bebb65a4dacef5cf33701e6d2dae61a41f460b4 fix Issue 15618 - [REG-master] Class member layout has been changed, ABI needs to be updated? https://github.com/D-Programming-Language/dmd/commit/9c90f94b8537965b16eb7c09289fcd040664e4fe Merge pull request #5387 from WalterBright/fix15618 fix Issue 15618 - [REG-master] Class member layout has been changed, …