From 499b63048acd5e9ffd3c04061b531f6bf851dc00 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 25 Sep 2020 11:43:43 +0200 Subject: [PATCH] testsuite/97204 - fix gcc.target/i386/sse2-mmx-pinsrw.c This fixes the testcase writing to adjacent stack vars, exposed my IPA modref. 2020-09-25 Richard Biener PR testsuite/97204 * gcc.target/i386/sse2-mmx-pinsrw.c: Fix. --- gcc/testsuite/gcc.target/i386/sse2-mmx-pinsrw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/i386/sse2-mmx-pinsrw.c b/gcc/testsuite/gcc.target/i386/sse2-mmx-pinsrw.c index c25ddd96daa..fd933555913 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-mmx-pinsrw.c +++ b/gcc/testsuite/gcc.target/i386/sse2-mmx-pinsrw.c @@ -42,7 +42,7 @@ compute_correct_result (__m64 *src_p, int val, unsigned int imm, static void sse2_test (void) { - int r, ck; + int r[2], ck[2]; int i; int failed = 0; __v4hi y = { 3320, -3339, 48, 4392 }; @@ -50,9 +50,9 @@ sse2_test (void) /* Run the MMX tests */ for (i = 0; i < 4; i++) { - test_pinsrw ((__m64 *) &y, 0x1234, i, &r); - compute_correct_result ((__m64 *) &y, 0x1234, i, &ck); - if (r != ck) + test_pinsrw ((__m64 *) &y, 0x1234, i, r); + compute_correct_result ((__m64 *) &y, 0x1234, i, ck); + if (r[0] != ck[0] || r[1] != ck[1]) failed++; } -- 2.30.2