Re: [PATCH] Fortran: associate to a contiguous pointer or target [PR122977]

2025-12-04 Thread Paul Richard Thomas
Hi Harald, I see that Steve has OK'd it on the PR. It looks good to me too. Regards Paul On Thu, 4 Dec 2025 at 21:26, Harald Anlauf wrote: > Dear All, > > the attached patch fixes a regression when trying to associate > to a pointer target with the contiguous attribute. > > While trying the

[PATCH] Enable using load/store vector pairs for memory operations with the -mcpu=future PowerPC option

2025-12-04 Thread Michael Meissner
This was originally posted in previous versions of the -mcpu=future patch, but it is now a separate patch. It does need the V10 -mcpu=future patch to be applied before this patch can be applied. In the development for the power10 processor, GCC did not enable using the load vector pair and store

[PATCH V10] Add -mcpu=future to the PowerPC

2025-12-04 Thread Michael Meissner
This patch adds support for a new PowerPC cpu (future). Until it is announced, the features of future processors may be changed. These patches allow people to use the new features of processors being developed. If/when the a processor is announced that has the features, future GCC revisions will

Re: [PATCH v2] match.pd: x&c ?(x op c):(x|c) -> x^c [PR122615, PR122616]

2025-12-04 Thread Jeff Law
On 12/4/25 8:34 PM, Andrew Pinski wrote: On Thu, Dec 4, 2025 at 6:05 AM Richard Biener wrote: On Fri, Nov 28, 2025 at 2:04 AM Daniel Barboza wrote: Add a single pattern to reduce these patterns to "x ^ c": x & c ? (x - c) | (x | c) x & c ? (x & ~c) | (x | c) As long as "c" has a single

Re: [PATCH v2] match.pd: x&c ?(x op c):(x|c) -> x^c [PR122615, PR122616]

2025-12-04 Thread Andrew Pinski
On Thu, Dec 4, 2025 at 6:05 AM Richard Biener wrote: > > On Fri, Nov 28, 2025 at 2:04 AM Daniel Barboza > wrote: > > > > Add a single pattern to reduce these patterns to "x ^ c": > > > > x & c ? (x - c) | (x | c) > > x & c ? (x & ~c) | (x | c) > > > > As long as "c" has a single bit set. > > OK

Re: [PATCH 0/5] OpenMP Barrier perf improvements

2025-12-04 Thread Sebastian Huber
Dear Matthew, I was able to apply the patch set. I can build GCC for the sparc-rtems target with the patch set. So, for RTEMS we have then basically the old Linux barrier implementation as a hard copy. If we would like to go back to directly use the Linux implementation, we need support for the

Re: [PATCH] c++: Fix SFINAE for deleted explicit specializations [PR119343]

2025-12-04 Thread Patrick Palka
On Tue, 2 Dec 2025, Jason Merrill wrote: > On 12/2/25 3:37 AM, Egas Ribeiro wrote: > > On 2025-12-01 15:34, Patrick Palka wrote: > > > Hi Egas, thanks for tackling this bug! > > > > > > On Sun, 30 Nov 2025, Egas Ribeiro wrote: > > > > > > > Regtested on x86_64-pc-linux-gnu, OK for trunk? > > > >

Re: [PATCH v3 1/2] Driver: Add support for Windows resource files (.rc, .res) [PR108866]

2025-12-04 Thread LIU Hao
在 2025-12-5 04:45, Pali Rohár 写道: If I run g++ file.cpp -c -o file.res it will compile file.cpp and produce COFF object file named file.res. So somehow I would expect that if I run gcc file.rc -c -o file.res then output file would be also COFF object independently of the file extension. When us

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

2025-12-04 Thread Joseph Myers
On Thu, 4 Dec 2025, Qing Zhao wrote: > However, where should we call the “verify_counted_by_attribute” for the > above cases? > > Looks like that inside “finish_struct” is not the correct place to do > this check since at that time we don’t know whether this structure will > be used on its own

Re: [PATCH] Ada, Darwin: Implement OSLock for Darwin [PR115305].

2025-12-04 Thread Eric Botcazou
> I just repeated the build and test - there are no warnings and/or erorrs > about __sig. There are likewise no warnings or errors about it in either > the Acats or the gnat testsuite logs. The build completes normally as does > the testsuite. > > The new file is correctly linked as far as I can

[r16-5888 Regression] FAIL: gcc.dg/vect/vect-simd-clone-24.c scan-tree-dump-times dce6 "simdclone.[0-9] \\([^, ]+, [^, ]+\\)" 3 on Linux/x86_64

2025-12-04 Thread Haochen Jiang
On Linux/x86_64, cea34ac07e3bd74086f854dd43afb29b4940d8de is the first bad commit commit cea34ac07e3bd74086f854dd43afb29b4940d8de Author: Richard Biener Date: Sun Nov 23 14:01:03 2025 +0100 Select both inbranch and notinbranch clone during SIMD call analysis caused FAIL: gcc.dg/vect/vect

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

2025-12-04 Thread Qing Zhao
> On Dec 4, 2025, at 12:43, Joseph Myers wrote: > > On Tue, 25 Nov 2025, Qing Zhao wrote: > >> @@ -10001,8 +10014,10 @@ finish_struct (location_t loc, tree t, tree >> fieldlist, tree attributes, >> struct_parse_info->struct_types.safe_push (t); >> } >> >> - if (fields_with_counted_by.l

[PATCH v4 4/5] libstdc++: Implement submdspan_mapping for layout_left_padded. [PR110352]

2025-12-04 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 v4 3/5] libstdc++: Implement submdspan_mapping for layout_stride. [PR110352]

2025-12-04 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 v4 5/5] libstdc++: Implement submdspan_mapping for layout_right_padded. [PR110352]

2025-12-04 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 v4 2/5] libstdc++: Implement submdspan_mapping for layout_right. [PR110352]

2025-12-04 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 v4 1/5] libstdc++: Implement submdspan and submdspan_mapping for layout_left. [PR110352]

2025-12-04 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 v4 0/5] libstdc++: submdspan (part 2)

2025-12-04 Thread Luc Grosheintz
These are the revised submdspan_mapping related patches from v2. A few comments: - __any_past_the_end: the suggestion was to precheck for an empty extent. I kept the current logic, because the additional complexity is only at compile time (there was a `constexpr` missing on a `else

[PATCH] Fortran: associate to a contiguous pointer or target [PR122977]

2025-12-04 Thread Harald Anlauf
Dear All, the attached patch fixes a regression when trying to associate to a pointer target with the contiguous attribute. While trying the obvious fix, I saw that gfc_is_simply_contiguous is not working properly when applied to an associate variable, and even more so for nested associate const

Re: [PATCH] libstdc++: Fix std::erase_if behavior for std::__debug::deque

2025-12-04 Thread François Dumont
On 12/4/25 11:58, Jonathan Wakely wrote: On Thu, 4 Dec 2025 at 06:16, François Dumont wrote: std::erase and std::erase_if are broken for users directly referencing __gnu_debug::deque in their code that is to say without activating the _GLIBCXX_DEBUG mode. The iterators poten

Re: [PATCH v3 1/2] Driver: Add support for Windows resource files (.rc, .res) [PR108866]

2025-12-04 Thread Pali Rohár
On Thursday 04 December 2025 21:37:15 Peter0x44 wrote: > On 2025-12-04 18:31, Pali Rohár wrote: > > On Thursday 04 December 2025 09:32:44 Peter Damianov wrote: > > > This patch adds support for compiling Windows resource files > > > (.rc) and pre-compiled resource files (.res) directly through the

[PATCH v6 3/3] c: implement defer

2025-12-04 Thread Anna (navi) Figueiredo Gomes
based on the technical specification 25755[1] as an extension _Defer is provided as a keyword if gnu extensions are enabled, and stddefer.h provided a macro for the 'defer' spelling deferred statements execute at the end of the scope they're added on, similar to the cleanup attribute, and they ha

[PATCH v6 2/3] c: introduce jump barriers for statement expressions

2025-12-04 Thread Anna (navi) Figueiredo Gomes
represent the start and end of scope which a local jump is not allowed to cross as a jump barrier, moving this logic out into a function allows for defer statements to use the same codepath gcc/c/ChangeLog: * c-decl.cc (struct c_jump_barrier): New structure. (struct c_spot_binding

[PATCH v6 1/3] c: handle expression nodes in push_cleanup

2025-12-04 Thread Anna (navi) Figueiredo Gomes
for future use with defer statements, as they do not have a declaration associated, and are bound to the scope with a BIND_EXPR gcc/c/ChangeLog: * c-typeck.cc (push_cleanup): Handle EXPR_P nodes. Signed-off-by: Anna (navi) Figueiredo Gomes --- gcc/c/c-typeck.cc | 10 -- 1 file

[PATCH v6 0/3] implement defer statements as per ts 25755

2025-12-04 Thread Anna (navi) Figueiredo Gomes
based on n3734[1] this feature mostly makes use of already-established logic, namely push_cleanup used by the cleanup attribute, and the constraints put in place for checking local jumps against statement expressions the TS recommends providing 'defer' as a keyword alongside '_Defer', however sin

Re: [PATCH v3 1/2] Driver: Add support for Windows resource files (.rc, .res) [PR108866]

2025-12-04 Thread Peter0x44
On 2025-12-04 18:31, Pali Rohár wrote: On Thursday 04 December 2025 09:32:44 Peter Damianov wrote: This patch adds support for compiling Windows resource files (.rc) and pre-compiled resource files (.res) directly through the GCC driver on PECOFF targets. Previously, users had to manually invok

Re: [PATCH 0/5] Some gcov bugfixes and improvements

2025-12-04 Thread Jørgen Kvalsvik
On 11/28/25 09:19, Jørgen Kvalsvik wrote: On 11/19/25 20:11, Jørgen Kvalsvik wrote: On 11/5/25 23:38, Jørgen Kvalsvik wrote: Hi, These patches are a mix of features, bugfixes, and quality of life improvements. * fixes a wrong line count when multiple blocks touch the same line * -fpath-covera

[Patch] OpenMP: C/C++ parser support for dyn_groupprivate

2025-12-04 Thread Tobias Burnus
The attached patch adds parser support for the 'dyn_groupprivate' clause to C/C++. (The Fortran support was added before.) However, for now, the clause is rejected with a 'sorry' in gimplify.cc. [To do: Supporting it requires that the clause is forwarded to libgomp and the memory allocation handl

contrib: Set more site.exp variables in test_installed

2025-12-04 Thread Joseph Myers
Add support in contrib/test_installed for more variables (via associated command-line options to the script) that gcc/Makefile.in can set: * ALT_CC_UNDER_TEST, ALT_CXX_UNDER_TEST and COMPAT_OPTIONS are used in compat testing (against the same or a different compiler). * The libiconv variable is

[PATCH] libstdc++, v4: Implement C++26 P3378R2 - constexpr exception types [PR121114]

2025-12-04 Thread Jakub Jelinek
Thanks for the review. On Thu, Dec 04, 2025 at 12:26:36PM +, Jonathan Wakely wrote: > Given what I wrote above, do we ever need this during constant > evaluation? The library never calls it, and users should not call this > function (they should just throw the exception directly). I think we >

Re: [PATCH] aarch64: Fix crc{, _rev}si4 expanders [PR122991]

2025-12-04 Thread Andrew Pinski
On Thu, Dec 4, 2025, 7:35 AM Jakub Jelinek wrote: > Hi! > > The newly added gcc.dg/pr122991.c test fails also on aarch64. > The problem is the same as on x86 which has been fixed in r16-5882, > while the last operand is guaranteed to be a CONST_INT of the right > mode initially, maybe_legitimize_

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

2025-12-04 Thread Joseph Myers
On Tue, 25 Nov 2025, Qing Zhao wrote: > @@ -10001,8 +10014,10 @@ finish_struct (location_t loc, tree t, tree > fieldlist, tree attributes, > struct_parse_info->struct_types.safe_push (t); > } > > - if (fields_with_counted_by.length () > 0) > -verify_counted_by_attribute (t, &fi

Re: [PATCH] Ada, Darwin: Implement OSLock for Darwin [PR115305].

2025-12-04 Thread Iain Sandoe
Hi Arnaud, > On 4 Dec 2025, at 13:39, Arnaud Charlet wrote: > >> >> I finally got a chance to take a look at this issue and it turned out to >> be as you suspected in the PR comments. The assumed Posix layout of the >> pthread_mutex_t does not match that used by Darwin. I wonder, in passing >

Re: [PATCH v3 1/2] Driver: Add support for Windows resource files (.rc, .res) [PR108866]

2025-12-04 Thread Pali Rohár
On Thursday 04 December 2025 09:32:44 Peter Damianov wrote: > This patch adds support for compiling Windows resource files > (.rc) and pre-compiled resource files (.res) directly through the > GCC driver on PECOFF targets. > > Previously, users had to manually invoke windres to compile resource >

Re: [PATCH v2] rtl-optimization: Fix BB edge ordering [PR122675]

2025-12-04 Thread Dimitar Dimitrov
On Thu, Dec 04, 2025 at 03:27:53PM +0100, Jan Hubicka wrote: > > Starting with r16-4438-ga93f80feeef744, the edges started to be sorted > > in ascending order. Thus the most likely branches were deprioritized > > instead of optimized to fallthroughs. > > > > Fix by restoring the sorting order pri

Re: [PATCH v3 2/2] Driver: Implement --with-windres= argument to configure script [PR108866]

2025-12-04 Thread Joseph Myers
On Thu, 4 Dec 2025, Peter Damianov wrote: > To align with the rest of the options (--with-ld, --with-as, --with-dsymutil), > implement --with-windres for overriding the windres binary the driver invokes > with an absolute path to a windres binary. > > gcc/ > PR target/108866 > * gcc.c

[PATCH v1 0/1] libgccjit: Fix test-cold-attribute.c

2025-12-04 Thread Antoni Boucher via Sourceware Forge
Hi gcc-patches mailing list, Antoni Boucher has requested that the following forgejo pull request be published on the mailing list. Created on: 2025-12-04 16:08:25+00:00 Latest update: 2025-12-04 16:09:45+00:00 Changes: 1 changed files, 2 additions, 2 deletions Head revision: antoyo/gcc ref fix/

[PATCH v1 1/1] libgccjit: Fix test-cold-attribute.c

2025-12-04 Thread Antoni Boucher via Sourceware Forge
From: Antoni Boucher gcc/testsuite/ChangeLog: * jit.dg/test-cold-attribute.c: Use -Oz to fix test. --- gcc/testsuite/jit.dg/test-cold-attribute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/jit.dg/test-cold-attribute.c b/gcc/testsuite/jit.dg/te

Re: [PATCH 9/9] lto: Fix SegFault in ICF caused by missing definition

2025-12-04 Thread Jan Hubicka
> Again for completeness for building the kernel. > > - > > ICF assumes that all nodes in summaries are defined. > lto_symtab_merge_symbols can set node's definition flag to false. > remove_unreachable_nodes then releases its body without setting > body_removed. This results in SegFault in IC

Re: [PATCH] libstdc++: Bump libtool_VERSION for GCC 16

2025-12-04 Thread Tomasz Kaminski
On Tue, Nov 25, 2025 at 3:43 PM Jonathan Wakely wrote: > This should have been done in r16-995-gda9b2ea04c084d (or any of the > later changes that added new symbols to trunk). > > libstdc++-v3/ChangeLog: > > * acinclude.m4 (libtool_VERSION): Bump version. > * configure: Regenerate

[TO-BE-COMMITTED,PATCH] s390: Accept array arguments for builtins

2025-12-04 Thread Stefan Schulze Frielinghaus
From: Stefan Schulze Frielinghaus A difference in front ends is that in contrast to C the C++ FE does no array-to-pointer conversion prior calling resolve_overloaded_builtin(). However, we depend on this for finding the proper overloaded builtin or in case of direct expansion. Therefore, do the

Re: [PATCH 8/9 v2] lto: Add toplevel simple assembly heuristics

2025-12-04 Thread Jan Hubicka
> Difference in v2: > Previously I was checking for ".local $symbol". Most symbols are not > marked this way so now I pessimistically assume that any symbol defined > in assembly may be local. > > --- > > This new pass heuristically detects symbols referenced by toplevel > assembly to prevent the

Re: [PATCH 7/9 v2] lto: Allow other partitionings for toplevel assembly

2025-12-04 Thread Jan Hubicka
> For balanced and max partitioning this adds proper partitioning of asm > and related symbols. > > The special symbols are partitioned with 1to1 and joined together if > there is no name conflict. All other symbols are partitioned with the > requested partitioning. > In typical usage with small n

[committed] amdgcn, libgomp: improve generic device errors

2025-12-04 Thread Andrew Stubbs
Switching to use "generic" ISA variants has changed the error modes a bit. This patch changes the runtime so that it doesn't say to use the device-specific -march option when the real problem is not the ISA (it'll be a mismatched xnack setting, probably). Additionally, the testsuite effective tar

[PATCH] aarch64: Fix crc{,_rev}si4 expanders [PR122991]

2025-12-04 Thread Jakub Jelinek
Hi! The newly added gcc.dg/pr122991.c test fails also on aarch64. The problem is the same as on x86 which has been fixed in r16-5882, while the last operand is guaranteed to be a CONST_INT of the right mode initially, maybe_legitimize_operands can change that if some earlier operand has the same v

Re: [PATCH] [RFC v2][AutoFDO] Implement summary information in auto-profile

2025-12-04 Thread Jan Hubicka
> From: Dhruv Chawla > > This patch aims to implement summary support in auto-profile, similar to > LLVM. The summary information stores various information about the > profile being read such as the number of functions, the maximum sample > count, the total number of samples and so on. > > It a

Re: [PATCH] libstdc++: Fix debug mode for unordered cotnainers.

2025-12-04 Thread Jonathan Wakely
On Thu, 4 Dec 2025 at 15:10, Tomasz Kamiński wrote: > > The r16-5845-g8a2e6590cc4a2f changed the _Safe_container copy-assignment > to delegate to assigment of the _Base. However, _Safe_unordered_container_base > was not updated, and due the presence of move constructor, it's assignments > are > d

[PATCH] libstdc++: Fix debug mode for unordered cotnainers.

2025-12-04 Thread Tomasz Kamiński
The r16-5845-g8a2e6590cc4a2f changed the _Safe_container copy-assignment to delegate to assigment of the _Base. However, _Safe_unordered_container_base was not updated, and due the presence of move constructor, it's assignments are deleted, causing hard error for assignment of any unordered contain

Re: [PATCH 0/9] lto: Extended toplevel assembly

2025-12-04 Thread Andi Kleen
> I think so. We've been allowing that since forever before and before > toplevel asm was allowed to be extended asm in GCC 15, it was the only > way to get something with say immediate constants from the compiler. > So, the only thing that changed in GCC 15 for those is that now one can use > the

Re: [PATCH 0/9] lto: Extended toplevel assembly

2025-12-04 Thread Andi Kleen
On Thu, Dec 04, 2025 at 11:49:05AM +0100, Michal Jires wrote: > I now did build+link the kernel with allyesconfig and > -flto=partition=balanced (which is better for finding bugs). > > There are two issues interesting for GCC: > > 1) Do we give any guarantee in which section is toplevel assembly

[PATCH] gcc/testsuite/g++/bad-mapper-3.C: localhost might not be known

2025-12-04 Thread Ross Burton
The module-mapper uses Cody::OpenInet6 to open the connection to the host. However, some distributions (such as Ubuntu 24.04) only have a v4 address for localhost: $ grep localhost /etc/hosts 127.0.0.1 localhost ::1ip6-localhost ip6-loopback On these systems this test fails with "N

[PING^5][PATCH] [RFC v2][AutoFDO] Implement summary information in auto-profile

2025-12-04 Thread Dhruv Chawla
On 26/11/25 10:46, Dhruv Chawla wrote: External email: Use caution opening links or attachments On 17/11/25 09:18, Dhruv Chawla wrote: External email: Use caution opening links or attachments On 10/11/25 11:19, Dhruv Chawla wrote: External email: Use caution opening links or attachments O

Re: [PATCH 6/9] lto: Handle .local symbols in toplevel extended assembly

2025-12-04 Thread Jan Hubicka
> .local symbols cannot become global, so we have to use must_remain_in_tu. > > There is no way to mark declaration as both external and static/.local > in C. So we have to disable the implicit definition of static variables. > Also .local asm function still produces "used but never defined" warni

Re: [PATCH 1/9 v2] ipa: Add flag ref_by_asm to symtab_node

2025-12-04 Thread Michal Jires
On Thu, 2025-12-04 at 14:53:08 +0100, Jan Hubicka wrote: > > > ref_by_asm will be used by toplevel assembly to mark symbols that cannot > > be removed. > > It largely overlaps with force_output. Main difference is that ref_by_asm > > is meaningful on declarations by not removing them. force_output

Re: [PATCH 4/9] lto: Compute partition boundary with asm_nodes

2025-12-04 Thread Jan Hubicka
> Previous patch added asm_node streaming, so we need to add referenced > symbols to partition. > > asm_nodes must be added to partition before computing the boundary. > > gcc/ChangeLog: > > * lto-cgraph.cc (compute_ltrans_boundary): Add symbols > referenced from asm_nodes. > *

Re: [PATCH 3/9] lto: Stream toplevel extended assembly

2025-12-04 Thread Jan Hubicka
> Streaming of toplevel extended assembly was missing implementation. > > gcc/ChangeLog: > > * lto-streamer-in.cc (lto_input_asm_ref): New. > (lto_input_toplevel_asms): Input extended asm_node. > * lto-streamer-out.cc (lto_output_asm_ref): New. > (lto_is_streamable): Add A

Re: [PATCH v2] rtl-optimization: Fix BB edge ordering [PR122675]

2025-12-04 Thread Jan Hubicka
> Starting with r16-4438-ga93f80feeef744, the edges started to be sorted > in ascending order. Thus the most likely branches were deprioritized > instead of optimized to fallthroughs. > > Fix by restoring the sorting order prior to r16-4438-ga93f80feeef744. > > There are no regressions for C and

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

2025-12-04 Thread Qing Zhao
Hi, Joseph, Could you please review the 2nd version of this patch? Thanks. Qing > On Nov 25, 2025, at 09:49, Qing Zhao wrote: > > Hi, > > this is the 2nd version of the patch. > > compared to the first version, the major difference are: > > 1. more testing cases: > A. Support an untagge

Re: [PATCH v2] expr: Optimize (a * b) ==/!= 0 to logical checks [PR122935]

2025-12-04 Thread Richard Biener
On Thu, Dec 4, 2025 at 9:56 AM Dongyan Chen wrote: > > Hi, > Following the previous discussion, I do some implemention in expr.cc, > This location allows access to tree-level type information while still > enabling queries to target-specific costs. However, I have some concerns > regarding the cos

Ping *2 Re: [PATCH v5] Evaluate the object size by the size of the pointee type when the type is a structure with flexible array member which is annotated with counted_by.

2025-12-04 Thread Qing Zhao
This is a gentle ping of this patch. Thanks a lot. Qing > On Nov 20, 2025, at 16:46, Qing Zhao wrote: > > Hi, Jakub, > > Could you please review the middle-end part of the change of this patch? > (The C FE part has been approved by Joseph already. > And the middle-end part has been reviewed

Re: [Bug tree-optimization/109429] [PATCH v2] ivopts: fixed complexities

2025-12-04 Thread Richard Biener
On Wed, Dec 3, 2025 at 4:19 PM Aleksandar Rakic wrote: > > Hi Richard, > > Thank you for your feedback on the patch. I’d like to better understand > your point about this being considered an “unrelated change.” > > Could you please explain why distributing the invariant to > `parts.offset` in the

Re: [PATCH 3/4] ipa-cp: Multiple sweeps over the call-graph in the decision stage

2025-12-04 Thread Martin Jambor
Hello, and ping, please. Martin On Sun, Nov 16 2025, Martin Jambor wrote: > Hi, > > currently, IPA-CP makes only one sweep in the decision stage over the > call-graph, meaning that some clonin , even if relatively cheap, may > not be performed because the pass runs out of the overall growth > b

Re: [PATCH 4/4] ipa-cp: Better opportunity evaluation and ranking

2025-12-04 Thread Martin Jambor
Hello, On Sun, Nov 16 2025, Martin Jambor wrote: > Hi, > > this modifies the decision making stage of IPA-CP in two ways: > I'd like to ping this patch. I have however fixed an omission in a checking assert, so I'm reposting the updated patch below. Thanks, Martin This modifies the decision

[PATCH] c++/modules: Don't build STAT_HACKs for current TU namespace bindings [PR122995]

2025-12-04 Thread Nathaniel Shead
Bootstrapped and regtested (so far just modules.exp) on x86_64-pc-linux-gnu, OK for trunk if full regtest succeeds? -- >8 -- The issue in the PR is that we're checking if the binding entity for the current TU matches the namespace we're pushing. In this case the slot however is a STAT_HACK we cr

Re: [PATCH 2/4] ipa-cp: Move decision to clone for all contexts to decision stage

2025-12-04 Thread Martin Jambor
Hello, and ping, please. Martin On Sun, Nov 16 2025, Martin Jambor wrote: > Hi, > > currently, IPA-CP makes decisions to clone a function for all (known) > contexts in the evaluation phase, in a separate sweep over the call > graph from the decisions about cloning for values available only in >

Re: [PATCH 3/3] ipa-devirt: Add speculative direct calls based on stores to structures

2025-12-04 Thread Martin Jambor
On Wed, Oct 29 2025, Martin Jambor wrote: > Hi, > > this patch extends the ipa-devirt pass with the ability to add > speculative calls for indirect calls where the target was loaded from > a record_type data structure and we have seen writes of address of > only one particular function to the same

Re: [PATCH 2/9] ipa: Analyze toplevel extended assembly

2025-12-04 Thread Jan Hubicka
> Analyzes references from toplevel extended assembly. > > We cannot perform IPA optimizations with toplevel assembly, so > symtab_node only needs ref_by_asm to know that it should not be removed. > > PR ipa/122458 > > gcc/ChangeLog: > > * Makefile.in: Add new file. > * cgraph

Re: [PATCH 1/4] ipa-cp: Use the VR and bits lattices for clones of non-local functions too

2025-12-04 Thread Martin Jambor
Hello, and ping, please. Martin On Sun, Nov 16 2025, Martin Jambor wrote: > Hi, > > since the IPA-CP lattices for value ranges cannot hold more values and > don't have any "variable" flag, we initialize them to bottom for > non-local nodes. However, that means we don't make use of known > info

Re: [PATCH][v3] Select both inbranch and notinbranch clone during SIMD call analysis

2025-12-04 Thread Jakub Jelinek
On Thu, Dec 04, 2025 at 03:00:22PM +0100, Richard Biener wrote: > > The logic with the above hunk in the patch was that we're going to > > use the inbranch clone only iff LOOP_VINFO_FULLY_MASKED_P, so it's > > OK to always apply this penalty (if that very penalty there makes > > sense at all, which

Re: [PATCH 2/3] cgraph: cgraph_indirect_call_info into a class hierachy

2025-12-04 Thread Martin Jambor
Hello, ping, please. Martin On Wed, Oct 29 2025, Martin Jambor wrote: > Hi, > > currently, an instance of cgraph_indirect_call_info is allocated for > each indirect call and it contains fields which are only usable for > some kinds of calls. The most special are polymorphic calls > representin

Re: [PATCH] optabs: Add else operand to LEN_LOAD.

2025-12-04 Thread Richard Biener
On Sat, Nov 29, 2025 at 3:56 PM Robin Dapp wrote: > > Hi, > > When adding else operands to maskload and friends we didn't bother to do > the same for len_load (as we never use the residual elements anyway). > In order to simplify handling in gimple-fold, this patch adds the else > operand now. Bo

Re: [PATCH] fold: Elide MASK_LEN_LOAD/STORE with zero length [PR122635].

2025-12-04 Thread Richard Biener
On Sat, Nov 29, 2025 at 3:53 PM Robin Dapp wrote: > > > I think this is better, but I'd make this partial_store_elidable_p only and > > for > > loads replace with 'else'? Alternatively rename it to > > partial_load_store_all_lanes_masked_p > > or so? Btw, I see we're oddly rejecting any mask !=

Re: [PATCH v2] doc: Stop connecting FENV_ACCESS with -f{rounding, trapping}-math [PR 34678]

2025-12-04 Thread Richard Biener
On Fri, Nov 28, 2025 at 8:17 AM Xi Ruoyao wrote: > > The current wording is misleading because even the combination of > -frounding-math and -ftrapping-math still doesn't provide the semantics > required by FENV_ACCESS on. It can confuse people and prompt them to > submit more duplicates of PR 34

Re: [PATCH v2] match.pd: x&c ?(x op c):(x|c) -> x^c [PR122615, PR122616]

2025-12-04 Thread Richard Biener
On Fri, Nov 28, 2025 at 2:04 AM Daniel Barboza wrote: > > Add a single pattern to reduce these patterns to "x ^ c": > > x & c ? (x - c) | (x | c) > x & c ? (x & ~c) | (x | c) > > As long as "c" has a single bit set. OK Thanks, Richard. > PR 122615 > PR 122616 > > gcc/ChangeLog:

Re: [PATCH v3] ipa/122798: Adjust local and address_taken flags for callback clones.

2025-12-04 Thread Jan Hubicka
> Hi, > this is the third version of this patch (v2: > https://gcc.gnu.org/pipermail/gcc-patches/2025-December/702508.html). > I changed set_new_clone_decl_and_node_flags to set local to true iff > there are no references to the new node, which is not the case for > callback clones. The flag has t

Re: [PATCH][v3] Select both inbranch and notinbranch clone during SIMD call analysis

2025-12-04 Thread Richard Biener
On Fri, 28 Nov 2025, Richard Biener wrote: > On Thu, 27 Nov 2025, Jakub Jelinek wrote: > > > On Thu, Nov 27, 2025 at 02:50:11PM +0100, Richard Biener wrote: > > > --- a/gcc/tree-vect-stmts.cc > > > +++ b/gcc/tree-vect-stmts.cc > > > @@ -4222,9 +4222,12 @@ vectorizable_simd_clone_call (vec_info *v

Re: [PATCH 1/9] c++: C++26 Reflection [PR120775]

2025-12-04 Thread Jakub Jelinek
On Thu, Dec 04, 2025 at 02:09:21PM +0100, Jakub Jelinek wrote: > FAIL: g++.dg/reflect/enumerators_of1.C -std=c++26 (test for excess errors) > FAIL: g++.dg/reflect/p2996-17.C -std=c++26 (test for excess errors) Added now following which also fail with the metafns_called = true; line commented out

Re: [PATCH 1/9 v2] ipa: Add flag ref_by_asm to symtab_node

2025-12-04 Thread Jan Hubicka
> Only differences in v2 are in symbol_table::remove_unreachable_nodes, > see comment below. > > --- > > ref_by_asm will be used by toplevel assembly to mark symbols that cannot > be removed. > It largely overlaps with force_output. Main difference is that ref_by_asm > is meaningful on declaratio

Re: [PATCH] Ada, Darwin: Implement OSLock for Darwin [PR115305].

2025-12-04 Thread Arnaud Charlet
Sorry, another nitpick: > --- /dev/null > +++ b/gcc/ada/libgnat/s-oslock__darwin.ads > @@ -0,0 +1,57 @@ > +-- > +-- > -- > +-- GNAT

[PATCH] c++/modules: Ignore exposures in lambdas in initializers [PR122994]

2025-12-04 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- As the PR rightly points out, a lambda is not really a declaration in and of itself by the standard, and so a lambda only used in a context where exposures are ignored should not itself cause an error. This patch implement

Re: [PATCH] Ada, Darwin: Implement OSLock for Darwin [PR115305].

2025-12-04 Thread Arnaud Charlet
> > I finally got a chance to take a look at this issue and it turned out to > be as you suspected in the PR comments. The assumed Posix layout of the > pthread_mutex_t does not match that used by Darwin. I wonder, in passing > how the 64b implementations happen to work (and also if there are an

Re: [PATCH 1/9] c++: C++26 Reflection [PR120775]

2025-12-04 Thread Jakub Jelinek
On Sat, Nov 29, 2025 at 06:37:03PM +0530, Jason Merrill wrote: > > > > + /* Some metafunctions aren't dependent just on their arguments, but > > > > also > > > > + on various other dependencies, e.g. has_identifier on a function > > > > parameter > > > > + reflection can change depending

Re: [r16-5879 Regression] FAIL: gcc.dg/asm-hard-reg-9.c (test for excess errors) on Linux/x86_64

2025-12-04 Thread Stefan Schulze Frielinghaus
Hi, Fixed in r16-5885-g409114931c8. Sorry for the noise. Cheers, Stefan On Thu, Dec 04, 2025 at 07:45:30PM +0800, Haochen Jiang wrote: > On Linux/x86_64, > > 55cc4377a310f00b0790eb2ab218fe130f63a408 is the first bad commit > commit 55cc4377a310f00b0790eb2ab218fe130f63a408 > Author: Stefan Schu

[PATCH v2] aarch64: Add support for C1 cores

2025-12-04 Thread Ezra.Sitorus
From: Ezra Sitorus Add support for C1-Nano, C1-Pro, C1-Premium and C1-Ultra. gcc/ChangeLog: * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add C1-Nano, C1-Pro, C1-Premium and C1-Ultra. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Document

[COMMITTED,PATCH] i386: Fix gcc.dg/asm-hard-reg-9.c

2025-12-04 Thread Stefan Schulze Frielinghaus
From: Stefan Schulze Frielinghaus The testcase introduced in r16-5879-g55cc4377a31 was ment for 64-bit only because it is referencing register r8. Fixed by restricting it to lp64. gcc/testsuite/ChangeLog: * gcc.dg/asm-hard-reg-9.c: Restrict to lp64 x86_64. --- gcc/testsuite/gcc.dg/asm

Re: [PATCH] MinGW: Fix native TLS bug with -fdata-sections

2025-12-04 Thread Eric Botcazou
> This matches Clang output here: https://gcc.godbolt.org/z/fMEjTEEad Indeed, thanks! -- Eric Botcazou

Re: [PATCH] MinGW: Fix native TLS bug with -fdata-sections

2025-12-04 Thread LIU Hao
在 2025-12-4 20:39, Eric Botcazou 写道: Hi, The problem comes from a quirk of the GNU PE-COFF linker, which wants to make sure that .tls$ZZZ is laid out last among the TLS sections, but first globs all .tls$* sections together. The solution reportedly matches Clang's output. Tested on x86_64-w64-

[PATCH] MinGW: Fix native TLS bug with -fdata-sections

2025-12-04 Thread Eric Botcazou
Hi, The problem comes from a quirk of the GNU PE-COFF linker, which wants to make sure that .tls$ZZZ is laid out last among the TLS sections, but first globs all .tls$* sections together. The solution reportedly matches Clang's output. Tested on x86_64-w64-mingw32, OK for the mainline? 2025-

Re: [PATCH v3] ipa/122798: Adjust local and address_taken flags for callback clones.

2025-12-04 Thread Martin Jambor
Hi, On Wed, Dec 03 2025, Josef Melcr wrote: > Hi, > this is the third version of this patch (v2: > https://gcc.gnu.org/pipermail/gcc-patches/2025-December/702508.html). > I changed set_new_clone_decl_and_node_flags to set local to true iff > there are no references to the new node, which is not th

Re: [PATCH] Ada, Darwin: Implement OSLock for Darwin [PR115305].

2025-12-04 Thread Eric Botcazou
> I finally got a chance to take a look at this issue and it turned out to > be as you suspected in the PR comments. The assumed Posix layout of the > pthread_mutex_t does not match that used by Darwin. I wonder, in passing > how the 64b implementations happen to work (and also if there are any >

Re: [PATCH v3] libstdc++: Convertibility of rank == 0 layouts, LWG4272.

2025-12-04 Thread Jonathan Wakely
On Thu, 4 Dec 2025 at 12:05, Tomasz Kamiński wrote: > > From: Luc Grosheintz > > LWG4272 proposes to add a condition for convertibility from > layout_stride::mapping to other mappings. New conversion requires > both that rank == 0 and that the extent types are convertible. > > LWG4272 also propos

[committed] amdgcn, libgomp: use xfail for gfx908 requires tests

2025-12-04 Thread Andrew Stubbs
Use a different way to remove the "FAIL" cases for gfx908. It really isn't working with fall-back, as intended, so XFAIL is appropriate. libgomp/ChangeLog: * testsuite/libgomp.c-c++-common/requires-4.c: Change dg-excess-errors to dg-xfail-if. * testsuite/libgomp.c-c++-com

[PATCH v3] libstdc++: Convertibility of rank == 0 layouts, LWG4272.

2025-12-04 Thread Tomasz Kamiński
From: Luc Grosheintz LWG4272 proposes to add a condition for convertibility from layout_stride::mapping to other mappings. New conversion requires both that rank == 0 and that the extent types are convertible. LWG4272 also proposes to add the same condition for conversion of padded layouts, i.e.

Re: [RFC] Pattern matching on plain emulation of 64x64->128 integer multiplication

2025-12-04 Thread Richard Biener
On Thu, Dec 4, 2025 at 10:38 AM Feng Xue OS wrote: > > >> > >> A possible approach to reference is detection of tabled-based CTZ in > >> ssa-forward pass, which might be a suitable position for this pattern, in > >> that ssa-forward pass is invoked more than one time, some happen before > >> re

Atomic FP fetch_add/fetch_sub design (after fetch_min/fetch_max discussion)

2025-12-04 Thread Matthew Malcomson
Hello all, After Jakub requested a redesign for the Atomic fetch_min/fetch_max work that Soumya has been working on I saw that the points he raised apply to the patches I'd done earlier around floating point atomic fetch_add/fetch_sub. I would like to double-check what approach these floatin

[r16-5879 Regression] FAIL: gcc.dg/asm-hard-reg-9.c (test for excess errors) on Linux/x86_64

2025-12-04 Thread Haochen Jiang
On Linux/x86_64, 55cc4377a310f00b0790eb2ab218fe130f63a408 is the first bad commit commit 55cc4377a310f00b0790eb2ab218fe130f63a408 Author: Stefan Schulze Frielinghaus Date: Thu Dec 4 09:36:24 2025 +0100 lra: Honor exclude start regs while reusing reloads caused FAIL: gcc.dg/asm-hard-reg-9

Re: [PATCH] libstdc++: Fix node-base containers copy and move constructor in debug mode.

2025-12-04 Thread Jonathan Wakely
On Thu, 4 Dec 2025 at 11:24, Tomasz Kamiński wrote: > > The fixes regression from r16-5845-g8a2e6590cc4a2f that added an move > assignment operator to the _Safe_node_sequence, and made the class both > non move and copy constructible (copy is deleted, move is not declared). > In consequence debug

Re: [PATCH] contrib: Skip libstdc++ files in check_GNU_style.py

2025-12-04 Thread Christophe Lyon
On Thu, 4 Dec 2025 at 11:55, Jonathan Wakely wrote: > > The libstdc++ style is different from the rest of GCC, so do not apply > the checks to libstdc++ files in a patch. > > contrib/ChangeLog: > > * check_GNU_style_lib.py (check_GNU_style_file): Do not check > libstdc++ files. > -

[PATCH] libstdc++: Fix node-base containers copy and move constructor in debug mode.

2025-12-04 Thread Tomasz Kamiński
The fixes regression from r16-5845-g8a2e6590cc4a2f that added an move assignment operator to the _Safe_node_sequence, and made the class both non move and copy constructible (copy is deleted, move is not declared). In consequence debug version of node containers, that define they copy and move as d

Re: [PATCH] i386: Fix crc_revsi4 expander [PR122991]

2025-12-04 Thread Uros Bizjak
On Thu, Dec 4, 2025 at 11:52 AM Jakub Jelinek wrote: > > Hi! > > The following testcase ICEs on x86_64, because the crc_rev_optab expander > assumes the last operand will be a CONST_INT. That assumption comes from > it being created with > rtx polynomial; > if (TREE_CODE (rhs3) != INTEGER_CST

  1   2   >