From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 finch.gentoo.org (Postfix) with ESMTPS id 6595E158003 for ; Tue, 17 Jun 2025 03:09:51 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 4D655341EE4 for ; Tue, 17 Jun 2025 03:09:51 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 31B05110276; Tue, 17 Jun 2025 03:09:50 +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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 1FA68110276 for ; Tue, 17 Jun 2025 03:09:50 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B291B341EE4 for ; Tue, 17 Jun 2025 03:09:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 527A0650 for ; Tue, 17 Jun 2025 03:09:48 +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: <1750129762.089225afa61f68b5c9b60e90c4dfa7d89cc95ea4.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/gcc/files/0001-c-__has_trivial_destructor-regression.patch sys-devel/gcc/files/0002-c-__is_destructible-fixes-PR107600.patch sys-devel/gcc/files/0003-c-constinit-diagnostic-regression-PR120506.patch sys-devel/gcc/files/0004-c-more-__is_destructible-fixes-PR107600.patch X-VCS-Directories: sys-devel/gcc/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 089225afa61f68b5c9b60e90c4dfa7d89cc95ea4 X-VCS-Branch: master Date: Tue, 17 Jun 2025 03:09:48 +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: dd2fdc9a-9aed-4269-91cf-26f66136396d X-Archives-Hash: de0a7e3200ce020460d382f8b9c2d386 commit: 089225afa61f68b5c9b60e90c4dfa7d89cc95ea4 Author: Sam James gentoo org> AuthorDate: Tue Jun 17 03:09:15 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jun 17 03:09:22 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=089225af sys-devel/gcc: drop unused patches Signed-off-by: Sam James gentoo.org> ...001-c-__has_trivial_destructor-regression.patch | 66 -------------- .../0002-c-__is_destructible-fixes-PR107600.patch | 101 --------------------- ...-constinit-diagnostic-regression-PR120506.patch | 78 ---------------- ...4-c-more-__is_destructible-fixes-PR107600.patch | 71 --------------- 4 files changed, 316 deletions(-) diff --git a/sys-devel/gcc/files/0001-c-__has_trivial_destructor-regression.patch b/sys-devel/gcc/files/0001-c-__has_trivial_destructor-regression.patch deleted file mode 100644 index 7cfa23463595..000000000000 --- a/sys-devel/gcc/files/0001-c-__has_trivial_destructor-regression.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 089e4f426502a620deb9efc0d80118931fd951d2 Mon Sep 17 00:00:00 2001 -Message-ID: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -From: Jason Merrill -Date: Mon, 2 Jun 2025 08:36:22 -0400 -Subject: [PATCH 1/4] c++: __has_trivial_destructor regression - -We don't want the new call to get_dtor to cause function instantiation. - - PR c++/107600 - -gcc/cp/ChangeLog: - - * semantics.cc (trait_expr_value) [CPTK_HAS_TRIVIAL_DESTRUCTOR]: - Add cp_unevaluated. - -gcc/testsuite/ChangeLog: - - * g++.dg/ext/has_trivial_destructor-3.C: New test. ---- - gcc/cp/semantics.cc | 1 + - .../g++.dg/ext/has_trivial_destructor-3.C | 21 +++++++++++++++++++ - 2 files changed, 22 insertions(+) - create mode 100644 gcc/testsuite/g++.dg/ext/has_trivial_destructor-3.C - -diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc -index cafc9d0ee2c3..18a2b4709cf1 100644 ---- a/gcc/cp/semantics.cc -+++ b/gcc/cp/semantics.cc -@@ -13420,6 +13420,7 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2) - if (CLASS_TYPE_P (type1) && type_build_dtor_call (type1)) - { - deferring_access_check_sentinel dacs (dk_no_check); -+ cp_unevaluated un; - tree fn = get_dtor (type1, tf_none); - if (!fn && !seen_error ()) - warning (0, "checking %qs for type %qT with a destructor that " -diff --git a/gcc/testsuite/g++.dg/ext/has_trivial_destructor-3.C b/gcc/testsuite/g++.dg/ext/has_trivial_destructor-3.C -new file mode 100644 -index 000000000000..a179be52e936 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/ext/has_trivial_destructor-3.C -@@ -0,0 +1,21 @@ -+// { dg-do compile { target c++11 } } -+ -+struct X; -+ -+template -+struct default_delete -+{ -+ void operator()(T*) { static_assert(sizeof(T), "type is not incomplete"); } -+}; -+ -+template> -+struct unique_ptr -+{ -+ ~unique_ptr() { del(ptr); } -+ -+ T* ptr; -+ D del; -+}; -+ -+ -+constexpr bool b = __has_trivial_destructor(unique_ptr); --- -2.49.0 - diff --git a/sys-devel/gcc/files/0002-c-__is_destructible-fixes-PR107600.patch b/sys-devel/gcc/files/0002-c-__is_destructible-fixes-PR107600.patch deleted file mode 100644 index 70f13b838a5d..000000000000 --- a/sys-devel/gcc/files/0002-c-__is_destructible-fixes-PR107600.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 1de6c1abe44b77aa5a253df9da57130a55e8d907 Mon Sep 17 00:00:00 2001 -Message-ID: <1de6c1abe44b77aa5a253df9da57130a55e8d907.1748905952.git.sam@gentoo.org> -In-Reply-To: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -References: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -From: Jason Merrill -Date: Mon, 2 Jun 2025 10:09:07 -0400 -Subject: [PATCH 2/4] c++: __is_destructible fixes [PR107600] - -destructible_expr was wrongly assuming that TO is a class type. - -When is_xible_helper was added in r8-742 it returned early for abstract -class types, which is correct for __is_constructible, but not -__is_assignable or (now) __is_destructible. - - PR c++/107600 - -gcc/cp/ChangeLog: - - * method.cc (destructible_expr): Handle non-classes. - (constructible_expr): Check for abstract class here... - (is_xible_helper): ...not here. - -gcc/testsuite/ChangeLog: - - * g++.dg/ext/is_destructible2.C: New test. ---- - gcc/cp/method.cc | 21 ++++++++++++++++----- - gcc/testsuite/g++.dg/ext/is_destructible2.C | 15 +++++++++++++++ - 2 files changed, 31 insertions(+), 5 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/ext/is_destructible2.C - -diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc -index 3a675d9f8723..bb6790f13cdb 100644 ---- a/gcc/cp/method.cc -+++ b/gcc/cp/method.cc -@@ -2251,6 +2251,8 @@ constructible_expr (tree to, tree from) - const int len = TREE_VEC_LENGTH (from); - if (CLASS_TYPE_P (to)) - { -+ if (ABSTRACT_CLASS_TYPE_P (to)) -+ return error_mark_node; - tree ctype = to; - vec *args = NULL; - if (!TYPE_REF_P (to)) -@@ -2337,10 +2339,19 @@ destructible_expr (tree to) - { - cp_unevaluated cp_uneval_guard; - int flags = LOOKUP_NORMAL|LOOKUP_DESTRUCTOR; -- to = build_trait_object (to); -- tree r = build_delete (input_location, TREE_TYPE (to), to, -- sfk_complete_destructor, flags, 0, tf_none); -- return r; -+ to = strip_array_types (to); -+ if (CLASS_TYPE_P (to)) -+ { -+ to = build_trait_object (to); -+ return build_delete (input_location, TREE_TYPE (to), to, -+ sfk_complete_destructor, flags, 0, tf_none); -+ } -+ /* [expr.prim.id.dtor] If the id-expression names a pseudo-destructor, T -+ shall be a scalar type.... */ -+ else if (scalarish_type_p (to)) -+ return void_node; -+ else -+ return error_mark_node; - } - - /* Returns a tree iff TO is assignable (if CODE is MODIFY_EXPR) or -@@ -2352,7 +2363,7 @@ is_xible_helper (enum tree_code code, tree to, tree from, bool trivial) - { - to = complete_type (to); - deferring_access_check_sentinel acs (dk_no_deferred); -- if (VOID_TYPE_P (to) || ABSTRACT_CLASS_TYPE_P (to) -+ if (VOID_TYPE_P (to) - || (from && FUNC_OR_METHOD_TYPE_P (from) - && (TYPE_READONLY (from) || FUNCTION_REF_QUALIFIED (from)))) - return error_mark_node; -diff --git a/gcc/testsuite/g++.dg/ext/is_destructible2.C b/gcc/testsuite/g++.dg/ext/is_destructible2.C -new file mode 100644 -index 000000000000..7f15fc786848 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/ext/is_destructible2.C -@@ -0,0 +1,15 @@ -+// PR c++/107600 -+// { dg-additional-options -Wno-c++17-extensions } -+// { dg-do compile { target c++11 } } -+ -+struct A -+{ -+ A& operator= (const A&); -+ virtual ~A() = 0; -+}; -+ -+static_assert( __is_destructible(A) ); -+static_assert( __is_assignable(A, A) ); -+static_assert( not __is_destructible(int()) ); -+static_assert( not __is_nothrow_destructible(int()) ); -+static_assert( not __is_trivially_destructible(int()) ); --- -2.49.0 - diff --git a/sys-devel/gcc/files/0003-c-constinit-diagnostic-regression-PR120506.patch b/sys-devel/gcc/files/0003-c-constinit-diagnostic-regression-PR120506.patch deleted file mode 100644 index 6f6a96fcec70..000000000000 --- a/sys-devel/gcc/files/0003-c-constinit-diagnostic-regression-PR120506.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 3fd9983fede89f1a996d44439d0938ee0d9ff76c Mon Sep 17 00:00:00 2001 -Message-ID: <3fd9983fede89f1a996d44439d0938ee0d9ff76c.1748905952.git.sam@gentoo.org> -In-Reply-To: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -References: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -From: Jason Merrill -Date: Mon, 2 Jun 2025 10:59:02 -0400 -Subject: [PATCH 3/4] c++: constinit diagnostic regression [PR120506] - -In r16-57 I thought it was unnecessary to mention incomplete initialization -after another diagnostic, but actually it's useful elaboration. - - PR c++/120506 - -gcc/cp/ChangeLog: - - * constexpr.cc (cxx_eval_outermost_constant_expr): Always check - CONSTRUCTOR_NO_CLEARING. - -gcc/testsuite/ChangeLog: - - * g++.dg/cpp2a/constinit21.C: New test. ---- - gcc/cp/constexpr.cc | 3 +-- - gcc/testsuite/g++.dg/cpp2a/constinit21.C | 28 ++++++++++++++++++++++++ - 2 files changed, 29 insertions(+), 2 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/cpp2a/constinit21.C - -diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc -index 61481c6f7a02..c107b338344c 100644 ---- a/gcc/cp/constexpr.cc -+++ b/gcc/cp/constexpr.cc -@@ -9278,8 +9278,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, - - /* After verify_constant because reduced_constant_expression_p can unset - CONSTRUCTOR_NO_CLEARING. */ -- if (!non_constant_p -- && TREE_CODE (r) == CONSTRUCTOR && CONSTRUCTOR_NO_CLEARING (r)) -+ if (TREE_CODE (r) == CONSTRUCTOR && CONSTRUCTOR_NO_CLEARING (r)) - { - if (!allow_non_constant) - error ("%qE is not a constant expression because it refers to " -diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit21.C b/gcc/testsuite/g++.dg/cpp2a/constinit21.C -new file mode 100644 -index 000000000000..18bca9012024 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp2a/constinit21.C -@@ -0,0 +1,28 @@ -+// PR c++/120506 -+// { dg-do compile { target c++20 } } -+// Test that we give more information about why the init is non-constant -+ -+struct A -+{ -+ constexpr A(int c) : counter(c) { } -+ -+ int counter; -+}; -+ -+ -+struct B : A -+{ -+ constexpr B(int c) : A(c) { } -+ -+ int i; // OOPS, not initialized -+}; -+ -+struct C -+{ -+ B sem; -+ -+ constexpr C(int c) : sem(c) { } -+}; -+ -+constinit C s(0); // { dg-error "incompletely initialized" } -+// { dg-prune-output "constant" } --- -2.49.0 - diff --git a/sys-devel/gcc/files/0004-c-more-__is_destructible-fixes-PR107600.patch b/sys-devel/gcc/files/0004-c-more-__is_destructible-fixes-PR107600.patch deleted file mode 100644 index 1cc68e223054..000000000000 --- a/sys-devel/gcc/files/0004-c-more-__is_destructible-fixes-PR107600.patch +++ /dev/null @@ -1,71 +0,0 @@ -From f712fd80cb1c29b1111184c2e9c1784861d0f788 Mon Sep 17 00:00:00 2001 -Message-ID: -In-Reply-To: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -References: <089e4f426502a620deb9efc0d80118931fd951d2.1748905952.git.sam@gentoo.org> -From: Jason Merrill -Date: Mon, 2 Jun 2025 14:58:42 -0400 -Subject: [PATCH 4/4] c++: more __is_destructible fixes [PR107600] - - PR c++/107600 - -gcc/cp/ChangeLog: - - * method.cc (destructible_expr): Fix refs and arrays of unknown - bound. - -gcc/testsuite/ChangeLog: - - * g++.dg/ext/is_destructible2.C: Add more cases. ---- - gcc/cp/method.cc | 11 ++++++++++- - gcc/testsuite/g++.dg/ext/is_destructible2.C | 9 +++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc -index bb6790f13cdb..67a80a387ba7 100644 ---- a/gcc/cp/method.cc -+++ b/gcc/cp/method.cc -@@ -2332,13 +2332,22 @@ constructible_expr (tree to, tree from) - return expr; - } - --/* Return declval().~T() treated as an unevaluated operand. */ -+/* Valid if "Either T is a reference type, or T is a complete object type for -+ which the expression declval().~U() is well-formed when treated as an -+ unevaluated operand ([expr.context]), where U is remove_all_extents_t." -+ -+ For a class U, return the destructor call; otherwise return void_node if -+ valid or error_mark_node if not. */ - - static tree - destructible_expr (tree to) - { - cp_unevaluated cp_uneval_guard; - int flags = LOOKUP_NORMAL|LOOKUP_DESTRUCTOR; -+ if (TYPE_REF_P (to)) -+ return void_node; -+ if (!COMPLETE_TYPE_P (complete_type (to))) -+ return error_mark_node; - to = strip_array_types (to); - if (CLASS_TYPE_P (to)) - { -diff --git a/gcc/testsuite/g++.dg/ext/is_destructible2.C b/gcc/testsuite/g++.dg/ext/is_destructible2.C -index 7f15fc786848..2edf440ef44b 100644 ---- a/gcc/testsuite/g++.dg/ext/is_destructible2.C -+++ b/gcc/testsuite/g++.dg/ext/is_destructible2.C -@@ -13,3 +13,12 @@ static_assert( __is_assignable(A, A) ); - static_assert( not __is_destructible(int()) ); - static_assert( not __is_nothrow_destructible(int()) ); - static_assert( not __is_trivially_destructible(int()) ); -+static_assert( __is_destructible(int&) ); -+static_assert( __is_destructible(int&&) ); -+static_assert( __is_destructible(int(&)[1]) ); -+static_assert( __is_destructible(const int(&)[1]) ); -+static_assert( __is_destructible(void(&)()) ); -+static_assert( not __is_destructible(int[]) ); -+static_assert( not __is_destructible(const int[]) ); -+static_assert( not __is_destructible(int[][1]) ); -+static_assert( not __is_destructible(const int[][1]) ); --- -2.49.0 -