The address of the static variable is unknown at compile time, this is decided later by the linker. There is no suitable move for "the address of a character modulo some arbitrary number" that the compiler can emit as an initialization value for the linker to eliminate it, so it refuses. As Tom says in the comments, he can at least assume that the linker is not going to break the minimum required alignment for the type, so he can optimize the expression in this case.
The only way I could achieve this as it is is simply to declare it as extern bool aligned , and then use some black magic linker script to determine it with the appropriate value during the link.
source share