Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-24 Thread Andrew Pinski
On Thu, Mar 20, 2025 at 10:02 AM Andi Kleen wrote: > > On Thu, Mar 20, 2025 at 05:28:48PM +0100, Jakub Jelinek wrote: > > On Thu, Mar 20, 2025 at 09:19:02AM -0700, Andi Kleen wrote: > > > The inlining was just one of the issue, there are some related to > > > different semantics of escaped locals.

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-22 Thread Jakub Jelinek
On Thu, Mar 20, 2025 at 09:19:02AM -0700, Andi Kleen wrote: > The inlining was just one of the issue, there are some related to > different semantics of escaped locals. gcc always errors out while > LLVM declares it undefined. > > But maybe we can fix that one too. I have 3 patches to be tested,

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-22 Thread Jakub Jelinek
On Fri, Mar 21, 2025 at 08:31:35AM -0400, Jason Merrill wrote: > > Not sure I like this, but if others (e.g. Richi, Joseph, Jason) are ok with > > it I can live with it. But we'd need a good documentation, ideally some > > some new warning about it (perhaps enabled in -Wextra) and testcase > > cov

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-21 Thread Jason Merrill
On 3/20/25 12:28 PM, Jakub Jelinek wrote: On Thu, Mar 20, 2025 at 09:19:02AM -0700, Andi Kleen wrote: The inlining was just one of the issue, there are some related to different semantics of escaped locals. gcc always errors out while LLVM declares it undefined. But maybe we can fix that one to

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-20 Thread Andi Kleen
On Thu, Mar 20, 2025 at 06:25:26PM +0100, Jakub Jelinek wrote: > On Thu, Mar 20, 2025 at 10:01:02AM -0700, Andi Kleen wrote: > > So it could be as simple as that patch? It solves your test case at least > > for x86. > > Not sure I like this, but if others (e.g. Richi, Joseph, Jason) are ok with >

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-20 Thread Jakub Jelinek
On Thu, Mar 20, 2025 at 10:01:02AM -0700, Andi Kleen wrote: > So it could be as simple as that patch? It solves your test case at least > for x86. Not sure I like this, but if others (e.g. Richi, Joseph, Jason) are ok with it I can live with it. But we'd need a good documentation, ideally some s

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-20 Thread Andi Kleen
On Thu, Mar 20, 2025 at 05:28:48PM +0100, Jakub Jelinek wrote: > On Thu, Mar 20, 2025 at 09:19:02AM -0700, Andi Kleen wrote: > > The inlining was just one of the issue, there are some related to > > different semantics of escaped locals. gcc always errors out while > > LLVM declares it undefined. >

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-20 Thread Andi Kleen
On Thu, Mar 20, 2025 at 11:45:33AM -0400, Jason Merrill wrote: > On 3/19/25 9:31 PM, Andi Kleen wrote: > > From: Andi Kleen > > > > There are multiple reports (see PR 119376) now where semantic differences > > in the gcc musttail implementation break existing programs written for the > > clang >

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-20 Thread Jason Merrill
On 3/19/25 9:31 PM, Andi Kleen wrote: From: Andi Kleen 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 rele

[PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-19 Thread Andi Kleen
From: Andi Kleen 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::mus