Ok for trunk and releases/gcc-13? The alternative approach (that is changing the result a bit) is to drop the special treatment for arm*-*-*. I'm not sure if this is prefered or just disable the test for incompatible flags for arm*-*-*.
-- The test assumes it's okay to supply -march=armv7-a+simd, but it depends on what target you are running the tests for. For example, running the GCC testsuite for Cortex-M0 produces the follwing entry in the logs: Testing gcc.dg/pr41574.c doing compile Executing on host: arm-none-eabi-gcc .../pr41574.c -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-unsafe-math-optimizations -fdump-rtl-combine -ffat-lto-objects -S -o pr41574.s (timeout = 800) spawn -ignore SIGHUP arm-none-eabi-gcc .../pr41574.c -mthumb -march=armv6s-m -mcpu=cortex-m0 -mfloat-abi=soft -fdiagnostics-plain-output -O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-unsafe-math-optimizations -fdump-rtl-combine -ffat-lto-objects -S -o pr41574.s pid is 9799 -9799 cc1: warning: switch '-mcpu=cortex-m0' conflicts with switch '-march=armv7-a+simd' pid is -1 output is cc1: warning: switch '-mcpu=cortex-m0' conflicts with switch '-march=armv7-a+simd' status 0 FAIL: gcc.dg/pr41574.c (test for excess errors) Excess errors: cc1: warning: switch '-mcpu=cortex-m0' conflicts with switch '-march=armv7-a+simd' PASS: gcc.dg/pr41574.c scan-rtl-dump-not combine "\\(plus:DF \\(mult:DF" Patch has been verified on Linux. gcc/testsuite/ChangeLog: * gcc.dg/pr41574.c: Disable test for Arm targets incompatible with -march=armv7-a+simd. Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> --- gcc/testsuite/gcc.dg/pr41574.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/pr41574.c b/gcc/testsuite/gcc.dg/pr41574.c index 062c0044532..f6af0c34273 100644 --- a/gcc/testsuite/gcc.dg/pr41574.c +++ b/gcc/testsuite/gcc.dg/pr41574.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-unsafe-math-optimizations -fdump-rtl-combine" { target { arm*-*-* } } } */ -/* { dg-options "-O2 -fno-unsafe-math-optimizations -fdump-rtl-combine" { target { ! arm*-*-* } } } */ +/* { dg-options "-O2 -fno-unsafe-math-optimizations -fdump-rtl-combine" } */ +/* { dg-require-effective-target arm_arch_v7a_neon_multilib { target { arm*-*-* } } } */ +/* { dg-additional-options "-march=armv7-a -mfloat-abi=softfp -mfpu=neon" { target { arm*-*-* } } } */ static const double one=1.0; -- 2.25.1