https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123102

            Bug ID: 123102
           Summary: [ARM] Different runtime with -O1 for csmith code
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 63042
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63042&action=edit
C source code

For the attached C code on a Raspberry PI 5 (arm32):

dcb@raspberrypi:~/csmith $ ~/gcc/results/bin/gcc -Werror=return-type
-Werror=uninitialized -Werror=overflow -Werror=sequence-point -w
-fno-strict-aliasing bug1159.c
dcb@raspberrypi:~/csmith $ ./a.out
checksum = F94475D2

Add -O1 and this happens:

dcb@raspberrypi:~/csmith $ ~/gcc/results/bin/gcc -Werror=return-type
-Werror=uninitialized -Werror=overflow -Werror=sequence-point -w
-fno-strict-aliasing -O1 bug1159.c
dcb@raspberrypi:~/csmith $ ./a.out
checksum = D3375D58
dcb@raspberrypi:~/csmith $ 

Compiler is 

dcb@raspberrypi:~/csmith $ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.20251211.ubsan/libexec/gcc/arm-linux-gnueabihf/16.0.0/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../trunk/configure
--prefix=/home/dcb/gcc/results.20251211.ubsan --disable-bootstrap --disable-doc
--disable-multilib --with-build-config=bootstrap-ubsan
--with-pkgversion=13cceab6f87bfdf7 --enable-checking=yes
--enable-languages=c,c++ --with-cpu=cortex-a76 --with-fpu=neon-fp-armv8
--with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20251211 (experimental) (13cceab6f87bfdf7) 
dcb@raspberrypi:~/csmith $ 

I have a reduction running.

Reply via email to