From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA5A4385840D; Mon, 6 May 2024 21:41:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA5A4385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715031701; bh=tWM+9RsoZv+kANrlFehzt8rExVl74ekIdkWAcd9W3eM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DH6qsCbzBd9o8yPKlW04V0Hm6B9Pl7R7N9wxWiWLAyFBWTAWax9DmvoEQ+eMOkc1H BJ2uzVkv52CMErY2W8uo05cxaln1xosImWDviQNwwY3P87+Ilj10pDo+QdADt2tRO5 TiX/yHZPEGgsboIFkm5q74Q6SxIO2azZZF+qWv5o= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037 Date: Mon, 06 May 2024 21:41:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox 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: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=3D114872 --- Comment #17 from Sergei Trofimovich --- > 1) attach your *.s file and state which exact compiler you used (revision) Generate code first: https://slyfox.uni.cx/b/gcc/PR114872/d.tar.gz (4MB, does not fit on bugzill= a's 1MB limit) is the archive of source files from sage-10.3: - element.c: original unpreprocessed file - element.c.c: preprocessed file - element.S: assembly file (-S) - element-verbose.S: assembly file (-S -fverbose-asm, has compiler options) Compiler: # gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/x86_64-pc-linux-gnu/13/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /dev/shm/portage/sys-devel/gcc-13.2.1_p20240503/work/gcc-13-20240503/config= ure --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/13 --includedir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/13/include --datadir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/13 --mandir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/13/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/13/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13 --disable-silent-rules --disable-dependency-tracking --with-python-dir=3D/share/gcc-data/x86_64-pc-linux-gnu/13/python --enable-languages=3Dc,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=3Drelease --with-bugurl=3Dhttps://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo 13.2.1_p20240503 p15' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=3Dpos= ix --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 --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --without-zstd --without-isl --enable-default-pie --enable-default-ssp --disable-fixincludes Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.2.1 20240503 (Gentoo 13.2.1_p20240503 p15) Note: it's a weekly snapshot of 20240503 with --enable-default-ssp. I think it's a r13-8684-g704b15e277a879. The compiler also has a few distro-specific patches on top: https://gitweb.gentoo.org/proj/gcc-patches.git/tree/13.2.0/gentoo. Most of = them should not affect code generation too much, but some like 22_all_default_ssp-buffer-size.patch and 84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch might.=