Hi Alexandre,

On 2026-01-19 20:28, Alexandre Oliva wrote:

The bogus warning in pr113026-1.c is issued at some optimization
levels on various 32-bit targets.

Regstrapped on x86_64-linux-gnu.  Also tested with aarch64-elf and
arm-eabi with gcc-15.  Ok to install?

I think this is not working as intended for gcc-16.

Since your change, I get this in my logs for Cortex-M0/3/4/7/33/55/85 and 
Cortex-A7:

Testing torture/pr113026-1.c,   -O0
doing compile
Executing on host: /build/r16-7849-g1f9879e17466f5/bin/arm-none-eabi-gcc  
/build/gcc_src/gcc/testsuite/gcc.dg/torture/pr113026-1.c  -mthumb 
-march=armv7-m -mtune=cortex-m3 -mfloat-abi=soft -mfpu=auto   
-fdiagnostics-plain-output    -O0  -Wall -S     -o pr113026-1.s    (timeout = 
800)
spawn -ignore SIGHUP /build/r16-7849-g1f9879e17466f5/bin/arm-none-eabi-gcc 
/build/gcc_src/gcc/testsuite/gcc.dg/torture/pr113026-1.c -mthumb -march=armv7-m 
-mtune=cortex-m3 -mfloat-abi=soft -mfpu=auto -fdiagnostics-plain-output -O0 
-Wall -S -o pr113026-1.s
pid is 1717234 -1717234
pid is -1
output is  status 0
XPASS: gcc.dg/torture/pr113026-1.c   -O0  PR118504 (test for bogus messages, 
line 12)
PASS: gcc.dg/torture/pr113026-1.c   -O0  (test for excess errors)

On gcc-15, I do not get any message either, am I doing something wrong or how 
did you get the message?

Kind regards,
Torbjörn



for  gcc/testsuite/ChangeLog

        PR tree-optimization/113524
        * gcc.dg/torture/pr113026-1.c: XFAIL bogus warning on various
        32-bit targets.
---
  gcc/testsuite/gcc.dg/torture/pr113026-1.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr113026-1.c 
b/gcc/testsuite/gcc.dg/torture/pr113026-1.c
index 37b5281d547fb..fbea6e2aa15c5 100644
--- a/gcc/testsuite/gcc.dg/torture/pr113026-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pr113026-1.c
@@ -9,5 +9,5 @@ void
  foo (char *src, long n)
  {
    for (long i = 0; i < n; i++)
-    dst[i] = src[i]; /* { dg-bogus "" } */
+    dst[i] = src[i]; /* { dg-bogus "" "PR118504" { xfail { { arm-*-eabi arm-*-vxworks* 
sparc-leon3-elf } || { ilp32 && { { riscv*-*-* powerpc*-*-* } || { x86 && *-*-vxworks* } } } } } } 
*/
  }


Reply via email to