Issue 170479
Summary Memory alignment incompatibility between x86-64 clang (21.1.0 or 19.1.0) and MSVC v19 latest
Labels clang
Assignees
Reporter pascalliedtke
    The incompatibility occurs when memory alignment is applied for an empty base class and for classes inheriting from these base classes. 

Check the following link with the code snippets that prints output for the class memory layout. In the output for each compiler check the offset of Derived::m_derived:

- For msvc it is 48. 
- For clang it is 40. 

https://gcc.godbolt.org/z/157xdM8cK

The link uses clang 19.1.0, but can also be switched to 21.1.0 to reproduce the issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to