GCC is free to generate multiple stores instead of just one (e.g. observed by switching to -O0), making the test fail. Make sure we really only have one store. Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> --- s390x/selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s390x/selftest.c b/s390x/selftest.c index 87eb934..1c8d16a 100644 --- a/s390x/selftest.c +++ b/s390x/selftest.c @@ -33,7 +33,7 @@ static void test_pgm_int(void) check_pgm_int_code(PGM_INT_CODE_OPERATION); expect_pgm_int(); - *((unsigned int*)-1) = 1; + asm volatile(" stg %0,0(%0)\n" : : "r"(-1)); check_pgm_int_code(PGM_INT_CODE_ADDRESSING); } -- 2.9.4