[PATCH] gimple: fix strlen+more for references

2025-11-18 Thread Andrew Pinski
I found that the strlen pass ignores stores via references. This shows up with C++ code more than C. A simple: ``` int g(void) { std::string a="a"; return __builtin_strlen(a.c_str()); } ``` Should be optimized to just `return 1` but does not currently due to use of references. The problem in th

rs6000: Fix [su]mul_highpart patterns to use unspec [PR122665]

2025-11-18 Thread jeevitha
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. The existing smul3_highpart and umul3_highpart patterns incorrectly defined the high-part multiply by shifting both operands before multiplication. This does not match the semantics of the instructions vmulhs

[COMMITTED] rs6000: Do not reorder operands for vec_pack_to_short_fp32 based on endianness [PR119130]

2025-11-18 Thread Avinash Jayakar
Following patch has been committed to trunk Thanks, Avinash Jayakar The patterns for altivec_vpkuum take care of the order of operands for the vpkuwum instruction, and therefore it is not needed in the define_expand pattern "convert_4f32_8f16". 2025-11-18 Avinash Jayakar gcc/ChangeLog:

Re: [PATCH] rs6000: Do not reorder operands for vec_pack_to_short_fp32 based on endianness [PR119130]

2025-11-18 Thread Avinash Jayakar
On Tue, 2025-11-18 at 10:47 -0600, Segher Boessenkool wrote: > On Tue, Nov 18, 2025 at 04:00:35PM +0530, Avinash Jayakar wrote: > > Hi, > > > > This is a small patch to fix PR119130. Bootstrapped and regtested > > on both > > powerpc64 little and big endian targets. Ok for trunk? > > Okay for tru

[PING^4][RFC PATCH v4 0/3] Source filename tracking in GCOV

2025-11-18 Thread Dhruv Chawla
On 12/11/25 09:37, Dhruv Chawla wrote: External email: Use caution opening links or attachments On 05/11/25 09:22, Dhruv Chawla wrote: External email: Use caution opening links or attachments On 27/10/25 12:04, Dhruv Chawla wrote: External email: Use caution opening links or attachments O

[PING^2][PATCH v5] [aarch64] Make better use of overflowing operations in max/min(a, add/sub(a, b)) [PR116815]

2025-11-18 Thread Dhruv Chawla
On 12/11/25 09:50, Dhruv Chawla wrote: External email: Use caution opening links or attachments On 05/11/25 10:39, Dhruv Chawla wrote: External email: Use caution opening links or attachments On 28/10/25 22:03, Alex Coplan wrote: External email: Use caution opening links or attachments Hi

[PATCH]: pch, target: update host hooks for NetBSD (see also PR71934)

2025-11-18 Thread Kalvis Duckmanton
Hi! The PCH use_address hooks for NetBSD hosts have not yet been updated to allow compiled headers to be loaded at an address different from their preferred address. This change updates host-netbsd.cc:netbsd_gt_pch_use_address() thus: if a compiled header cannot be mapped at its preferred ad

Re: [PATCH] i386: Add AVX10.1, AVX10.2, APX_F and MOVRS to Nova Lake

2025-11-18 Thread Hongtao Liu
On Tue, Nov 18, 2025 at 3:08 PM Haochen Jiang wrote: > > Hi all, > > Nova Lake will enable AVX10.1, AVX10.2, APX_F and MOVRS according to the > latest documentation. > > Due to PTA_XXX would not maintain imply relationships, we need to add > all PTA_AVX512XXX which AVX10 enabled to enable AVX10.1

[PATCH v1] LoongArch: Modify the redundant instructions that use vector builtin functions as parameters.

2025-11-18 Thread chenxiaolong
By analyzing the test cases, it was found that during the combine traversal, due to the fact that the backend does not support the subreg operation of the E_V4SFmode to E_V8SFmode type, the calculated rtx_cost value is relatively large, and the combine operation cannot be performed. such as: (ins

[PATCH] libstdc++: store the length after the store of the null character

2025-11-18 Thread Andrew Pinski
This improves the code generation slightly for std::string because of aliasing. In many cases the length will be read again and the store of the null character will cause the length to be re-read due to aliasing requirements of the char type. So swapping around the stores will allow the length not

[PATCH] dce: Use FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT in simple_dce_from_worklist

2025-11-18 Thread Andrew Pinski
When I wrote this code I forgot about FOR_EACH_IMM_USE_FAST. Since this code does not change any of the uses inside of the loop using FOR_EACH_IMM_USE_FAST will be slightly faster. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-ssa-dce.cc (simple_dce_from_worklist):

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-18 Thread Qing Zhao
> On Nov 18, 2025, at 17:38, Joseph Myers wrote: > > On Tue, 18 Nov 2025, Qing Zhao wrote: > >> At the same time, shall we support the following with -fms-extensions: >> >> /* -fms-extensions */ >> >> struct ids >> { >> int length_ad; >> int length_na; >> }; >> >> struct person >> { >> i

[PATCH] c++: fix ICE when comparing targs [PR119580]

2025-11-18 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/15? -- >8 -- In r10-7816, cp_tree_equal/TEMPLATE_ID_EXPR was changed to use comp_template_args to compare the targs. This makes sense, but comp_template_args won't deal with an error_mark_node. We created a BASELINK for S::foo, but sinc

Re: PATCH] tree-optimization: Allow LICM to hoist loads in "self write" patterns

2025-11-18 Thread Kugan Vivekanandarajah
> On 18 Nov 2025, at 11:48 pm, Richard Biener > wrote: > > External email: Use caution opening links or attachments > > > On Mon, Nov 17, 2025 at 1:03 AM Kugan Vivekanandarajah > wrote: >> >> >> >>> On 23 Oct 2025, at 8:37 pm, Richard Biener >>> wrote: >>> >>> External email: Use caution ope

Re: [PATCH v3] aarch64: Add support for preserve_none function attribute [PR target/118328]

2025-11-18 Thread Iain Sandoe
Hi Alfie, > On 6 Nov 2025, at 15:06, Alfie Richards wrote: > Updated this patch to use r15 for argument passing (except on windows targets) > which I missed. This causes this testcase: https://github.com/iains/gcc-darwin-arm64/blob/master-wip-apple-si/gcc/testsuite/gcc.target/aarch64/darwin/d

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-18 Thread Joseph Myers
On Tue, 18 Nov 2025, Qing Zhao wrote: > At the same time, shall we support the following with -fms-extensions: > > /* -fms-extensions */ > > struct ids > { > int length_ad; > int length_na; > }; > > struct person > { > int age; > int weight; > struct ids;// Anonymous structure, no

Re: [PATCH v4 0/3] c: Add _Maxof & _Minof [n3628]

2025-11-18 Thread Alejandro Colomar
Hi Joseph, On Tue, Nov 18, 2025 at 10:00:24PM +, Joseph Myers wrote: > I think they should all be squashed. The tests should also be the tests > that make sense for a pure extension, which means not doing anything with > -Wc23-c2y-compat / -Wno-c23-c2y-compat; tests with those options only

[committed] libgomp.texi: Update MASTER/MASKED entry in the libgomp ABI section

2025-11-18 Thread Tobias Burnus
Stumbled over this when looking for MASTER and took the opportunity to update it. Committed as r16-5403-ga286685f63a56d. Tobias commit a286685f63a56d8cc22211cbefbb4680838c8226 Author: Tobias Burnus Date: Tue Nov 18 23:10:21 2025 +0100 libgomp.texi: Update MASTER/MASKED entry in the libgo

Re: [PATCH, V7] Add -mcpu=future to the PowerPC

2025-11-18 Thread Peter Bergner
On 11/10/25 1:49 PM, Segher Boessenkool wrote: > We should not have a "Future" thing that stands in for any future stuff. I don't know what you mean by this. > The thing we _now_ call "Future" we will rename (probably to POWER12, > but who knows!) soon enough. And then when we start doing stuf

Re: [pushed: r16-5362] diagnostics: fix socket includes for MinGW host [PR122666]

2025-11-18 Thread Evgeny Karpov
David Malcolm wrote: > Evgeny: I wrote a ChangeLog entry, and have pushed your patch. I took > the liberty of rewriting the subject line, and slightly rewording the > blurb; hope that's OK. Thanks Dave, it looks good. Regards, Evgeny

Re: [PATCH v4 0/3] c: Add _Maxof & _Minof [n3628]

2025-11-18 Thread Joseph Myers
On Tue, 18 Nov 2025, Alejandro Colomar wrote: > Hi Joseph, > > I've removed the diagnostics about bool. It now accepts bool just like > the n3628 proposal. At the bottom of this mail, you can find the > range-diff against v3. > > Please let me know if you want some or all of these patches squa

[PATCH v4 3/3] aarch64: mingw: Implement support for variadic ABI

2025-11-18 Thread Evgeny Karpov
Saurabh Jha wrote: > +/* Returns true if a function has variadic arguments. > + Only works for Windows ABI. */ > + > +static bool > +aarch64_ms_is_variadic_function_type (const_tree fntype) > +{ > + if (!TARGET_AARCH64_MS_ABI) > +return false; > + > + if (TYPE_NO_NAMED_ARGS_STDARG_P (fntyp

Re: [PATCH][_GLIBCXX_DEBUG] Fix std::erase_if implementation for std::vector

2025-11-18 Thread François Dumont
Ok, here is the new patch, only fixing the std::erase_if behavior for the _GLIBCXX_DEBUG. I'll check for the std::inplace_vector one, I remember that something made me implement it this way. I'll replied on the __gnu_debug::inplace_vector mail thread. Ok to commit ? François On 11/17/25 21

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-18 Thread Martin Uecker
Am Dienstag, dem 18.11.2025 um 20:10 + schrieb Qing Zhao: > > > On Nov 14, 2025, at 09:36, Qing Zhao wrote: > > > > > > > > > On Nov 14, 2025, at 01:50, Martin Uecker wrote: > > > > > > Am Donnerstag, dem 13.11.2025 um 20:41 + schrieb Qing Zhao: > > > > > > > > > On Nov 13, 2025, at

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-18 Thread Qing Zhao
> On Nov 14, 2025, at 09:36, Qing Zhao wrote: > > > >> On Nov 14, 2025, at 01:50, Martin Uecker wrote: >> >> Am Donnerstag, dem 13.11.2025 um 20:41 + schrieb Qing Zhao: >>> On Nov 13, 2025, at 14:17, Martin Uecker wrote: Am Donnerstag, dem 13.11.2025 um 15:44 + sch

Re: [PATCH] docs: aarch64: Minor grammar fix for preserve_none.

2025-11-18 Thread Sandra Loosemore
On 11/18/25 08:43, Alfie Richards wrote: diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index cd2d3475df3..935e7996bd8 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3975,11 +3975,11 @@ adds a @code{BTI J} instruction when BTI is enabled e.g. via Use this attribute to

[PATCH] tree-optimization/122722 - better SLP reduction group discovery

2025-11-18 Thread Richard Biener
The following improves the all-or-nothing discovery of reduction groups to consider sub-groups by trying toplevel "matches" candidates for this. For simplicity and to limit compile-time failed sub-group matches are not decomposed further, only the originally failed part is tried again to discover

Re: [PATCH] c++: fix ICE with consteval functions in template decls [PR122658]

2025-11-18 Thread Marek Polacek
On Tue, Nov 18, 2025 at 05:51:17PM +0100, Daniele Sahebi wrote: > Currently, build_over_call calls build_cplus_new in template decls, generating > a TARGET_EXPR that it then passes to fold_non_dependent_expr, which ends up > calling tsubst_expr, and since tsubst_expr doesn't handle TARGET_EXPRs, it

Re: [PATCH RFC] driver/c++: add --compile-std-module

2025-11-18 Thread Jakub Jelinek
On Tue, Nov 18, 2025 at 10:48:12PM +0530, Jason Merrill wrote: > From c7c1f32a477c42de3fd9308e90d09b6a617893df Mon Sep 17 00:00:00 2001 > From: Jason Merrill > Date: Tue, 11 Nov 2025 15:58:01 +0530 > Subject: [PATCH] driver/c++: add --compile-std-module > To: [email protected] > > For simpl

Re: [PATCH RFC] driver/c++: add --compile-std-module

2025-11-18 Thread Jason Merrill
On 11/17/25 4:55 PM, Jakub Jelinek wrote: On Mon, Nov 17, 2025 at 04:48:30PM +0530, Jason Merrill wrote: If this would be solely for GCC testsuite and nothing else, my preference would be to do this in DejaGNU with // { dg-compile-std-module But if the intent is also users compiling simple C++ s

Re: [PATCH v2 03/14] arm: doc: Update documentation on half-precision support

2025-11-18 Thread Christophe Lyon
On Tue, 18 Nov 2025 at 04:55, Sandra Loosemore wrote: > > On 11/7/25 01:30, Christophe Lyon wrote: > > Hi Sandra, > > > > How about this? > > > > Thanks, > > > > Christophe. > > > > > > The previous patch makes __fp16 always available on arm (using > > -mfp16-format is no longer needed), so the do

Re: [PATCH, OpenMP] uses_allocators support

2025-11-18 Thread Tobias Burnus
Hi Chung-Lin, some first throughts + remarks, no proper review yet, but I want to make sure that I don't loose those thoughts & remarks. Chung-Lin Tang wrote: This is a new updated patch for OpenMP uses_allocators support. First, as meanwhile libgomp/config/nvptx/allocator.c was touched, you

Re: [PATCH] c++: Handle absolute path for CMI output directory [PR122677]

2025-11-18 Thread Jonathan Wakely
On Tue, 18 Nov 2025 at 17:04, Jason Merrill wrote: > > On 11/18/25 7:07 PM, Jonathan Wakely wrote: > > When trying to create each directory component of an absolute path, the > > first call to mkdir uses a path of "" which gives an ENOENT error. This > > causes the create_dirs function to return w

Re: [PATCH] c++: Handle absolute path for CMI output directory [PR122677]

2025-11-18 Thread Jason Merrill
On 11/18/25 7:07 PM, Jonathan Wakely wrote: When trying to create each directory component of an absolute path, the first call to mkdir uses a path of "" which gives an ENOENT error. This causes the create_dirs function to return without creating anything. This commit skips past the leading slas

[PATCH] aarch64: Cache the PCS value for a function

2025-11-18 Thread Alfie Richards
Hi All, This fixes the compile time regression noted by Andrew Pinski. The compilation speed regression was caused by my patch requirig querying fndecl_abi signifficantly more than previously. This fixes this by caching the pcs in the machine_function struct. Regr tested and bootstrapped on aarc

[PATCH] c++: fix ICE with consteval functions in template decls [PR122658]

2025-11-18 Thread Daniele Sahebi
Currently, build_over_call calls build_cplus_new in template decls, generating a TARGET_EXPR that it then passes to fold_non_dependent_expr, which ends up calling tsubst_expr, and since tsubst_expr doesn't handle TARGET_EXPRs, it ICEs. Since there is no way for this code path to be executed withou

Re: [PATCH] Bug 32365 - Better error message for specification statement in executable section

2025-11-18 Thread Jerry D
On 11/18/25 12:03 AM, Paul Richard Thomas wrote: Hi Jerry, That's a golden oldie :-) The patch looks good to me - OK for mainline. Thanks! Paul Thanks Paul, committed. Also thanks to Chris. Jerry

Re: [PATCH] rs6000: Do not reorder operands for vec_pack_to_short_fp32 based on endianness [PR119130]

2025-11-18 Thread Segher Boessenkool
On Tue, Nov 18, 2025 at 04:00:35PM +0530, Avinash Jayakar wrote: > Hi, > > This is a small patch to fix PR119130. Bootstrapped and regtested on both > powerpc64 little and big endian targets. Ok for trunk? Okay for trunk. Thanks! Do you want backports? Segher > The patterns for altivec_vpku

Re: [PATCH] build: Define DISABLE_MULTILIB if --disable-multilib

2025-11-18 Thread Rainer Orth
Rainer Orth writes: > When building trunk on Solaris with --disable-multilib, I noticed that > the non-default multilib wasn't rejected any longer, leading to > unexpected link failures. I could trace this to DISABLE_MULTILIB no > longer being defined in multilib.h. The problem ist that > gcc/g

[PATCH] build: Define DISABLE_MULTILIB if --disable-multilib

2025-11-18 Thread Rainer Orth
When building trunk on Solaris with --disable-multilib, I noticed that the non-default multilib wasn't rejected any longer, leading to unexpected link failures. I could trace this to DISABLE_MULTILIB no longer being defined in multilib.h. The problem ist that gcc/genmultilib has been changed in

[committed] testsuite: Require target int32 for pr116815.c test

2025-11-18 Thread Uros Bizjak
gcc/testsuite/ChangeLog: * gcc.dg/pr116815.c: Require target int32. Tested on x86_64-linux-gnu {,-m32}. Uros. diff --git a/gcc/testsuite/gcc.dg/pr116815.c b/gcc/testsuite/gcc.dg/pr116815.c index b5f1330b335..7b0650fc19c 100644 --- a/gcc/testsuite/gcc.dg/pr116815.c +++ b/gcc/testsuite/gcc.dg/

Re: [PATCH v2 1/3]middle-end: support new {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Robin Dapp
> Usually the 'else' value applies to masked operations. For a > cond_vec_cbranch_any that would mean if any mask element is zero > then an else value of 1 makes the branch taken. For cond_vec_cbranch_all > an else value of 0 makes the branch not taken. So we cannot really > use what the target

Re: [PATCH v3 2/5] asf: Add cost function for store/load reordering

2025-11-18 Thread Konstantinos Eleftheriou
On Mon, Nov 17, 2025 at 2:51 PM Richard Biener wrote: > On Mon, 17 Nov 2025, Konstantinos Eleftheriou wrote: > > > Hi Richard, thanks for the feedback. > > > > On Thu, Nov 13, 2025 at 12:07 PM Richard Biener > wrote: > > > > > On Wed, 12 Nov 2025, Konstantinos Eleftheriou wrote: > > > > > > > Th

[COMMITTED 16/17] ada: Fix assertion failure on prefixed call with access to class-wide interface

2025-11-18 Thread Marc Poulhiès
From: Eric Botcazou The assertion failure shows that the 'Access reference implicitly introduced for calls written in object notation whose controlling first parameter is an access to class-wide interface is not later expanded in the cases where the pointer to the interface needs to be retrieved.

[COMMITTED 15/17] ada: Enforce checks on access to interface type conversions

2025-11-18 Thread Marc Poulhiès
From: Javier Miranda The patch enforces checks on access to interface type conversions internally generated by the frontend to displace the pointer to a tagged type object (pointer named "this" in the C++ terminology) from a dispatch table to a another dispatch table. gcc/ada/ChangeLog:

[COMMITTED 17/17] ada: Reserve Is_Constructor for Ada constructors

2025-11-18 Thread Marc Poulhiès
From: Denis Mazzucato gcc/ada/ChangeLog: * gcc-interface/decl.cc (is_cplusplus_method,gnat_to_gnu_param,gnat_to_gnu_subprog_type): Adjust Is_Constructor/Is_CPP_Constructor after renaming. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/dec

[COMMITTED 08/17] ada: Reserve Is_Constructor for Ada constructors

2025-11-18 Thread Marc Poulhiès
From: Denis Mazzucato This patch renames old Is_Constructor to a new Is_CPP_Constructor and reserves Is_Constructor for Ada constructors. gcc/ada/ChangeLog: * sem_util.adb (Is_Constructor_Procedure): Replace by Is_Constructor. * sem_util.ads: Likewise. * sem_ch6.adb (Ana

[COMMITTED 13/17] ada: Fix small typo in comment

2025-11-18 Thread Marc Poulhiès
From: Eric Botcazou gcc/ada/ChangeLog: * sem_type.adb (Last_Overloaded): Fix typo. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_type.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index 31a2acd

[COMMITTED 02/17] ada: Add ATC to suspension objects

2025-11-18 Thread Marc Poulhiès
From: Ronan Desplanques This patch makes suspension objects receptive to asynchronous transfers of control, i.e. aborts. It also replaces the multiple platform-dependent implementations of suspension objects with a single implementation relying on the existing abstractions RTS_Lock, Sleep and Wak

[COMMITTED 12/17] ada: Fix bogus error about null exclusion for designated type with multiple views

2025-11-18 Thread Marc Poulhiès
From: Eric Botcazou It comes from the new legality check retroactively introduced by AI12-0289, but the implementation is fooled by the presence of both an incomplete and a partial view for a tagged type. gcc/ada/ChangeLog: PR ada/111433 * sem_util.ads (Incomplete_Or_Partial_Vie

[COMMITTED 14/17] ada: Small cleanup in analysis of package instantiation

2025-11-18 Thread Marc Poulhiès
From: Eric Botcazou This cleans up some ancient code computing whether the instantiation of the body is needed and moves remnants to the Needs_Body_Instantiated predicate. gcc/ada/ChangeLog: * sem_ch12.adb (Analyze_Package_Instantiation): Streamline and move code clearing Needs_

[COMMITTED 10/17] ada: Improve diagnostic when an incorrect left bracket is found

2025-11-18 Thread Marc Poulhiès
From: Denis Mazzucato This patch improves the generic error message of a missing binary operator when an incorrect left bracket is found. gcc/ada/ChangeLog: * par-ch4.adb (P_Simple_Expression): Improve diagnostic. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par-ch

[COMMITTED 09/17] ada: Add rule check for call arguments

2025-11-18 Thread Marc Poulhiès
From: Viljar Indus Implement SPARK RM 6.9(18). If an assignment to a part of a ghost variable occurs in a ghost entity, then the variable should be assertion-level-dependent on this entity. [This includes both assignment statements and passing a ghost variable as an out or in out mode actual par

[COMMITTED 11/17] ada: Update baselining disclaimer.

2025-11-18 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * doc/gnat_rm/obsolescent_features.rst: update PolyOrb reference * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/obsolescent_features.rst | 3 +-- gc

[COMMITTED 06/17] ada: Improve warning on abstract equality

2025-11-18 Thread Marc Poulhiès
From: Bob Duff In many cases, we warn if an abstract equality function is called implicitly. In the case of record equality, this patch adds a mention of the particular component_declaration for which an abstract "=" is invoked; otherwise it is hard to understand the warning for record types with

[COMMITTED 07/17] ada: Avoid duplicate streaming and Put_Image subprograms (part2).

2025-11-18 Thread Marc Poulhiès
From: Steve Baird Follow up fixes for earlier changes made for this issue. gcc/ada/ChangeLog: * exp_attr.adb (Expand_N_Attribute_Reference): Ensure that Build_Record_Or_Elementary_Input_Function and Build_Record_Or_Elementary_Output_Procedure are only called from

[COMMITTED 05/17] ada: Update implementation for ghost entities inside ignored regions

2025-11-18 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * ghost.adb (Check_Valid_Ghost_Policy): Remove function. (Ghost_Policy_In_Effect): Force the ghost policy to be always be ignore inside ignored regions. (Mark_And_Set_Ghost_Declaration): Likewise. Tested on x86_64-pc-linux-gn

[COMMITTED 04/17] ada: Don't generate function that violates No_Dynamic_Sized_Objects restriction

2025-11-18 Thread Marc Poulhiès
From: Steve Baird In some cases, the compiler implicitly generates a hash function for an enumeration type. If a No_Dynamic_Sized_Objects restriction is in effect then that hash function violates the restriction, resulting in a compilation failure. Therefore, do not generate the hash function in

[COMMITTED 03/17] ada: Fix mistake in recent patch

2025-11-18 Thread Marc Poulhiès
From: Ronan Desplanques A recent patch removed the wrong record definition in s-taspri__mingw.ads, this patch fixes that mistake. gcc/ada/ChangeLog: * libgnarl/s-taspri__mingw.ads (Suspension_Object): Remove. (Private_Data): Revert unintentional removal. Tested on x86_64-pc-lin

[COMMITTED 01/17] ada: Use Finalizable for suspension objects

2025-11-18 Thread Marc Poulhiès
From: Ronan Desplanques The only reason Suspension_Object was a tagged type before this patch was to have finalization. This patch makes it use the Finalizable aspect, which is more lightweight. gcc/ada/ChangeLog: * libgnarl/a-sytaco.ads (Suspension_Object): Use Finalizable aspect. Tes

[PATCH] docs: aarch64: Minor grammar fix for preserve_none.

2025-11-18 Thread Alfie Richards
Hi Sandra, Yes, agreed to both points. I've attached a fix. Apologies for all the errors in my docs patches. I'm trying to implement some better tools for myself to catch the litany of spelling and grammar mistakes. Okay for master? Kind regards, Alfie -- >8 -- gcc/ChangeLog: * doc/e

[PATCH] libiberty/testsuite: make test-pexecute's -t option a little more useful

2025-11-18 Thread Jan Beulich
Printing the program name twice doesn't really provide much value. --- The reason I looked here in the first place is the log spam this test causes: Per run I'm getting one instance of systemd-coredump[18150]: Core Dumping has been disabled for process 18149 (test-pexecute). systemd-coredump[1815

Re: [PATCH 02/13] vect: Make all exit conditions early breaks for uncounted loops

2025-11-18 Thread Victor Do Nascimento
On 11/11/25 08:46, Richard Biener wrote: On Mon, 10 Nov 2025, Victor Do Nascimento wrote: For uncounted loops, given how no information can be derived from the max number of iterations, we wish to make no distinction between the "main" exit and any additional exits. That is, an epilogue is

Re: [PATCH] cprop_hardreg: Prevent copy propagation from a non-frame, related insn to a frame related insn

2025-11-18 Thread Eric Botcazou
> In this patch, a new field is added to 'struct value_data_entry' > which indicates if the instruction that created this > value is frame related or not. Then during copy propagation, we do not > replace registers if the copy is happening from a non-frame related insn > to a frame related insn. >

[PATCH v2 09/10] libstdc++: remove __glibcxx_padded_layouts.

2025-11-18 Thread Luc Grosheintz
The standard uses the same feature testing macro for both padded layouts and submdspan. Since submdspan support is complete, we can now remove the internal feature testing macro. libstdc++-v3/ChangeLog: * include/bits/version.def (padded_layouts): Remove internal feature testing m

[PATCH v2 10/10] libstdc++: Set __cpp_lib_submdspan to 202411.

2025-11-18 Thread Luc Grosheintz
The submdspan feature is complete and this commit sets the feature testing macros accordingly. Also makes the feature testing macro submdspan depend on constant_wrapper. libstdc++-v3/ChangeLog: * include/bits/version.def (submdspan): Set to 202411 add dependency. * include

[PATCH v2 08/10] libstdc++: Implement submdspan_mapping for layout_right_padded. [PR110352]

2025-11-18 Thread Luc Grosheintz
Implements submdspan for layout_right_padded as described in P3663. PR libstdc++/110352 libstdc++-v3/ChangeLog: * include/std/mdspan (layout_right_padded::submdspan_mapping): New friend method. * testsuite/23_containers/mdspan/submdspan/submdspan.cc: Insta

[PATCH v2 05/10] libstdc++: Implement submdspan_mapping for layout_right. [PR110352]

2025-11-18 Thread Luc Grosheintz
Adds submdspan_mapping for layout_right as described in P3663. PR libstdc++/110352 libstdc++-v3/ChangeLog: * include/std/mdspan (layout_right::mapping::submdspan_mapping): New friend function. * testsuite/23_containers/mdspan/submdspan/submdspan.cc: Instan

[PATCH v2 04/10] libstdc++: Implement submdspan and submdspan_mapping for layout_left. [PR110352]

2025-11-18 Thread Luc Grosheintz
Implements `submdspan` and `submdspan_mapping` for layout_left as described in P3663 (Future proofing mdspan). When computing the offset of the submdspan, one must check that the lower bound of the slice range isn't out-of-range. There's a few cases when the lower bound is never out-of-range: -

[PATCH v2 07/10] libstdc++: Implement submdspan_mapping for layout_left_padded. [PR110352]

2025-11-18 Thread Luc Grosheintz
Implements submdspan for layout_left_padded as described in P3663. PR libstdc++/110352 libstdc++-v3/ChangeLog: * include/std/mdspan (layout_left_padded::submdspan_mapping): New friend method. * testsuite/23_containers/mdspan/layout_traits.h (LayoutTraits::

[PATCH v2 03/10] libstdc++: Implement submdspan_extents. [PR110352]

2025-11-18 Thread Luc Grosheintz
Implement submdspan_extents as described in P3663 and adds it to the std module. There's one deviation from the standard. Doesn't (under all circumstances) require: 0 <= begin[k] <= end[k] <= exts.extent(k) where the k-th slice range is [begin[k], end[k]). Instead, it requires that the k-th sl

[PATCH v2 06/10] libstdc++: Implement submdspan_mapping for layout_stride. [PR110352]

2025-11-18 Thread Luc Grosheintz
Add submdspan_mapping for layout_stride as in P3663. PR libstdc++/110352 libstdc++-v3/ChangeLog: * include/std/mdspan (layout_stride::mapping::submdspan_mapping): New friend function. * testsuite/23_containers/mdspan/submdspan/submdspan.cc: Instantiate tes

[PATCH v2 02/10] libstdc++: Implement submdspan_canonicalize_slices. [PR110352]

2025-11-18 Thread Luc Grosheintz
Implements submdspan_canonicalize_slices as described in P3663 and adds it to the std module. PR libstdc++/110352 libstdc++-v3/ChangeLog: * include/std/mdspan (submdspan_canonicalize_slices): New function. * src/c++23/std.cc.in (submdspan_canonicalize_slices): Add

[PATCH v2 01/10] libstdc++: Prepare mdspan-related code for submdspan.

2025-11-18 Thread Luc Grosheintz
The changes needed for submdspan are: * In submdspan related code the user-defined integer-like types need to be copy- and move-constructable. * The traits for writing tests that work with both left- and right, possibly padded, layouts will also be useful for submdspan. Therefore,

[PATCH v2 00/10] libstdc++: submdspan

2025-11-18 Thread Luc Grosheintz
This sequence of patches implements submdspan and as far as I'm aware completes the C++26 header . The first commit is preparatory (move code, generalize code and fix some formatting issues). Then, each commit implements: - submdspan_canonicalize_slices, - submdspan_extents (with review comme

Re: [PATCH v2] libstdc++: shared_mutex: Respond consistently to errors and deadlock

2025-11-18 Thread Jonathan Wakely
On Tue, 18 Nov 2025 at 13:07, Mike Crowe wrote: > > Make the shared_mutex::try_lock(), shared_timed_mutex::try_lock_until() > and shared_timed_mutex::try_lock_shared_until() all handle errors from > pthread functions consistently by returning false to indicate that the > lock could not be taken. I

Re: [PATCH] PR tree-optimization/122733: Fix overflowing unsigned shift for (y << x) {<,<=,>,>=} x

2025-11-18 Thread Richard Biener
On Tue, 18 Nov 2025, Dhruv Chawla wrote: > On 18/11/25 18:14, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > > > > On Tue, 18 Nov 2025, [email protected] wrote: > > > >> From: Dhruv Chawla > >> > >> The patch previously committed as r16-5161-gc4ca51235

[PATCH] c++: Handle absolute path for CMI output directory [PR122677]

2025-11-18 Thread Jonathan Wakely
When trying to create each directory component of an absolute path, the first call to mkdir uses a path of "" which gives an ENOENT error. This causes the create_dirs function to return without creating anything. This commit skips past the leading slashes of an absolute path, so that the first cal

[PATCH] tree-optimization/122736 - OMP SIMD call mask recording

2025-11-18 Thread Richard Biener
When recording the mask for loop masking of OMP SIMD calls we currently fail to provide the correct vector type and number of copies in all cases. The following tries to correct this. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/122736 * tree-

Re: [PATCH] PR tree-optimization/122733: Fix overflowing unsigned shift for (y << x) {<,<=,>,>=} x

2025-11-18 Thread Dhruv Chawla
On 18/11/25 18:14, Richard Biener wrote: External email: Use caution opening links or attachments On Tue, 18 Nov 2025, [email protected] wrote: From: Dhruv Chawla The patch previously committed as r16-5161-gc4ca512358be7c would miscompile the cases where the LHS was unsigned and overflowed,

[PATCH v2] libstdc++: shared_mutex: Respond consistently to errors and deadlock

2025-11-18 Thread Mike Crowe
Make the shared_mutex::try_lock(), shared_timed_mutex::try_lock_until() and shared_timed_mutex::try_lock_shared_until() all handle errors from pthread functions consistently by returning false to indicate that the lock could not be taken. If _GLIBCXX_ASSERTIONS is defined then unexpected errors, su

Re: [PATCH v2 2/3][vect]: check support for gcond with {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Richard Biener
On Mon, 17 Nov 2025, Tamar Christina wrote: > This change allows a target to only implement the explicit vec_cbranch optabs. > To do this the vectorizer is updated to check for the new optabs directly. > > Targets that have a different type for BOOLEAN_VECTOR_TYPE_P for instance > can use only th

Re: PATCH] tree-optimization: Allow LICM to hoist loads in "self write" patterns

2025-11-18 Thread Richard Biener
On Mon, Nov 17, 2025 at 1:03 AM Kugan Vivekanandarajah wrote: > > > > > On 23 Oct 2025, at 8:37 pm, Richard Biener > > wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Wed, Oct 22, 2025 at 12:12 PM Kugan Vivekanandarajah > > wrote: > >> > >> > >> > >>> On 2

Re: [PATCH] PR tree-optimization/122733: Fix overflowing unsigned shift for (y << x) {<,<=,>,>=} x

2025-11-18 Thread Richard Biener
On Tue, 18 Nov 2025, [email protected] wrote: > From: Dhruv Chawla > > The patch previously committed as r16-5161-gc4ca512358be7c would > miscompile the cases where the LHS was unsigned and overflowed, as the > comparison would then give a different result. For example: > > __attribute__ ((noip

RE: [PATCH 1/2]middle-end: add target hook for isel

2025-11-18 Thread Richard Biener
On Tue, 18 Nov 2025, Tamar Christina wrote: > > -Original Message- > > From: Tamar Christina > > Sent: 13 November 2025 13:37 > > To: Richard Biener > > Cc: [email protected]; nd > > Subject: RE: [PATCH 1/2]middle-end: add target hook for isel > > > > > -Original Message-

Re: [PATCH v2 1/3]middle-end: support new {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Richard Biener
On Tue, 18 Nov 2025, Robin Dapp wrote: > > Hi, yeah that's right. That's a good indication I need to add that to the > > docs. > > Now however I only try a vector of all zeros in expand atm, mainly because > > I don't > > know where to get the other possible else values for non-Len based target

RE: [PATCH v2 1/3]middle-end: support new {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Tamar Christina
> -Original Message- > From: Robin Dapp > Sent: 18 November 2025 12:16 > To: Tamar Christina ; Robin Dapp > ; Hongtao Liu > Cc: [email protected]; nd ; [email protected]; Robin > Dapp > Subject: Re: [PATCH v2 1/3]middle-end: support new > {cond{_len}_}vec_cbranch_{any|all} optabs [

Re: [PATCH v2 1/3]middle-end: support new {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Robin Dapp
> I completely forgot about the bias, and think I misinterpreted > VCOND_MASK_LEN. > > I was looking at this example https://godbolt.org/z/jofExx9q6 and was > assuming that > the _90 is the len and 0 is the bias? Yep, thanks. They are (should be) always in conjunction. Is it possible to keep

[PATCH 1/2] tree-optimization/122723 - fix multi-step mask conversion

2025-11-18 Thread Richard Biener
The following fixes the logic in multi-step mask conversions with respect to the case where we need to resort to the sbool variant of the unpack optabs. We were testing a wrong condition on when that would apply in the multi-step case. Bootstrapped and tested on x86_64-unknown-linux-gnu.

[PATCH 2/2] tree-optimization/122723 - masking of .COND_ADD reductions

2025-11-18 Thread Richard Biener
The following fixes loop masking of .COND_ADD reductions when we decide to reduce multiple lanes to one, thus go through vect_transform_reduction. The first issue is in vect_reduction_update_partial_vector_usage which does not handle incoming .COND_ADD well and fails to compute 'cond_fn' in this c

RE: [PATCH v2 1/3]middle-end: support new {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Tamar Christina
> -Original Message- > From: Robin Dapp > Sent: 18 November 2025 10:57 > To: Tamar Christina ; Robin Dapp > ; Hongtao Liu > Cc: [email protected]; nd ; [email protected]; Robin > Dapp > Subject: Re: [PATCH v2 1/3]middle-end: support new > {cond{_len}_}vec_cbranch_{any|all} optabs [

Re: [PATCH v2 1/3]middle-end: support new {cond{_len}_}vec_cbranch_{any|all} optabs [PR118974]

2025-11-18 Thread Robin Dapp
> But AArch64 does not return zero. It returns one of the operands of the > conditional > instruction. > > i.e. the implementation is > > static tree > aarch64_preferred_else_value (unsigned, tree, unsigned int nops, tree *ops) > { > return nops == 3 ? ops[2] : ops[0]; > } Ah, I should have che

Re: [r16-5316 Regression] FAIL: g++.dg/vect/pr68762-1.cc -std=c++98 (test for excess errors) on Linux/x86_64

2025-11-18 Thread Richard Biener
On Sun, 16 Nov 2025, Haochen Jiang wrote: > On Linux/x86_64, > > 3d11d69600b7c3ebf0cf8eacc6a4bc8d994710e9 is the first bad commit > commit 3d11d69600b7c3ebf0cf8eacc6a4bc8d994710e9 > Author: Richard Biener > Date: Fri Nov 14 13:40:50 2025 +0100 > > Always analyze possible partial vector us

[PING^2][PATCH v8] rs6000: Use vector addition when left shifting by 1 [PR119702]

2025-11-18 Thread Avinash Jayakar
On Fri, 2025-10-24 at 14:45 +0530, Avinash Jayakar wrote: > Hi Segher, > > Please ignore the v7 patch, had minor errors in capitalization. > Thanks for the review of the v6 patch. I have incorporated all the > mentioned > changes in this patch. > Bootstrapped and regtested on powerpc64le-linux wi

[PATCH] rs6000: Do not reorder operands for vec_pack_to_short_fp32 based on endianness [PR119130]

2025-11-18 Thread Avinash Jayakar
Hi, This is a small patch to fix PR119130. Bootstrapped and regtested on both powerpc64 little and big endian targets. Ok for trunk? Thanks and regards, Avinash Jayakar The patterns for altivec_vpkuum take care of the order of operands for the vpkuwum instruction, and therefore it is not needed

Re: [PATCH v2 3/3]AArch64: Implement {cond_}vec_cbranch_{any|all} [PR118974]

2025-11-18 Thread Kyrylo Tkachov
Hi Tamar, > On 18 Nov 2025, at 00:13, Tamar Christina wrote: > > The following example: > > #define N 640 > int a[N] = {}; > int b[N] = {}; > int c[N] = {}; > > void f1 (int d) > { > for (int i = 0; i < N; i++) >{ > b[i] += a[i]; > if (a[i] != d) >break; >} > } > >

[PATCH v4 1/3] c: Add _Maxof and _Minof operators

2025-11-18 Thread Alejandro Colomar
Link: gcc/ChangeLog: * doc/extend.texi (Syntax Extensions): Document _Maxof & _Minof. gcc/c-family/ChangeLog: * c-common.cc (c_common_reswords): Add _Maxof & _Minof keywords. (c_maxof_type, c_minof_type): New f

[PATCH v4 2/3] c: Reduce excess errors of _Maxof and _Minof

2025-11-18 Thread Alejandro Colomar
gcc/c/ChangeLog: * c-parser.cc (c_parser_maxof_or_minof_expression): After '(' has been parsed, if there's a syntax error, skip until ')', to minimize excess errors. gcc/testsuite/ChangeLog: * gcc.dg/maxof-compile.c (expr, specs): Update test. Signed-off-by: Alej

[PATCH v4 3/3] c: _Maxof and _Minof have not been accepted yet by the C Committee

2025-11-18 Thread Alejandro Colomar
Once they are accepted by the C Committee, this patch can be reverted. gcc/c/ChangeLog: * c-parser.cc (c_parser_maxof_or_minof_expression): Use pedwarn() instead of pedwarn_c23(). gcc/testsuite/ChangeLog: * gcc.dg/maxof-compat.c: Update test. * gcc.dg/maxof-compi

[PATCH v4 0/3] c: Add _Maxof & _Minof [n3628]

2025-11-18 Thread Alejandro Colomar
Hi Joseph, I've removed the diagnostics about bool. It now accepts bool just like the n3628 proposal. At the bottom of this mail, you can find the range-diff against v3. Please let me know if you want some or all of these patches squashed. Successfully tested for regressions: alx@devu

  1   2   >