From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 818B03858D33; Thu, 13 Apr 2023 06:22:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 818B03858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681366933; bh=YySBlTcwH01OmA15Rfl4R9z28w10uKfkiPahmoqm2R0=; h=From:To:Subject:Date:From; b=bnxGr7IScRcTUXcz8zGcl1uL+r1n74bN7eBVr6/KaiUD6jiB02SA8UAQW4C0xuEUW uVQPCV4LWnPHEllmP6oz6+k1Bh5XwTCt8LwushTDS/FxIKUKn9XcWfmreQ/i+wArCI LO26a7iZZB1MOg1HxjS2PcbiauiImjrd5jqntErU= From: "mitskevichmn at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109493] New: Broken O2 optimization on s390x in GCC 13 Date: Thu, 13 Apr 2023 06:22:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mitskevichmn at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109493 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=3D54847&action=3Dedit 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=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/s390x-redhat-linux/13/lto-wrapper Target: s390x-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=3Dc,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=3D= /usr --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-bugurl=3Dhttp://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=3Dposix --enable-checking=3Drelease --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=3D/usr/share/zoneinfo --with-linker-hash-style=3D= gnu --enable-plugin --enable-initfini-array --with-isl=3D/builddir/build/BUILD/gcc-13.0.1-20230401/obj-s390x-redhat-lin= ux/isl-install --enable-gnu-indirect-function --with-long-double-128 --with-arch=3Dz13 --with-tune=3Dz14 --enable-decimal-float --build=3Ds390x-redhat-linux --with-build-config=3Dbootstrap-lto --enable-link-serialization=3D1 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=