On Mon, 31 Oct 2022 at 17:03, Eric Botcazou <botca...@adacore.com> wrote: > > > I suppose we could use memcmp on the as variable itself, to inspect > > the actual stored padding rather than the returned copy of it. > > Yes, that's probably the only safe stance when optimization is enabled.
Strictly speaking, it's not safe, because it's undefined to use memcmp on an object of a non-trivial type. But it should work.