https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49699
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |diagnostic
Severity|normal |enhancement
Summary|Aligned load on unaligned |Aligned load on unaligned
|address |address due to not
| |diagnosed ignored alignment
| |attribute
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
If you make 'x' not extern you'll see the alignment attribute has no effect:
.globl x
.bss
.align 16
.type x, @object
.size x, 16
x:
.zero 16
documentation explicitly says:
When used on a struct, or struct member, the @code{aligned} attribute can
only increase the alignment; in order to decrease it, the @code{packed}
attribute must be specified as well. When used as part of a typedef, the
@code{aligned} attribute can both increase and decrease alignment, and
specifying the @code{packed} attribute generates a warning.
so this bug is invalid.
I'm turning it into an enhancement request for a diagnostic.