From: Jakub Jelinek Date: Fri, 24 Mar 2023 08:42:18 +0000 (+0100) Subject: testsuite: Fix up gcc.target/i386/pr109137.c testcase [PR109137] X-Git-Tag: basepoints/gcc-14~361 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d9e52675c009139a14182d92ddb446ba2feabce;p=thirdparty%2Fgcc.git testsuite: Fix up gcc.target/i386/pr109137.c testcase [PR109137] The testcase has a couple of small problems: 1) had -m32 in dg-options, that should never be done, instead the test should be guarded on ia32 2) adds -fPIC unconditionally (that should be guarded on fpic effective target) 3) using #include for a RA test seems unnecessary, __builtin_memset handles it without the header 2023-03-24 Jakub Jelinek PR target/109137 * gcc.target/i386/pr109137.c: Remove -m32 from dg-options, instead require ia32 effective target. Only add -fPIC for fpic effective target. Remove #include , use __builtin_memset instead of memset. --- diff --git a/gcc/testsuite/gcc.target/i386/pr109137.c b/gcc/testsuite/gcc.target/i386/pr109137.c index ffd8e8c574b5..e92a5e478555 100644 --- a/gcc/testsuite/gcc.target/i386/pr109137.c +++ b/gcc/testsuite/gcc.target/i386/pr109137.c @@ -1,6 +1,8 @@ -/* { dg-do compile } */ -/* { dg-options "-m32 -O3 -march=znver1 -fPIC -mfpmath=sse -w" } */ -#include +/* PR target/109137 */ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O3 -march=znver1 -mfpmath=sse -w" } */ +/* { dg-additional-options "-fPIC" { target fpic } } */ + typedef struct { char bytestream_end; } CABACContext; @@ -12,7 +14,7 @@ typedef struct { } H264SliceContext; H264SliceContext ff_h264_decode_mb_cabac_sl; void ff_h264_decode_mb_cabac(void) { - memset((void*)ff_h264_decode_mb_cabac_h_0, 6, 48); + __builtin_memset((void*)ff_h264_decode_mb_cabac_h_0, 6, 48); int i; for (;; i++) { __asm__(""/* { dg-error "'asm' operand has impossible constraints" } */ @@ -25,4 +27,3 @@ void ff_h264_decode_mb_cabac(void) { decode_cabac_mb_intra4x4_pred_mode_mode; } } -