https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Alex Richardson from comment #5)
> extern int i;
> _Static_assert(__builtin_is_aligned(__builtin_assume_aligned(&i, 16), 8),
> "");
> generates an "alignment of the base pointee object (4 bytes) is less than
> the asserted 16 byte" error when evaluating __builtin_assume_aligned().

in constant expression contexts perhaps, though I'd certainly not word it that
way, if it was evaluated at runtime, it could have been true if one is lucky
(or ensures it manually, e.g. by
int alignas(16) i;
at the variable definition).

Reply via email to