From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1729916-garchives=archives.gentoo.org@lists.gentoo.org>
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) server-digest SHA256)
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id D28E11581EE
	for <garchives@archives.gentoo.org>; Fri, 21 Mar 2025 11:20:14 +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 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	(Authenticated sender: relay-lists.gentoo.org@gentoo.org)
	by smtp.gentoo.org (Postfix) with ESMTPSA id C3DB3342FFE
	for <garchives@archives.gentoo.org>; Fri, 21 Mar 2025 11:20:14 +0000 (UTC)
Received: from bobolink.gentoo.org (localhost [127.0.0.1])
	by bobolink.gentoo.org (Postfix) with ESMTP id BD8C41104AB;
	Fri, 21 Mar 2025 11:20:13 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 bobolink.gentoo.org (Postfix) with ESMTPS id AFA421104AB
	for <gentoo-commits@lists.gentoo.org>; Fri, 21 Mar 2025 11:20:13 +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 5FE033430C6
	for <gentoo-commits@lists.gentoo.org>; Fri, 21 Mar 2025 11:20:13 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B2A121C96
	for <gentoo-commits@lists.gentoo.org>; Fri, 21 Mar 2025 11:20:11 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
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" <sam@gentoo.org>
Message-ID: <1742555997.ebea0f72bf6bcc9c53105a689beb6263047b35c8.sam@gentoo>
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 15.0.0/gentoo/
X-VCS-Repository: proj/gcc-patches
X-VCS-Files: 15.0.0/gentoo/77_all_PR119376-Disable-clang-musttail.patch 15.0.0/gentoo/README.history
X-VCS-Directories: 15.0.0/gentoo/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: ebea0f72bf6bcc9c53105a689beb6263047b35c8
X-VCS-Branch: master
Date: Fri, 21 Mar 2025 11:20:11 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 2deac2b9-af34-467b-9ccb-14694ea4af74
X-Archives-Hash: 314901c4b3e094604ae0f78e20f86f1b

commit:     ebea0f72bf6bcc9c53105a689beb6263047b35c8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 21 11:19:57 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 21 11:19:57 2025 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ebea0f72

15.0.0: drop musttail workaround

Jakub's committed several fixes now, so let's see what falls out.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../77_all_PR119376-Disable-clang-musttail.patch   | 200 ---------------------
 15.0.0/gentoo/README.history                       |   1 -
 2 files changed, 201 deletions(-)

diff --git a/15.0.0/gentoo/77_all_PR119376-Disable-clang-musttail.patch b/15.0.0/gentoo/77_all_PR119376-Disable-clang-musttail.patch
deleted file mode 100644
index 3af4ab4..0000000
--- a/15.0.0/gentoo/77_all_PR119376-Disable-clang-musttail.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-https://inbox.sourceware.org/gcc-patches/20250320013102.1336516-1-andi@firstfloor.org/
-
-From 592f60bef27cb60ea6405ca8603449fc4d92e640 Mon Sep 17 00:00:00 2001
-Message-ID: <592f60bef27cb60ea6405ca8603449fc4d92e640.1742435883.git.sam@gentoo.org>
-From: Andi Kleen <ak@gcc.gnu.org>
-Date: Wed, 19 Mar 2025 18:31:02 -0700
-Subject: [PATCH] PR119376: Disable clang musttail
-
-There are multiple reports (see PR 119376) now where semantic differences
-in the gcc musttail implementation break existing programs written for the clang
-variant.
-
-Even though that can be all hopefully fixed eventually,
-for the gcc 15 release it seems safer to disable clang::musttail,
-and only keep gnu::musttail.
-
-That means that programs that use __has_c_attribute to check for
-clang::musttail must opt-in explicitly.
-
-Reported-by: Sam James
-
-gcc/c/ChangeLog:
-
-	PR ipa/119376
-	* c-parser.cc (c_parser_handle_musttail): Drop clang namespace
-	check.
-
-gcc/cp/ChangeLog:
-
-	PR ipa/119376
-	* parser.cc (cp_parser_jump_statement): Drop clang namespace
-	check.
-
-gcc/ChangeLog:
-
-	PR ipa/119376
-	* doc/extend.texi: Drop clang::musttail reference.
-
-gcc/testsuite/ChangeLog:
-
-PR ipa/119376
-	* c-c++-common/musttail23.c: Don't use clang::musttail
-	* c-c++-common/musttail24.c: Dito.
-	* c-c++-common/musttail3.c: Dito.
-	* g++.dg/musttail14.C: Dito.
----
- gcc/c/c-parser.cc                       |  5 -----
- gcc/cp/parser.cc                        |  6 ------
- gcc/doc/extend.texi                     |  2 +-
- gcc/testsuite/c-c++-common/musttail23.c | 10 +++++-----
- gcc/testsuite/c-c++-common/musttail24.c |  6 ------
- gcc/testsuite/c-c++-common/musttail3.c  |  6 +++---
- gcc/testsuite/g++.dg/musttail14.C       |  4 ++--
- 7 files changed, 11 insertions(+), 28 deletions(-)
-
-diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
-index d49d5c58659f..79654448acaa 100644
---- a/gcc/c/c-parser.cc
-+++ b/gcc/c/c-parser.cc
-@@ -7409,11 +7409,6 @@ c_parser_handle_musttail (c_parser *parser, tree std_attrs, attr_state &attr)
- 	  std_attrs = remove_attribute ("gnu", "musttail", std_attrs);
- 	  attr.musttail_p = true;
- 	}
--      if (lookup_attribute ("clang", "musttail", std_attrs))
--	{
--	  std_attrs = remove_attribute ("clang", "musttail", std_attrs);
--	  attr.musttail_p = true;
--	}
-     }
-   return std_attrs;
- }
-diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
-index 2fb1dc5992d4..da7700b55c64 100644
---- a/gcc/cp/parser.cc
-+++ b/gcc/cp/parser.cc
-@@ -15342,12 +15342,6 @@ cp_parser_jump_statement (cp_parser* parser, tree &std_attrs)
- 		musttail_p = true;
- 		std_attrs = remove_attribute ("gnu", "musttail", std_attrs);
- 	      }
--	    /* Support this for compatibility.  */
--	    if (lookup_attribute ("clang", "musttail", std_attrs))
--	      {
--		musttail_p = true;
--		std_attrs = remove_attribute ("clang", "musttail", std_attrs);
--	      }
- 
- 	    tree ret_expr = expr;
- 	    if (ret_expr && TREE_CODE (ret_expr) == TARGET_EXPR)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index b919df914648..50f95e968ff9 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -10241,7 +10241,7 @@ have to optimize it to just @code{return 42 + 42;}.
- @cindex @code{musttail} statement attribute
- @item musttail
- 
--The @code{gnu::musttail} or @code{clang::musttail} standard attribute
-+The @code{gnu::musttail} standard attribute
- or @code{musttail} GNU attribute can be applied to a @code{return} statement
- with a return-value expression that is a function call.  It asserts that the
- call must be a tail call that does not allocate extra stack space, so it is
-diff --git a/gcc/testsuite/c-c++-common/musttail23.c b/gcc/testsuite/c-c++-common/musttail23.c
-index d2ba70b03250..1ceab1165129 100644
---- a/gcc/testsuite/c-c++-common/musttail23.c
-+++ b/gcc/testsuite/c-c++-common/musttail23.c
-@@ -19,10 +19,10 @@ foo (int x)
-     [[gnu::musttail (1, "", 3)]] return bar ();		/* { dg-error "'musttail' attribute does not take any arguments" } */
- 							/* { dg-error "expected" "" { target c } .-1 } */
-   if (x == 3)
--    [[clang::musttail (1)]] return bar ();		/* { dg-error "'musttail' attribute does not take any arguments" } */
-+    [[gnu::musttail (1)]] return bar ();		/* { dg-error "'musttail' attribute does not take any arguments" } */
- 							/* { dg-error "expected" "" { target c } .-1 } */
-   if (x == 4)
--    [[clang::musttail (1, "", 3)]] return bar ();	/* { dg-error "'musttail' attribute does not take any arguments" } */
-+    [[gnu::musttail (1, "", 3)]] return bar ();	/* { dg-error "'musttail' attribute does not take any arguments" } */
- 							/* { dg-error "expected" "" { target c } .-1 } */
-   if (x == 5)
-     __attribute__((fallthrough, musttail)) return bar (); /* { dg-warning "attribute 'musttail' mixed with other attributes on 'return' statement" "" { target c } } */
-@@ -32,14 +32,14 @@ foo (int x)
-     [[fallthrough]] [[gnu::musttail]] return bar ();	/* { dg-warning "'fallthrough' attribute ignored" "" { target c } } */
- 							/* { dg-warning "attributes at the beginning of statement are ignored" "" { target c++ } .-1 } */
-   if (x == 7)
--    [[clang::musttail, fallthrough]] return bar ();	/* { dg-warning "'fallthrough' attribute ignored" "" { target c } } */
-+    [[gnu::musttail, fallthrough]] return bar ();	/* { dg-warning "'fallthrough' attribute ignored" "" { target c } } */
- 							/* { dg-warning "attributes at the beginning of statement are ignored" "" { target c++ } .-1 } */
-   if (x == 8)
-     __attribute__((musttail, musttail)) return bar ();
-   if (x == 9)
-     [[gnu::musttail, gnu::musttail]] return bar ();
-   if (x == 10)
--    [[clang::musttail]] [[clang::musttail]] return bar ();
-+    [[gnu::musttail]] [[gnu::musttail]] return bar ();
-   if (x == 11)
--    [[clang::musttail]] [[gnu::musttail]] return bar ();
-+    [[gnu::musttail]] [[gnu::musttail]] return bar ();
- }
-diff --git a/gcc/testsuite/c-c++-common/musttail24.c b/gcc/testsuite/c-c++-common/musttail24.c
-index 10c2d3f188d8..26b8dbfb4c8e 100644
---- a/gcc/testsuite/c-c++-common/musttail24.c
-+++ b/gcc/testsuite/c-c++-common/musttail24.c
-@@ -8,14 +8,8 @@
- #if !__has_cpp_attribute (gnu::musttail)
- #error missing gnu::musttail attribute
- #endif
--#if !__has_cpp_attribute (clang::musttail)
--#error missing clang::musttail attribute
--#endif
- #else
- #if !__has_c_attribute (gnu::musttail)
- #error missing gnu::musttail attribute
- #endif
--#if !__has_c_attribute (clang::musttail)
--#error missing clang::musttail attribute
--#endif
- #endif
-diff --git a/gcc/testsuite/c-c++-common/musttail3.c b/gcc/testsuite/c-c++-common/musttail3.c
-index 7499fd6460b4..daedca28852a 100644
---- a/gcc/testsuite/c-c++-common/musttail3.c
-+++ b/gcc/testsuite/c-c++-common/musttail3.c
-@@ -11,7 +11,7 @@ struct str
- cstruct (int x)
- {
-   if (x < 10)
--    [[clang::musttail]] return cstruct (x + 1);
-+    [[gnu::musttail]] return cstruct (x + 1);
-   return ((struct str){ x, 0 });
- }
- 
-@@ -19,11 +19,11 @@ int
- foo (int x)
- {
-   if (x < 10)
--    [[clang::musttail]] return foo2 (x, 29);
-+    [[gnu::musttail]] return foo2 (x, 29);
-   if (x < 100)
-     {
-       int k = foo (x + 1);
--      [[clang::musttail]] return k;	/* { dg-error "cannot tail-call: " } */
-+      [[gnu::musttail]] return k;	/* { dg-error "cannot tail-call: " } */
-     }
-   return x;
- }
-diff --git a/gcc/testsuite/g++.dg/musttail14.C b/gcc/testsuite/g++.dg/musttail14.C
-index 810b45546d61..e4764a3bc03b 100644
---- a/gcc/testsuite/g++.dg/musttail14.C
-+++ b/gcc/testsuite/g++.dg/musttail14.C
-@@ -58,8 +58,8 @@ garply (int x)
-     case 3:
-       __attribute__(()) [[gnu::musttail]] __attribute__(()) [[]] __attribute__(()) return qux (45);
-     case 4:
--      [[]] __attribute__(()) [[clang::musttail]] __attribute__(()) [[]] return corge (46);
-+      [[]] __attribute__(()) [[gnu::musttail]] __attribute__(()) [[]] return corge (46);
-     default:
--      __attribute__(()) [[clang::musttail]] __attribute__(()) [[]] __attribute__(()) return freddy (47);
-+      __attribute__(()) [[gnu::musttail]] __attribute__(()) [[]] __attribute__(()) return freddy (47);
-     }
- }
--- 
-2.49.0
-

diff --git a/15.0.0/gentoo/README.history b/15.0.0/gentoo/README.history
index c3b9934..5543b1c 100644
--- a/15.0.0/gentoo/README.history
+++ b/15.0.0/gentoo/README.history
@@ -1,6 +1,5 @@
 48	????
 
-	+ 77_all_PR119376-Disable-clang-musttail.patch
 	+ 78_all_PR118615.patch
 	+ 79_all_PR117811-arm-neon-shift.patch