This bug found in GCC sources on Aarch64 arch with strict alignment option. This got fixed in gcc with below commit ID: [https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103100] [https://gcc.gnu.org/cgit/gcc/commit/?id=b9d16d8361a9e3a82a2f21e759e760d235d43322] This bug fix was backported to the GCC 12 branch and is included in the 12.5 release. Since LTS23 uses GCC 12.5, the fix is already part of the LTS23 branch.
From attached bugzilla:
On aarch64, code example:
static void (*use)(unsigned char*); // to suppress optimizations
extern "C" void _start() {
unsigned char t2[216]={};
use(t2);
}
compiled with "gcc -save-temps -O2 -mstrict-align" will generate faulty assembly