Re: [PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-04-15 Thread Alexandre Oliva
On Apr 15, 2025, Peter Bergner wrote: > On 4/14/25 11:35 PM, Alexandre Oliva wrote: >>> That said, that should be done in a separate patch. >> >> *nod*. Do you mean you're going to make that change, that I should, or >> that you hope someone else will? I'd rather avoid duplication, and this >>

RE: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS [PR119351]

2025-04-15 Thread Richard Biener
On Tue, 15 Apr 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Sandiford > > Sent: Tuesday, April 15, 2025 10:52 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; rguent...@suse.de > > Subject: Re: [PATCH]middle-end: Fix incorrect codegen with PFA and

Re: [PATCH] tailc: Fix up musttail calls vs. -fsanitize=thread [PR119801]

2025-04-15 Thread Richard Biener
On Tue, 15 Apr 2025, Jakub Jelinek wrote: > Hi! > > Calls with musttail attribute don't really work with -fsanitize=thread in > GCC. The problem is that TSan instrumentation adds > __tsan_func_entry (__builtin_return_address (0)); > calls at the start of each instrumented function and > __ts

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Richard Biener
On Tue, 15 Apr 2025, Jakub Jelinek wrote: > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: > > This patch just introduces a form of dumping of widest ints that only > > have zeros in the lowest 128 bits so that instead of printing > > thousands of f's the output looks like: > > >

RE: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS [PR119351]

2025-04-15 Thread Richard Biener
On Tue, 15 Apr 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, April 15, 2025 12:50 PM > > To: Tamar Christina > > Cc: Richard Sandiford ; gcc-patches@gcc.gnu.org; > > nd > > Subject: RE: [PATCH]middle-end: Fix incorrect codegen with PFA a

Re: [PATCH] AArch64: Fix operands order in vec_extract expander

2025-04-15 Thread Tejas Belagod
On 4/14/25 7:44 PM, Kyrylo Tkachov wrote: Hi Tejas, On 14 Apr 2025, at 16:04, Tejas Belagod wrote: The operand order to gen_vcond_mask call in the vec_extract pattern is wrong. Fix the order where predicate is operand 3. Tested and bootstrapped on aarch64-linux-gnu. OK for trunk? gcc/Change

Re: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS [PR119351]

2025-04-15 Thread Richard Biener
On Tue, 15 Apr 2025, Tamar Christina wrote: > Hi All, > > The following example: > > #define N 512 > #define START 2 > #define END 505 > > int x[N] __attribute__((aligned(32))); > > int __attribute__((noipa)) > foo (void) > { > for (signed int i = START; i < END; ++i) > { > if (x[i

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Martin Jambor
Hi, On Tue, Apr 15 2025, Jakub Jelinek wrote: > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: >> This patch just introduces a form of dumping of widest ints that only >> have zeros in the lowest 128 bits so that instead of printing >> thousands of f's the output looks like: >> >>

Re: [PATCH v5 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-15 Thread Ard Biesheuvel
On Tue, 15 Apr 2025 at 09:48, Uros Bizjak wrote: > > On Thu, Apr 10, 2025 at 2:27 PM Ard Biesheuvel wrote: > > > > From: Ard Biesheuvel > > > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > > __fentry__") updated the logic that emits mcount() / __fentry__() calls > > in

Re: [PATCH] c++: prev declared hidden tmpl friend inst, cont [PR119807]

2025-04-15 Thread Jason Merrill
On 4/14/25 5:22 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and later 14? OK. -- >8 -- When remapping existing specializations of a hidden template friend from a previous declaration to the new definition, we must remap only those s

Re: [PATCH v2 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-15 Thread Tomasz Kaminski
On Tue, Apr 15, 2025 at 2:35 PM Luc Grosheintz wrote: > Thank you! I left two comments. Everything not commented on, I'll just > incorporate into the next iteration. > On 4/15/25 11:18 AM, Tomasz Kaminski wrote: > > > > On Tue, Apr 15, 2025 at 10:43 AM Luc Grosheintz > wrote: > >> This implement

Re: [PATCH] x86: Update gcc.target/i386/apx-interrupt-1.c

2025-04-15 Thread H.J. Lu
On Tue, Apr 15, 2025 at 12:45 AM Uros Bizjak wrote: > > On Tue, Apr 15, 2025 at 1:06 AM H.J. Lu wrote: > > > > ix86_add_cfa_restore_note omits the REG_CFA_RESTORE REG note for registers > > pushed in red-zone. Since > > > > commit 0a074b8c7e79f9d9359d044f1499b0a9ce9d2801 > > Author: H.J. Lu > >

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Jakub Jelinek
On Tue, Apr 15, 2025 at 01:56:25PM +0200, Richard Biener wrote: > On Tue, 15 Apr 2025, Jakub Jelinek wrote: > > > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: > > > This patch just introduces a form of dumping of widest ints that only > > > have zeros in the lowest 128 bits so th

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Richard Biener
On Tue, 15 Apr 2025, Jakub Jelinek wrote: > On Tue, Apr 15, 2025 at 01:56:25PM +0200, Richard Biener wrote: > > On Tue, 15 Apr 2025, Jakub Jelinek wrote: > > > > > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: > > > > This patch just introduces a form of dumping of widest ints th

Re: [PATCH v2 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-15 Thread Luc Grosheintz
Thank you! I left two comments. Everything not commented on, I'll just incorporate into the next iteration. On 4/15/25 11:18 AM, Tomasz Kaminski wrote: On Tue, Apr 15, 2025 at 10:43 AM Luc Grosheintz wrote: This implements std::extents from according to N4950 and contains partial

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Jakub Jelinek
On Tue, Apr 15, 2025 at 02:33:23PM +0200, Richard Biener wrote: > ISTR at least CCP _prints_ wide_int (or it's tree form), not widest_int > (but the lattice has widest_int indeed). But CCP knows the precision > of the lattice entry (which is for an SSA name), possibly IPA CP > doesn't. ipcp_bits_

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Jakub Jelinek
On Tue, Apr 15, 2025 at 02:17:46PM +0200, Martin Jambor wrote: > Hi, > > On Tue, Apr 15 2025, Jakub Jelinek wrote: > > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: > >> This patch just introduces a form of dumping of widest ints that only > >> have zeros in the lowest 128 bits so

Re: [PATCH] Wbuiltin-declaration-mismatch-4.c: accept long long in warning for llp64

2025-04-15 Thread Jonathan Yong
On 4/13/25 2:46 AM, Jonathan Yong wrote: Attached patch OK for master branch? Will push soon if there are no objections. Pushed to master branch.

Re: [PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-04-15 Thread Peter Bergner
On 4/14/25 11:35 PM, Alexandre Oliva wrote: >> That said, that should be done in a separate patch. > > *nod*. Do you mean you're going to make that change, that I should, or > that you hope someone else will? I'd rather avoid duplication, and this > is likely a somewhat involved change, since th

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-15 Thread Michael Matz
Hello, On Mon, 14 Apr 2025, Bill Wendling wrote: > Now, I don't think this will be necessarily confusing to the > programmer, but it's inconsistent. In other words, either 'counted_by' > *must* forward declare the in-structure identifier or neither must. If that's your concern then both should r

[PATCH] ipa-bit-cp: Fix adjusting value according to mask (PR119803)

2025-04-15 Thread Martin Jambor
Hi, In my fix for PR 119318 I put mask calculation in ipcp_bits_lattice::meet_with_1 above a final fix to value so that all the bits in the value which are meaningless according to mask have value zero, which has tripped a validator in PR 119803. This patch fixes that by moving the adjustment dow

[committed] d: Fix ICE in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676 [PR119817]

2025-04-15 Thread Iain Buclaw
Hi, This patch fixes the ICE in PR119817. The ImportVisitor method for handling the importing of overload sets was pushing NULL_TREE to the array of import decls, which in turn got passed to `debug_hooks->imported_module_or_decl', triggering the observed internal compiler error. NULL_TREE is ret

[committed] d: Fix internal compiler error: in visit, at d/decl.cc:838 [PR119799]

2025-04-15 Thread Iain Buclaw
Hi, This patch fixes the ICE in PR119799. This was caused by a check in the D front-end disallowing static VAR_DECLs with a size `0'. While empty structs in D are given the size `1', the same symbol coming from ImportC modules do infact have no size, so allow C variables to pass the check as wel

Re: [PATCH] ipa-bit-cp: Fix adjusting value according to mask (PR119803)

2025-04-15 Thread Jakub Jelinek
On Tue, Apr 15, 2025 at 03:14:49PM +0200, Martin Jambor wrote: > In my fix for PR 119318 I put mask calculation in > ipcp_bits_lattice::meet_with_1 above a final fix to value so that all > the bits in the value which are meaningless according to mask have > value zero, which has tripped a validator

Re: [PATCH] c++: Prune lambda captures from more places [PR119755]

2025-04-15 Thread Nathaniel Shead
On Tue, Apr 15, 2025 at 11:39:21PM +1000, Nathaniel Shead wrote: > On Tue, Apr 15, 2025 at 09:16:46AM -0400, Jason Merrill wrote: > > On 4/15/25 2:56 AM, Nathaniel Shead wrote: > > > On Mon, Apr 14, 2025 at 05:33:05PM -0400, Jason Merrill wrote: > > > > On 4/13/25 6:32 AM, Nathaniel Shead wrote: >

Re: [PATCH] wwwdocs: Document changes to the D front-end

2025-04-15 Thread Iain Buclaw
Ping. If no obvious grammar errors are flagged, I'll likely just commit this later today. Thanks, Iain. Excerpts from Iain Buclaw's message of März 20, 2025 12:25 pm: > Hi, > > This patch adds D front-end section to the GCC changes pages. When > inspecting this, I noticed that the previous two

Re: [PATCH] ipa-cp: Fix up ipcp_print_widest_int

2025-04-15 Thread Martin Jambor
Hi, On Tue, Apr 15 2025, Jakub Jelinek wrote: > On Tue, Apr 15, 2025 at 02:17:46PM +0200, Martin Jambor wrote: >> Hi, >> >> On Tue, Apr 15 2025, Jakub Jelinek wrote: >> > On Mon, Mar 31, 2025 at 03:34:07PM +0200, Martin Jambor wrote: >> >> This patch just introduces a form of dumping of widest in

Re: [PATCH v2] libstdc++: Implement formatter for ranges and range_formatter [PR109162]

2025-04-15 Thread Jonathan Wakely
On 15/04/25 15:05 +0100, Jonathan Wakely wrote: A few spelling and grammar fixes, and whitespace tweaks, but the only significant thing is to qualify some calls to prevent ADL ... Doh, as pointed out in chat the ADL thing is irrelevant because that's not std::format. So I think everything else

RE: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS [PR119351]

2025-04-15 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, April 15, 2025 12:49 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: Re: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS > [PR119351] > > On Tue, 15 Apr 2025, Tamar Christina wrote: > > > Hi Al

Re: [PATCH] [testsuite] [ppc] disable -mpowerpc64 for various ilp32 asm-out checks

2025-04-15 Thread Peter Bergner
On 4/15/25 12:01 AM, Alexandre Oliva wrote: > On Apr 14, 2025, Peter Bergner wrote: > >> But -mcpu= should not enable -mpowerpc64 by default for -m32 compiles. > > Oh, is that so? It seems to have been the case for quite a long time. > I can trivially see that GCC 9 already did that, but it may

Re: [PATCH] libgcobol: mark riscv64-*-linux* as supported target

2025-04-15 Thread Jeff Law
On 4/15/25 7:57 AM, Andreas Schwab wrote: * configure.tgt: Set LIBGCOBOL_SUPPORTED for riscv64-*-linux* with 64-bit multilib. Can't say I'm happy with the amount of Cobol related churn at this phase in our cycle. But this should be exceedingly safe. So OK. jeff

[PATCH] ref-temp1.C: Enable some tests for PE targets

2025-04-15 Thread Jonathan Yong
Attached patch OK for master branch? Will push soon if there are no objections. From b329d899d07cda78bc44d88f81bdf10d5e2db302 Mon Sep 17 00:00:00 2001 From: Jonathan Yong <10wa...@gmail.com> Date: Tue, 15 Apr 2025 11:41:36 + Subject: [PATCH] ref-temp1.C: Enable some tests for PE targets Test

Re: [PATCH] c++: Prune lambda captures from more places [PR119755]

2025-04-15 Thread Jason Merrill
On 4/15/25 9:39 AM, Nathaniel Shead wrote: On Tue, Apr 15, 2025 at 09:16:46AM -0400, Jason Merrill wrote: On 4/15/25 2:56 AM, Nathaniel Shead wrote: On Mon, Apr 14, 2025 at 05:33:05PM -0400, Jason Merrill wrote: On 4/13/25 6:32 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-p

[PATCH v3] libstdc++: Implement formatter for ranges and range_formatter [PR109162]

2025-04-15 Thread Tomasz Kamiński
This patch implements formatter specialization for input_ranges and range_formatter class from P2286R8, as adjusted by P2585R1. The formatter for pair/tuple is not yet provided, making maps not formattable. This introduces an new _M_format_range member to internal __formatter_str, that formats ran

Re: [PATCH v2] RISC-V: vsetvl: elide abnormal edges from LCM computations [PR119533]

2025-04-15 Thread Jeff Law
On 4/9/25 2:53 PM, Vineet Gupta wrote: Changes since v2 - Elide abnormal edges before LCM not after LCM --- vsetvl phase4 uses LCM guided info to insert VSETVL insns, including a straggler loop for "mising vsetvls" on certain edges. Currently it asserts on encountering EDGE_ABNORMAL. When

[PATCH] bitintlower: Fix interaction of gimple_assign_copy_p stmts vs. has_single_use [PR119808]

2025-04-15 Thread Jakub Jelinek
Hi! The following testcase is miscompiled, because we emit a CLOBBER in a place where it shouldn't be emitted. Before lowering we have: b_5 = 0; b.0_6 = b_5; b.1_1 = (unsigned _BitInt(129)) b.0_6; ... = b_5; The bitint coalescing assigns the same partition/underlying variable for both b_5

Re: [PATCH] [testsuite] [ppc] compile [PR112822] with -mvsx

2025-04-15 Thread Alexandre Oliva
On Apr 15, 2025, Peter Bergner wrote: > On 4/14/25 11:30 PM, Alexandre Oliva wrote: >> On Apr 14, 2025, Peter Bergner wrote: >> >>> This is an architecture independent test case, so I'm surprised this >>> doesn't FAIL on non-powerpc targets since they don't know anything >>> about altivec. >>

[committed] testsuite: Add testcase for already fixed PR [PR116093]

2025-04-15 Thread Jakub Jelinek
Hi! This testcase got fixed with r15-9397 PR119722 fix. Tested on x86_64-linux -m32/-m64 with vanilla trunk as well as with r15-9397 fix reverted (where it FAILs), committed to trunk as obvious. 2025-04-16 Jakub Jelinek PR tree-optimization/116093 * gcc.dg/bitint-122.c: New t

Re: [PATCH] [testsuite] [ppc] disable -mpowerpc64 for various ilp32 asm-out checks

2025-04-15 Thread Alexandre Oliva
On Apr 15, 2025, Peter Bergner wrote: > On 4/15/25 9:36 AM, Peter Bergner wrote: >> So what ABI does powerpc-elf use and what does it mandate? That's not for me to decide, but to me the patch that introduced OS_MISSING_POWERPC64 and the PR106680 coversation suggests that enabling -mpowerpc64 wit

Re:[committed] [PATCH] AArch64: Fix operands order in vec_extract expander

2025-04-15 Thread Tejas Belagod
On 4/15/25 1:56 PM, Richard Sandiford wrote: Tejas Belagod writes: The operand order to gen_vcond_mask call in the vec_extract pattern is wrong. Fix the order where predicate is operand 3. Tested and bootstrapped on aarch64-linux-gnu. OK for trunk? gcc/ChangeLog * config/aarch64/aarc

Re: [PATCH] [testsuite] [ppc] pr87600, pr89313: test for __PPC__ as well

2025-04-15 Thread Alexandre Oliva
On Apr 14, 2025, Peter Bergner wrote: > On 4/11/25 1:03 PM, Alexandre Oliva wrote: >> gcc.dg/pr87600.h and gcc.dg/pr89313.c test for __powerpc__ and >> __POWERPC__ to choose ppc register names, but ppc-elf defines neither; >> it defines __PPC__, so test for that as well. > Is there a reason why

Re: [PATCH] [testsuite] [ppc] compile [PR112822] with -mvsx

2025-04-15 Thread Alexandre Oliva
On Apr 14, 2025, Peter Bergner wrote: > diff --git a/gcc/testsuite/g++.dg/pr112822.C b/gcc/testsuite/g++.dg/pr112822.C > -typedef __attribute__((altivec(vector__))) double co; > +typedef double co __attribute__ ((vector_size (16))); FWIW, I've tested this change on gcc-14 powerpc-elf and I confi

Re: [PATCH v2] riscv: Fix incorrect gnu property alignment on rv32

2025-04-15 Thread Kito Cheng
Thanks, committed to trunk :) On Fri, Apr 11, 2025 at 12:27 PM Jesse Huang wrote: > > Codegen is incorrectly emitting a ".p2align 3" that coerces the > alignment of the .note.gnu.property section from 4 to 8 on rv32. > > 2025-04-11 Jesse Huang > > gcc/ChangeLog > > * config/riscv/riscv

Re: [PATCH] RISC-V: Put jump table in text for large code model

2025-04-15 Thread Kito Cheng
committed :) On Mon, Apr 14, 2025 at 6:01 PM Kito Cheng wrote: > > This patch will be committed this week if CI passes and not strong > objections since it's bug to large code model, also change is small > > On Mon, Apr 14, 2025 at 6:00 PM Kito Cheng wrote: > > > > Large code model assume the da

Re: [PATCH STAGE 4] aarch64: Disable sysreg feature gating

2025-04-15 Thread Richard Sandiford
Alice Carlotti writes: > This applies to the sysreg read/write intrinsics __arm_[wr]sr*. It does > not depend on changes to Binutils, because GCC converts recognised > sysreg names to an encoding based form, which is already ungated in Binutils. > > We have, however, agreed to make an equivalent

[PATCH v2] c: Fully fold each parameter for call to .ACCESS_WITH_SIZE [PR119717]

2025-04-15 Thread Qing Zhao
This is the 2nd version of the patch, the change is to replace "FALSE" with "false" per Marek's comments. C_MAYBE_CONST_EXPR is a C FE operator that will be removed by c_fully_fold. In c_fully_fold, it assumes that operands of function calls have already been folded. However, when we build call to

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-15 Thread Martin Uecker
Am Dienstag, dem 15.04.2025 um 14:50 +0200 schrieb Michael Matz: > Hello, ... > > struct A { > > int *buf __counted_by(len); // 'len' *must* be in the struct. > > int len; > > }; > > ... means that we would have to implement general delayed parsing for > expressions in C parsers. I have to

Re: [PATCH] [PR119765] testsuite: adjust amd64-abi-9.c to check both ms and sysv ABIs

2025-04-15 Thread NightStrike
On Tue, Apr 15, 2025 at 5:02 AM LIU Hao wrote: > > 在 2025-4-14 04:10, Peter Damianov 写道: > > diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-9.c > > b/gcc/testsuite/gcc.target/i386/amd64-abi-9.c > > index 9b2cd7e7b49..827215be3e2 100644 > > --- a/gcc/testsuite/gcc.target/i386/amd64-abi-9.c >

[PATCH][GCC14] Extend check-function-bodies to allow label and directives

2025-04-15 Thread H.J. Lu
Hi, I'd like to backport this testsuite enhancement to GCC 14 so that https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680896.html can be backported to GCC 14 with testcases unchanged. H.J. --- As PR target/116174 shown, we may need to verify labels and the directive order. Extend check-f

Re: [PATCH 2/4] cfgloopmanip: Add infrastructure for scaling of multi-exit loops [PR117790]

2025-04-15 Thread Jan Hubicka
> Hi, > > gcc/ChangeLog: > > > > PR tree-optimization/117790 > > * cfgloopmanip.cc (can_flow_scale_loop_freqs_p): New. > > (flow_scale_loop_freqs): New. > > (scale_loop_freqs_with_exit_counts): New. > > (scale_loop_freqs_hold_exit_counts): New. > > (scale_loop_profile): Ref

Re: [PATCH 2/4] cfgloopmanip: Add infrastructure for scaling of multi-exit loops [PR117790]

2025-04-15 Thread Jan Hubicka
Hi, > gcc/ChangeLog: > > PR tree-optimization/117790 > * cfgloopmanip.cc (can_flow_scale_loop_freqs_p): New. > (flow_scale_loop_freqs): New. > (scale_loop_freqs_with_exit_counts): New. > (scale_loop_freqs_hold_exit_counts): New. > (scale_loop_profile): Refactor

Re: [PATCH 2/4] cfgloopmanip: Add infrastructure for scaling of multi-exit loops [PR117790]

2025-04-15 Thread Jan Hubicka
Hi, > gcc/ChangeLog: > > PR tree-optimization/117790 > * tree-vect-loop.cc (scale_profile_for_vect_loop): Use > scale_loop_profile_hold_exit_counts instead of scale_loop_profile. Drop > the exit edge parameter, since the code now handles multiple exits. > Adjust the

[PATCH] ipa-prop: Extend the tailc IPA-VRP hack to LTO [PR119614]

2025-04-15 Thread Jakub Jelinek
Hi! Here is my attempt at the PR119614 LTO fix. Of course, if Martin can come up with something cleaner, let's go with that instead. This patch just remembers when ipa_record_return_value_range was set to a singleton range with CONSTANT_CLASS_P value and propagates that value through LTO to ltran

Re: COBOL: Is anything stalled because of me?

2025-04-15 Thread Jakub Jelinek
On Tue, Apr 15, 2025 at 10:47:13AM -0500, Robert Dubner wrote: > Speaking purely casually: I thought that that COBOL would be released with > documented limited capability. "Yeah, it works on x86_64-linux and > aarch64-linux. More to come.". We knew that we didn't know how to > cross-compile

[pushed] c++: constexpr, trivial, and non-alias target [PR111075]

2025-04-15 Thread Jason Merrill
Tested the testcase fix with a Darwin cross-compiler. Regression tested x86_64-pc-linux-gnu. Applying to trunk. -- 8< -- On Darwin and other targets with !can_alias_cdtor, we instead go to maybe_thunk_ctor, which builds a thunk function that calls the general constructor. And then cp_fold tries

Re: [PATCH] x86: Update gcc.target/i386/apx-interrupt-1.c

2025-04-15 Thread Uros Bizjak
On Tue, Apr 15, 2025 at 2:23 PM H.J. Lu wrote: > > On Tue, Apr 15, 2025 at 12:45 AM Uros Bizjak wrote: > > > > On Tue, Apr 15, 2025 at 1:06 AM H.J. Lu wrote: > > > > > > ix86_add_cfa_restore_note omits the REG_CFA_RESTORE REG note for registers > > > pushed in red-zone. Since > > > > > > commit

[COMMITTED] Docs: Address -fivopts, -O0, and -Q confusion [PR71094]

2025-04-15 Thread Sandra Loosemore
There's a blurb at the top of the "Optimize Options" node telling people that most optimization options are completely disabled at -O0 and a similar blurb in the entry for -Og, but nothing at the entry for -O0. Since this is a continuing point of confusion it seems wise to duplicate the informatio

[PATCH STAGE 4] aarch64: Disable sysreg feature gating

2025-04-15 Thread Alice Carlotti
This applies to the sysreg read/write intrinsics __arm_[wr]sr*. It does not depend on changes to Binutils, because GCC converts recognised sysreg names to an encoding based form, which is already ungated in Binutils. We have, however, agreed to make an equivalent change in Binutils (which would t

[pushed] configure, Darwin: Recognise new naming for Xcode ld.

2025-04-15 Thread Iain Sandoe
Tested on i686, x86_64 and aarch64 Darwin, plus x86_64, aarch64 and powerpc64le Linux, pushed to trunk, thanks Iain --- 8 --- The latest editions of XCode have altered the identify reported by 'ld -v' (again). This means that GCC configure no longer detects the version. Fixed by adding the new

[PATCH] Fortran: pure subroutine with pure procedure as dummy [PR106948]

2025-04-15 Thread Harald Anlauf
Dear all, the testcase in the PR shows a case where the pureness of a function is not properly determined, even though the function is resolved, and its attributes clearly show that it is pure, because gfc_pure_function relies on isym or esym being set. This does not happen here, probably becaus

Re: [GCC16,RFC,V2 05/14] aarch64: add new definition for post-index stg

2025-04-15 Thread Richard Sandiford
Indu Bhagat writes: > Using post-index stg is a faster way of memory tagging/untagging. > > TBD: > - Currently generated by in the aarch64 backend. Not sure if this > is the right way to do it. > - Also not clear how to weave in the generation of stzg. Similarly to patch 4, I think we sh

RE: COBOL: Is anything stalled because of me?

2025-04-15 Thread Robert Dubner
> -Original Message- > From: Jakub Jelinek > Sent: Tuesday, April 15, 2025 13:54 > To: Robert Dubner > Cc: 'Jeff Law' ; gcc-patches@gcc.gnu.org; 'James K. > Lowden' > Subject: Re: COBOL: Is anything stalled because of me? > > On Tue, Apr 15, 2025 at 10:47:13AM -0500, Robert Dubner wr

Re: [GCC16,RFC,V2 04/14] aarch64: add new definition for post-index st2g

2025-04-15 Thread Richard Sandiford
Indu Bhagat writes: > Using post-index st2g is a faster way of memory tagging/untagging. > Because a post-index 'st2g tag, [addr], #32' is equivalent to: >stg tag, addr, #0 >stg tag, addr, #16 >add addr, addr, #32 > > TBD: > - Currently generated by in the aarch64 backend. Not sure

Re: [PATCH] c++: Properly mangle CONST_DECL without a INTEGER_CST value [PR116511]

2025-04-15 Thread Simon Martin
Hi Jason, On Thu Apr 10, 2025 at 10:42 PM CEST, Jason Merrill wrote: > On 9/6/24 7:15 AM, Simon Martin wrote: >> We ICE upon the following *valid* code when mangling the requires >> clause >> >> === cut here === >> template struct s1 { >>enum { e1 = 1 }; >> }; >> template struct s2 { >>

Re: [PATCH v2] c: Fully fold each parameter for call to .ACCESS_WITH_SIZE [PR119717]

2025-04-15 Thread Marek Polacek
On Tue, Apr 15, 2025 at 06:46:26PM +, Qing Zhao wrote: > This is the 2nd version of the patch, the change is to replace "FALSE" with > "false" per Marek's comments. > > C_MAYBE_CONST_EXPR is a C FE operator that will be removed by c_fully_fold. > In c_fully_fold, it assumes that operands of fu

Re: [PATCH] OpenMP: omp.h omp::allocator C++ Allocator interface

2025-04-15 Thread Tobias Burnus
Alex wrote: Tested on x86_64-pc-linux-gnu, this is only a library addition (and a few tests) so it shouldn't cause any major impacts. I also tested libgomp C to ensure the conditional compile was working. Namely, the change is only to omp.h(.in) - effective for __cplusplus >= 201103L. Note th

Re: [PATCH] discriminators: Fix assigning discriminators on edge [PR113546]

2025-04-15 Thread Andrew Pinski
On Sun, Mar 16, 2025 at 11:43 AM Jeff Law wrote: > > > > On 3/15/25 9:01 PM, Andrew Pinski wrote: > > The problem here is there was a compare debug since the discriminators > > would still take into account debug statements. For the edge we would look > > at the first statement after the labels an

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-15 Thread Kees Cook
On Tue, Apr 15, 2025 at 09:07:44PM +0200, Martin Uecker wrote: > Am Dienstag, dem 15.04.2025 um 14:50 +0200 schrieb Michael Matz: > > Hello, > ... > > > > struct A { > > > int *buf __counted_by(len); // 'len' *must* be in the struct. > > > int len; > > > }; > > > > ... means that we would hav

Re: [PATCH v2] c: Fully fold each parameter for call to .ACCESS_WITH_SIZE [PR119717]

2025-04-15 Thread Qing Zhao
Thanks. Pushed to trunk. Qing > On Apr 15, 2025, at 14:56, Marek Polacek wrote: > > On Tue, Apr 15, 2025 at 06:46:26PM +, Qing Zhao wrote: >> This is the 2nd version of the patch, the change is to replace "FALSE" with >> "false" per Marek's comments. >> >> C_MAYBE_CONST_EXPR is a C FE ope

[PATCH v2 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-15 Thread Luc Grosheintz
This implements std::extents from according to N4950 and contains partial progress towards PR107761. If an extent changes its type, there's a precondition in the standard, that the value is representable in the target integer type. This commit uses direct initialization to perform the conversion,

Re: [PATCH] [PR119765] testsuite: adjust amd64-abi-9.c to check both ms and sysv ABIs

2025-04-15 Thread LIU Hao
在 2025-4-14 04:10, Peter Damianov 写道: diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-9.c b/gcc/testsuite/gcc.target/i386/amd64-abi-9.c index 9b2cd7e7b49..827215be3e2 100644 --- a/gcc/testsuite/gcc.target/i386/amd64-abi-9.c +++ b/gcc/testsuite/gcc.target/i386/amd64-abi-9.c @@ -1,18 +1,46 @@

Re: [PATCH] c++: Prune lambda captures from more places [PR119755]

2025-04-15 Thread Jason Merrill
On 4/15/25 2:56 AM, Nathaniel Shead wrote: On Mon, Apr 14, 2025 at 05:33:05PM -0400, Jason Merrill wrote: On 4/13/25 6:32 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Currently, pruned lambda captures are still leftover in the function's

[PATCH v4 18/20] Fix FMV return type ambiguation

2025-04-15 Thread Alfie Richards
Add logic for the case of two FMV annotated functions with identical signature other than the return type. Previously this was ignored, this changes the behavior to emit a diagnostic. gcc/cp/ChangeLog: PR c++/119498 * decl.cc (duplicate_decls): Change logic to not always exclude F

[committed] libstdc++: Do not define __cpp_lib_ranges_iota in

2025-04-15 Thread Jonathan Wakely
In r14-7153-gadbc46942aee75 we removed a duplicate definition of __glibcxx_want_range_iota from , but __cpp_lib_ranges_iota should be defined in at all. libstdc++-v3/ChangeLog: * include/std/ranges (__glibcxx_want_ranges_iota): Do not define. --- Tested x86_64-linux. Pushed to t

[committed] libstdc++: Do not declare namespace ranges in unconditionally

2025-04-15 Thread Jonathan Wakely
Move namespace ranges inside the feature test macro guard, because 'ranges' is not a reserved name before C++20. libstdc++-v3/ChangeLog: * include/std/numeric (ranges): Only declare namespace for C++23 and later. (ranges::iota_result): Fix indentation. * testsuite/

[PUSHED/14 6/6] testcase: Add testcase for already fixed PR [PR118476]

2025-04-15 Thread Andrew Pinski
This testcase was fixed by r15-3052-gc7b76a076cb2c6ded but is a testcase that failed in a different fashion and a much older failure than the one added with r15-3052. Pushed as obvious after a quick test. PR tree-optimization/118476 gcc/testsuite/ChangeLog: * gcc.dg/torture/pr11

Re: [PATCH v2] libstdc++: Implement formatter for ranges and range_formatter [PR109162]

2025-04-15 Thread Jonathan Wakely
A few spelling and grammar fixes, and whitespace tweaks, but the only significant thing is to qualify some calls to prevent ADL ... On 14/04/25 16:13 +0200, Tomasz Kamiński wrote: This patch implements formatter specialization for input_ranges and range_formatter class form P2286R8, as adjusted

Re: [PATCH] Locality cloning pass (was: Introduce -flto-partition=locality)

2025-04-15 Thread Kyrylo Tkachov
> On 15 Apr 2025, at 15:42, Richard Biener wrote: > > On Mon, Apr 14, 2025 at 3:11 PM Kyrylo Tkachov wrote: >> >> Hi Honza, >> >>> On 13 Apr 2025, at 23:19, Jan Hubicka wrote: >>> +@opindex fipa-reorder-for-locality +@item -fipa-reorder-for-locality +Group call chains close

COBOL: Is anything stalled because of me?

2025-04-15 Thread Robert Dubner
Speaking purely casually: I thought that that COBOL would be released with documented limited capability. "Yeah, it works on x86_64-linux and aarch64-linux. More to come.". We knew that we didn't know how to cross-compile, and we knew that other platforms would have to come, in time. It nev

Re: Mark const parameters passed by invisible reference as readonly in the function body

2025-04-15 Thread Jason Merrill
On 3/30/25 6:12 PM, Jan Hubicka wrote: Hi, I noticed that this patch got forgotten and I think it may be useful to solve this next stage 1. cp_apply_type_quals_to_decl drops 'const' if the type has mutable members. Unfortunately TREE_READONLY on the PARM_DECL isn't helpful in the case of an inv

Re: [PATCH] c: Fully fold each parameter for call to .ACCESS_WITH_SIZE [PR119717]

2025-04-15 Thread Marek Polacek
On Mon, Apr 14, 2025 at 08:28:55PM +, Qing Zhao wrote: > C_MAYBE_CONST_EXPR is a C FE operator that will be removed by c_fully_fold. > In c_fully_fold, it assumes that operands of function calls have already > been folded. However, when we build call to .ACCESS_WITH_SIZE, all its > operands are

[PATCH] x86: Update gcc.target/i386/apx-interrupt-1.c

2025-04-15 Thread H.J. Lu
ix86_add_cfa_restore_note omits the REG_CFA_RESTORE REG note for registers pushed in red-zone. Since commit 0a074b8c7e79f9d9359d044f1499b0a9ce9d2801 Author: H.J. Lu Date: Sun Apr 13 12:20:42 2025 -0700 APX: Don't use red-zone with 32 GPRs and no caller-saved registers disabled red-zone,

[PATCH v4] libstdc++: Implement formatter for ranges and range_formatter [PR109162]

2025-04-15 Thread Tomasz Kamiński
This patch implements formatter specialization for input_ranges and range_formatter class from P2286R8, as adjusted by P2585R1. The formatter for pair/tuple is not yet provided, making maps not formattable. This introduces an new _M_format_range member to internal __formatter_str, that formats ran

RE: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS [PR119351]

2025-04-15 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, April 15, 2025 12:50 PM > To: Tamar Christina > Cc: Richard Sandiford ; gcc-patches@gcc.gnu.org; > nd > Subject: RE: [PATCH]middle-end: Fix incorrect codegen with PFA and VLS > [PR119351] > > On Tue, 15 Apr 2025, Tamar Christi

[PATCH v4 08/20] Add get_clone_versions and get_version functions.

2025-04-15 Thread Alfie Richards
This is a reimplementation of get_target_clone_attr_len, get_attr_str, and separate_attrs using string_slice and auto_vec to make memory management and use simpler. Adds get_target_version helper function to get the target_version string from a decl. gcc/c-family/ChangeLog: * c-attribs.c

Re: [PATCH v2] RISC-V: Do not lift up vsetvl into non-transparent blocks [PR119547].

2025-04-15 Thread Jeff Law
On 4/9/25 6:08 AM, Robin Dapp wrote: Hi, when lifting up a vsetvl into a block we currently don't consider the block's transparency with respect to the vsetvl as in other parts of the pass.  This patch does not perform the lift when transparency is not guaranteed. This condition is more rest

Re: [PATCH] c++: wrong targs printed in hard satisfaction error [PR99214]

2025-04-15 Thread Jason Merrill
On 4/13/25 1:56 PM, Patrick Palka wrote: Alternatively, rather than passing the most general template + args to push_tinst_level, we can pass the partially instantiated template + innermost args via just: gcc/cp/ChangeLog: * constraint.cc (satisfy_declaration_constraints): Pass the

Re: [PATCH] c: Fully fold each parameter for call to .ACCESS_WITH_SIZE [PR119717]

2025-04-15 Thread Qing Zhao
> On Apr 14, 2025, at 16:35, Marek Polacek wrote: > > On Mon, Apr 14, 2025 at 08:28:55PM +, Qing Zhao wrote: >> C_MAYBE_CONST_EXPR is a C FE operator that will be removed by c_fully_fold. >> In c_fully_fold, it assumes that operands of function calls have already >> been folded. However, wh

Re: [PATCH] MATCH: Fix patterns of type (a != b) and (a == b) [PR117760]

2025-04-15 Thread Jeff Law
On 4/15/25 12:24 AM, Eikansh Gupta wrote: The patterns can be simplified as shown below: (a != b) & ((a|b) != 0) -> (a != b) (a != b) | ((a|b) != 0) -> ((a|b) != 0) The similar simplification can be there for (a == b). This patch adds simplification for above patterns. The forwprop pass wa

Re: [GCC16,RFC,V2 02/14] aarch64: add new define_insn for subg

2025-04-15 Thread Richard Sandiford
Hi, Indu Bhagat writes: > subg (Subtract with Tag) is an Armv8.5-A memory tagging (MTE) > instruction. It can be used to subtract an immediate value scaled by > the tag granule from the address in the source register. > > gcc/ChangeLog: > > * config/aarch64/aarch64.md (subg): New definitio

[PATCH] OpenMP: omp.h omp::allocator C++ Allocator interface

2025-04-15 Thread Alex
Tested on x86_64-pc-linux-gnu, this is only a library addition (and a few tests) so it shouldn't cause any major impacts. I also tested libgomp C to ensure the conditional compile was working. Okay for trunk? From 1ef3fe0a1f026689e64963ec9ab0b04b7e6b1bde Mon Sep 17 00:00:00 2001 From: waffl3x Da

Regenerate common.opt.urls

2025-04-15 Thread Kyrylo Tkachov
Pushing as obvious. Thanks, Kyrill Signed-off-by: Kyrylo Tkachov * common.opt.urls: Regenerate. 0001-Regenerate-common.opt.urls.patch Description: 0001-Regenerate-common.opt.urls.patch

Re: [PATCH] x86: Update gcc.target/i386/apx-interrupt-1.c

2025-04-15 Thread Uros Bizjak
On Tue, Apr 15, 2025 at 1:06 AM H.J. Lu wrote: > > ix86_add_cfa_restore_note omits the REG_CFA_RESTORE REG note for registers > pushed in red-zone. Since > > commit 0a074b8c7e79f9d9359d044f1499b0a9ce9d2801 > Author: H.J. Lu > Date: Sun Apr 13 12:20:42 2025 -0700 > > APX: Don't use red-zone

Re: [PATCH v5 2/2] i386: Enable -mnop-mcount for -fpic with PLTs

2025-04-15 Thread Uros Bizjak
On Thu, Apr 10, 2025 at 2:26 PM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > -mnop-mcount can be trivially enabled for -fPIC codegen as long as PLTs > are being used, given that the instruction encodings are identical, only > the target may resolve differently depending on how the linker de

Re: [PATCH] combine: Correct comment about combine_validate_cost

2025-04-15 Thread Richard Sandiford
Hans-Peter Nilsson writes: > Noticed while investigating a regression for cris-elf with > r15-9239-g4d7a634f6d4102 "combine: Allow 2->2 combinations, > but with a tweak [PR116398]" (to-be-reported). > > The comment was introduced when breaking out the > combine_validate_cost function, in r0-59417-

Re: [PATCH v5 1/2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-15 Thread Uros Bizjak
On Thu, Apr 10, 2025 at 2:27 PM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > __fentry__") updated the logic that emits mcount() / __fentry__() calls > into function prologues when profiling is enabled, to avoid GOT-base

[committed v3] libstdc++: Fix std::string construction from volatile char* [PR119748]

2025-04-15 Thread Jonathan Wakely
My recent r15-9381-g648d5c26e25497 change assumes that a contiguous iterator with the correct value_type can be converted to a const charT* but that's not true for volatile charT*. The optimization should only be done if it can be converted to the right pointer type. Additionally, some generic loo

[PATCH v2 4/4] libstdc++: Add tests for std::extents.

2025-04-15 Thread Luc Grosheintz
A prior commit added std::extents, this commit adds the tests. The bulk is focussed on testing the constructors. These are split into three groups: 1. the ctor from other extents and the copy ctor, 2. the ctor from a pack of integer-like objects, 3. the ctor from shapes, i.e. span and array. For

[PATCH v2 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-15 Thread Luc Grosheintz
Uses the FTM infrastructure to create an internal feature testing macro for partial availability of mdspan; which is then used to hide the contents of the header mdspan when compiling against a standard prior to C++23. libstdc++-v3/ChangeLog: * include/bits/version.def: Add internal featu

[PATCH] tailc: Fix up musttail calls vs. -fsanitize=thread [PR119801]

2025-04-15 Thread Jakub Jelinek
Hi! Calls with musttail attribute don't really work with -fsanitize=thread in GCC. The problem is that TSan instrumentation adds __tsan_func_entry (__builtin_return_address (0)); calls at the start of each instrumented function and __tsan_func_exit (); call at the end of those and the latter

  1   2   >