From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 32C353858D29; Sat, 8 Jun 2024 12:24:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32C353858D29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717849470; bh=9YttpzvPOnO4WKtTWMb5g4kQHF1dwZYhXDta1S1dslg=; h=From:To:Subject:Date:From; b=xYr+pnj0pNovGqqlzQjcKkrn+JVbRRiIf2BtcuPm5PALdzJDnaMfd+rd3KnBEtMHl Foz65Ew0T9v5yCUImhtSRyJyvMZ6OaHDDmLblgrCHNFsJXMo+tyGlUdWNi6FeTNmCe SH6c/e06OaZIoGEyW4Q7TcTEiwC47FMs7EuP6Sws= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115395] New: [15 regression] libarchive miscompiled with -O2 -march=znver2 -fno-vect-cost-model Date: Sat, 08 Jun 2024 12:24:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sjames at gcc dot gnu.org 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=3D115395 Bug ID: 115395 Summary: [15 regression] libarchive miscompiled with -O2 -march=3Dznver2 -fno-vect-cost-model Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Created attachment 58382 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58382&action=3Dedit bad.c libarchive fails several tests with -O3 -march=3Dznver2 -fno-vect-cost-mode= l. I picked 'libarchive_test_read_format_rar_multivolume_seek_data' to reduce. ``` $ gcc-15 test.c -o /tmp/test -O2 -march=3Dznver2 && /tmp/test ; echo $? 0 $ gcc-15 test.c -o /tmp/test -O2 -fno-vect-cost-model -march=3Dznver2 && /tmp/test && echo $? aborting on wrong offset=3D214 Aborted (core dumped) 134 ``` -- Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/x86_64-pc-linux-gnu/15/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/configure --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu --prefix=3D/usr --bindir=3D/usr/x86_64-pc-linux-gnu/gcc-bin/15 --includedir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/15/include --datadir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/15 --mandir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15 --disable-silent-rules --disable-dependency-tracking --with-python-dir=3D/share/gcc-data/x86_64-pc-linux-gnu/15/python --enable-languages=3Dc,c++,fortran,rust --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=3Dyes,extra,rtl --with-bugurl=3Dhttps://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo Harden= ed 15.0.9999 p, commit 9a866462097fe24696c924a3874fd307c775e860' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --enable-multilib --with-multilib-list=3Dm32,m64 --disable-fixed-point --enable-targets=3Dall --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --enable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-build-config=3D'bootstrap= -O3 bootstrap-lto' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240607 (experimental) a3d68b5155018817dd7eef5abbaeadf3959b8e5e (Gentoo Hardened 15.0.9999 p, comm= it 9a866462097fe24696c924a3874fd307c775e860)=