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

            Bug ID: 109493
           Summary: Broken O2 optimization on s390x in GCC 13
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mitskevichmn at gmail dot com
  Target Milestone: ---

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

We found a problem in release version of a test (part of bee2 library test
suite) on Fedora Rawhide (39) official docker image.

Test fails with -O2 optimization on the linux/s390 platform, but works with
-O1.
Also it works on the linux/amd64, linux/arm64, linux/ppc64le platforms with -O1
and -O2.

1) gcc -v output:
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/s390x-redhat-linux/13/lto-wrapper
Target: s390x-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --disable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --enable-libstdcxx-backtrace
--with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array
--with-isl=/builddir/build/BUILD/gcc-13.0.1-20230401/obj-s390x-redhat-linux/isl-install
--enable-gnu-indirect-function --with-long-double-128 --with-arch=z13
--with-tune=z14 --enable-decimal-float --build=s390x-redhat-linux
--with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230401 (Red Hat 13.0.1-0) (GCC)

2) gcc build command:
gcc -O2 belt_test.c -o belt_test

3) run command:
belt_test

Reply via email to