The volatile global variable was first introduced in
e86f9654c. I have
noticed the compiler still optimizing the buffer out on AArch64
presumably because the assignment is after all other observable
behaviors so it's still valid to eliminate it.
setup_no_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
- prepare_test_buffer (buf);
vol_glob = buf;
+ prepare_test_buffer (buf);
}
static void
setup_ordinary_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
+ vol_glob = buf;
prepare_test_buffer (buf);
memset (buf, 0, TEST_BUFFER_SIZE);
- vol_glob = buf;
}
static void