| Issue |
171432
|
| Summary |
Memory alignment incompatibility between clang-cl (18.1.0 and 19.1.5) and MSVC v19 latest when using push/pop packing and /Zp8
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
pascalliedtke
|
The incompatibility occurs when memory alignment is applied for an empty base class and for classes inheriting from these base classes.
At the same time the argument /Zp8 and the pragma push/pop pack needs to be used.
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/sdcEhxM9E (this time with --target=x86_64-pc-windows-msvc enabled)
The link uses clang 18.1.0, but I could also reproduce it locally using 19.1.5 - however godbolt does not provide that version for clang-cl yet.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs