Skip to content

[no_unique_address] Member not stored in previous member's padding #50766

Open
@zoecarver

Description

@zoecarver
Bugzilla Link 51424
Version trunk
OS All
CC @dwblaikie,@zygoloid

Extended Description

It seems like a missed optimization not to store members in a previous member's padding when the previous member is marked as [[no_unique_address]].

GCC implements this. The difference in codegen can be seen here: https://godbolt.org/z/zGs97xKG7

Metadata

Metadata

Assignees

No one assigned

    Labels

    ABIApplication Binary InterfacebugzillaIssues migrated from bugzillac++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions