From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9A961158041 for ; Mon, 4 Mar 2024 23:34:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF2FCE2A23; Mon, 4 Mar 2024 23:34:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5D182E2A23 for ; Mon, 4 Mar 2024 23:34:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 66CD534300E for ; Mon, 4 Mar 2024 23:34:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A46FAB3D for ; Mon, 4 Mar 2024 23:34:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1709595252.c18d0e4be5597665342d4b16f228cfe4dff9f5b0.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/files/, sys-devel/gcc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/gcc/files/gcc-14.0.1_pre20240303-uninit.patch sys-devel/gcc/gcc-14.0.1_pre20240303-r1.ebuild sys-devel/gcc/gcc-14.0.1_pre20240303.ebuild X-VCS-Directories: sys-devel/gcc/files/ sys-devel/gcc/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: c18d0e4be5597665342d4b16f228cfe4dff9f5b0 X-VCS-Branch: master Date: Mon, 4 Mar 2024 23:34:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0d0c1870-d11e-4615-bd01-d1ff979b8781 X-Archives-Hash: e6dde3d6b6a195f6622034feef4a95fb commit: c18d0e4be5597665342d4b16f228cfe4dff9f5b0 Author: Sam James gentoo org> AuthorDate: Mon Mar 4 23:33:51 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon Mar 4 23:34:12 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c18d0e4b sys-devel/gcc: backport uninit var fix to 14.0.1_pre20240303 Signed-off-by: Sam James gentoo.org> .../gcc/files/gcc-14.0.1_pre20240303-uninit.patch | 48 ++++++++++++++++++++++ ...303.ebuild => gcc-14.0.1_pre20240303-r1.ebuild} | 1 + 2 files changed, 49 insertions(+) diff --git a/sys-devel/gcc/files/gcc-14.0.1_pre20240303-uninit.patch b/sys-devel/gcc/files/gcc-14.0.1_pre20240303-uninit.patch new file mode 100644 index 000000000000..5ad41c4581a9 --- /dev/null +++ b/sys-devel/gcc/files/gcc-14.0.1_pre20240303-uninit.patch @@ -0,0 +1,48 @@ +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=901e7bdab70e2275723ac31dacbbce0b6f68f4f4 + +From 901e7bdab70e2275723ac31dacbbce0b6f68f4f4 Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Mon, 4 Mar 2024 19:23:02 +0100 +Subject: [PATCH] combine: Fix recent WORD_REGISTER_OPERATIONS check [PR113010] + +On Mon, Mar 04, 2024 at 05:18:39PM +0100, Rainer Orth wrote: +> unfortunately, the patch broke Solaris/SPARC bootstrap +> (sparc-sun-solaris2.11): +> +> .../gcc/combine.cc: In function 'rtx_code simplify_comparison(rtx_code, rtx_def**, rtx_def**)': +> .../gcc/combine.cc:12101:25: error: '*(unsigned int*)((char*)&inner_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' may be used uninitialized [-Werror=maybe-uninitialized] +> 12101 | scalar_int_mode mode, inner_mode, tmode; +> | ^~~~~~~~~~ + +I don't see how it could ever work properly, inner_mode in that spot is +just uninitialized. + +I think we shouldn't worry about paradoxical subregs of non-scalar_int_mode +REGs/MEMs and for the scalar_int_mode ones should initialize inner_mode +before we use it. +Another option would be to use +maybe_lt (GET_MODE_PRECISION (GET_MODE (SUBREG_REG (op0))), BITS_PER_WORD) +and +load_extend_op (GET_MODE (SUBREG_REG (op0))) == ZERO_EXTEND, +or set machine_mode smode = GET_MODE (SUBREG_REG (op0)); and use it in +those two spots. + +2024-03-04 Jakub Jelinek + + PR rtl-optimization/113010 + * combine.cc (simplify_comparison): Guard the + WORD_REGISTER_OPERATIONS check on scalar_int_mode of SUBREG_REG + and initialize inner_mode. +--- a/gcc/combine.cc ++++ b/gcc/combine.cc +@@ -12554,6 +12554,8 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) + if (paradoxical_subreg_p (op0)) + { + if (WORD_REGISTER_OPERATIONS ++ && is_a (GET_MODE (SUBREG_REG (op0)), ++ &inner_mode) + && GET_MODE_PRECISION (inner_mode) < BITS_PER_WORD + /* On WORD_REGISTER_OPERATIONS targets the bits + beyond sub_mode aren't considered undefined, +-- +2.39.3 diff --git a/sys-devel/gcc/gcc-14.0.1_pre20240303.ebuild b/sys-devel/gcc/gcc-14.0.1_pre20240303-r1.ebuild similarity index 97% rename from sys-devel/gcc/gcc-14.0.1_pre20240303.ebuild rename to sys-devel/gcc/gcc-14.0.1_pre20240303-r1.ebuild index 97b3b7629c95..ddfe33a42323 100644 --- a/sys-devel/gcc/gcc-14.0.1_pre20240303.ebuild +++ b/sys-devel/gcc/gcc-14.0.1_pre20240303-r1.ebuild @@ -60,5 +60,6 @@ src_prepare() { toolchain_src_prepare + eapply "${FILESDIR}"/${P}-uninit.patch eapply_user }