Misaligned objects are meant to be rejected universally by the compiler.
gcc/ada/ChangeLog:
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Validate
a known alignment on the object even if there is an address clause.
}
/* If an alignment is specified, use it if valid. Note that exceptions
- are objects but don't have an alignment and there is also no point in
- setting it for an address clause, since the final type of the object
- will be a reference type. */
- if (Known_Alignment (gnat_entity)
- && kind != E_Exception
- && No (Address_Clause (gnat_entity)))
+ are objects but don't have an alignment. */
+ if (Known_Alignment (gnat_entity) && kind != E_Exception)
align = validate_alignment (Alignment (gnat_entity), gnat_entity,
TYPE_ALIGN (gnu_type));