https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116909
--- Comment #3 from Federico Kircheis <federico at kircheis dot it> --- Thank you for the fast response @Andrew Pinski , I'm sorry to have made a duplicate questino. This is what I've understood: 1) does g++ specify the behavior of the program in this case? The answer is no, otherwise the assembly snippet would not be necessary 2) If not, does it make sense to define it? ??? Even after reading the other threads, I'm not sure how portable asm("":"+r"(b)); is; my I guess is that it is platform specific, or does it work on all platforms where GCC runs on? (x84, x64, arm, linux, windows, ....) If it does not work on all platforms, does GCC provide a higher level abstraction, like a builtin? Otherwise, just came to my mind, the standard might already have the right tools; maybe something like placement new, start_lifetime_as could help? In particular start_lifetime_as_array seems well suited, but it needs a pointer and and a size, but in this case I have two pointers and "tests_end-tests_begin" would be UB. I've currently found no way to determine the amount of elements with the linker script, but that could be a better approach.