selftests/powerpc/ptrace: Declare test temporary variables as volatile
While the target is volatile, the temporary variables used to access the target cast away the volatile. This is undefined behaviour, and a compiler may optimise away/reorder these accesses, breaking the test. This was observed with GCC 13.1.1, but it can be difficult to reproduce because of the dependency on compiler behaviour. Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230725005841.28854-5-bgray@linux.ibm.com
Please register or sign in to comment