The recently added mpc860_no_lwsync.c test case fails on 64-bit PowerPC
targets (such as powerpc64le-linux-gnu) because the default -m64 option
conflicts with the 32-bit legacy processor specified by -mcpu=860,
resulting in the error: "cc1: error: '-m64' requires a PowerPC64 cpu".

Fix this by restricting the test case execution to 32-bit PowerPC
targets using the 'ilp32' target requirement.

2026-05-27  Kishan Parmar  <[email protected]>
            Surya Kumari Jangala  <[email protected]>

gcc/testsuite/ChangeLog:
        PR target/125448
        * gcc.target/powerpc/mpc860_no_lwsync.c: Restrict to ilp32 targets.
---
 gcc/testsuite/gcc.target/powerpc/mpc860_no_lwsync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/mpc860_no_lwsync.c 
b/gcc/testsuite/gcc.target/powerpc/mpc860_no_lwsync.c
index 575d35e1803..04f4a932e0f 100644
--- a/gcc/testsuite/gcc.target/powerpc/mpc860_no_lwsync.c
+++ b/gcc/testsuite/gcc.target/powerpc/mpc860_no_lwsync.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-options "-mcpu=860 -O2" } */
 
 /* Check that we do not emit lwsync when targeting MPC8xx (MPCCORE),
-- 
2.52.0

Reply via email to