[PATCH] c++/modules: Reattempt to complete ARRAY_TYPEs after reading a cluster [PR122922]

2025-12-05 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk/15? -- >8 -- The PR raises an issue where we complain about value-initializing an incomplete array type, where the element type is a complete type. Here, the friend declaration brings TTensor<0> and TTensor<1> into the same cluster,

Re: [PATCH] [riscv] avoid auipc overflow with large offsets [PR91420]

2025-12-05 Thread Jeff Law
On 10/26/25 2:34 PM, Alexandre Oliva wrote: On Oct 26, 2025, Jeff Law wrote: Fundamentally we can't know if things work until link time, right, *nod* I'd be inclined say these things aren't well defined in the smaller code models. If we can do something that works reliably and is effic

Re: [PATCH] prepare-commit-msg: Add compatibility check for --default-prefix option

2025-12-05 Thread Jeff Law
On 11/27/25 6:52 AM, [email protected] wrote: From: Mark Zhuang The previous commit added --default-prefix to handle non-default git prefix configurations, but this option is not available in older git versions. This patch adds a compatibility check. contrib/ChangeLog:

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

2025-12-05 Thread Jeff Law
On 11/26/25 7:45 PM, Kalvis Duckmanton wrote: On 26/11/25 11:15, Jeff Law wrote: On 11/18/25 7:41 PM, Kalvis Duckmanton wrote: 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 add

Re: [RFA][PR target/121778] Improving rotation detection

2025-12-05 Thread Jeff Law
On 11/30/25 6:53 PM, Oleg Endo wrote: Hi Jeff, On Sun, 2025-11-30 at 15:33 -0700, Jeff Law wrote: We don't bother with the transformation when the XOR is flipping a bit known to be zero (ie, a high bit of the result of the right shift or a low bit on the result of the left shift). For those

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

2025-12-05 Thread Jeff Law
On 11/29/25 1:24 AM, Dimitar Dimitrov wrote: Starting with r16-4438-ga93f80feeef744, the edge sorting order was switched to lowest execution frequency first. But the "bbro" optimization pass chooses the first edge as a fallthrough. Thus the most unlikely branches were optimized to fallthroug

Re: [PATCH] match.pd: (c?a:b) op d -> c ? (a op d):(b op d) [PR122608]

2025-12-05 Thread Andrew Pinski
On Fri, Dec 5, 2025 at 6:57 PM Andrew Pinski wrote: > > On Fri, Dec 5, 2025 at 1:11 PM Daniel Henrique Barboza > wrote: > > > > Hi, > > > > On 12/2/25 5:46 PM, Andrew Pinski wrote: > > > On Tue, Dec 2, 2025 at 12:11 PM Daniel Barboza > > > wrote: > > >> > > >> Add a pattern to handle cases where

Re: [PATCH] gcov: Split atomic bitwise-or for some targets

2025-12-05 Thread Jeff Law
On 12/5/25 3:59 AM, Sebastian Huber wrote: - Am 12. Sep 2025 um 5:13 schrieb Sebastian Huber [email protected]: - Am 10. Jul 2025 um 7:53 schrieb Sebastian Huber [email protected]: There are targets, which only offer 32-bit atomic operations (for

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

2025-12-05 Thread Jeff Law
On 12/4/25 10:18 AM, Dimitar Dimitrov wrote: 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

Re: contrib: Set more site.exp variables in test_installed

2025-12-05 Thread Jeff Law
On 12/4/25 12:06 PM, Joseph Myers wrote: 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 d

Re: [PATCH] match.pd: (c?a:b) op d -> c ? (a op d):(b op d) [PR122608]

2025-12-05 Thread Andrew Pinski
On Fri, Dec 5, 2025 at 1:11 PM Daniel Henrique Barboza wrote: > > Hi, > > On 12/2/25 5:46 PM, Andrew Pinski wrote: > > On Tue, Dec 2, 2025 at 12:11 PM Daniel Barboza > > wrote: > >> > >> Add a pattern to handle cases where we have an OP that is > >> unconditionally being applied in the result of

Re: [PUSHED] testsuite: Fix pr99782-1.c for targets that don't support int128

2025-12-05 Thread Andrew Pinski
On Fri, Dec 5, 2025 at 4:11 PM Jakub Jelinek wrote: > > On Fri, Dec 05, 2025 at 01:32:28PM -0800, Andrew Pinski wrote: > > When I wrote this testcase I forgot to check if the target > > supports __int128. This adds the simple check. > > There is not just that. > > dg-compile is not a valid directi

[COMMITTED] a68: handle intTI_type_node in a68_type_for_size

2025-12-05 Thread Jose E. Marchesi
gcc/algol68/ChangeLog PR algol68/123007 * a68-lang.cc (a68_type_for_size): Handle intTI_type_node. --- gcc/algol68/a68-lang.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/algol68/a68-lang.cc b/gcc/algol68/a68-lang.cc index 8ba0259ce29..f5f316a3fdb 100644 --- a/gcc

Re: [PUSHED] testsuite: Fix pr99782-1.c for targets that don't support int128

2025-12-05 Thread Jakub Jelinek
On Fri, Dec 05, 2025 at 01:32:28PM -0800, Andrew Pinski wrote: > When I wrote this testcase I forgot to check if the target > supports __int128. This adds the simple check. There is not just that. dg-compile is not a valid directive. I've added some cleanups too. Tested on x86_64-linux and i686-

Re: [PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Jonathan Wakely
On Fri, 5 Dec 2025, 15:26 Patrick Palka, wrote: > On Fri, 5 Dec 2025, Tomasz Kaminski wrote: > > > Just one small suggestion, otherwise LGTM. > > > > On Fri, Dec 5, 2025 at 3:57 PM Patrick Palka wrote: > > Tested on x86_64-pc-linu-xgnu, does this look OK for trunk? > Nice way to fix this.

[PATCH] ipa: Be strict about context speculation in IPA-CP

2025-12-05 Thread Martin Jambor
Hi, ipa_polymorphic_call_context::equal_to happily ignores the speculative part of the context if it is inconsistent with the known part. While this is OK for uses outside of IPA-CP, for this pass it cannot be done because it happily drops the non-speculative part when jump functions are not know

Re: [PATCH] docs: Document -fdump-tree--alias

2025-12-05 Thread Andrew Pinski
On Fri, Dec 5, 2025 at 3:06 AM Filip Kastl wrote: > > On Fri 2025-12-05 11:25:18, Jakub Jelinek wrote: > > On Fri, Dec 05, 2025 at 11:03:09AM +0100, Filip Kastl wrote: > > > Describe the -alias option for the -fdump-tree flag. > > > > > > gcc/ChangeLog: > > > > > > * doc/invoke.texi: Document

Re: [PATCH] libstdc++: std::atomic should use std::addressof

2025-12-05 Thread Patrick Palka
LGTM On Fri, 5 Dec 2025, Jonathan Wakely wrote: > libstdc++-v3/ChangeLog: > > * include/bits/atomic_wait.h (__detail::__atomic_eq): Use > std::addressof instead of &. > * include/std/atomic (atomic::wait, atomic::notify_one) > (atomic::notify_all): Likewise. > --- > > Te

[PUSHED] testsuite: Fix pr99782-1.c for targets that don't support int128

2025-12-05 Thread Andrew Pinski
When I wrote this testcase I forgot to check if the target supports __int128. This adds the simple check. Pushed as obvious after testing the testcase. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr99782-1.c: Require intt128 target. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/

Re: [PATCH] match.pd: (c?a:b) op d -> c ? (a op d):(b op d) [PR122608]

2025-12-05 Thread Daniel Henrique Barboza
Hi, On 12/2/25 5:46 PM, Andrew Pinski wrote: On Tue, Dec 2, 2025 at 12:11 PM Daniel Barboza wrote: Add a pattern to handle cases where we have an OP that is unconditionally being applied in the result of a gcond. In this case we can apply OP to both legs of the conditional. E.g: t = b ? 10 :

Re: [PATCH v4] arm.cc: fix thumb1 size-optimized function prolog violates -ffixed-rX [PR117366]

2025-12-05 Thread Matt Parks
Thanks for the feedback. If I can change the test to avoid r7 (demonstrate issue with only r4/r5/r6) will that be sufficiently robust, or do you know of any other potential sensitivity to compiler flags? Matt > On 12/03/2025 5:13 AM EST Richard Earnshaw (foss) > wrote: > > > On 14/10/2025 1

Re: [PATCH 3/4]AArch64: Add support for boolean reductions for Adv. SIMD

2025-12-05 Thread Andrew Pinski
On Mon, Oct 20, 2025 at 11:28 PM Tamar Christina wrote: > > The vectorizer has learned how to do boolean reductions of masks to a C bool > for the operations OR, XOR and AND. > > This implements the new optabs for Adv.SIMD. Adv.SIMD today can already > vectorize such loops but does so through SHI

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

2025-12-05 Thread Marek Polacek
On Sun, Nov 30, 2025 at 11:00:03PM +0530, Jason Merrill wrote: > And some further feedback: > > > +cp_parser_reflect_expression (cp_parser *parser) > > +{ > > + if (!flag_reflection) > > +{ > > + error_at (cp_lexer_peek_token (parser->lexer)->location, > > + "reflection is only

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

2025-12-05 Thread Marek Polacek
On Fri, Nov 28, 2025 at 08:25:05AM +0530, Jason Merrill wrote: > On 11/15/25 6:04 AM, Marek Polacek wrote: > > This patch contains the middle-end, libcpp/, c-family/, and cp/ bits > > (besides reflect.cc and the gperf bits). > > > +/* In TREE_VALUE of an attribute this means the attribute argument

[PATCH] c: ICE in gimplify_expr when counted_by for pointer is added [PR122982]

2025-12-05 Thread Qing Zhao
The first argument of the call to .ACCESS_WITH_SIZE includes "c_maybe_const_expr" which should not be passed to gimplifier. Before passing the expression as the first argument to the call to .ACCESS_WITH_SIZE, c_fully_fold should be called on this expression. Bootstrappped and regression tested o

Re: [PATCH 3/5] libstdc++: Add platform wait functions for darwin [PR120527]

2025-12-05 Thread Iain Sandoe
Hi Jonathan, As discussed off-list, here are my findings about implementing this on Darwin (presented here for the search engine record). > On 26 Nov 2025, at 09:48, Jonathan Wakely wrote: > > On Tue, 25 Nov 2025 at 21:08, Jonathan Wakely wrote: >> >> This defines __platform_wait, __platform_

[pushed][PR122215, IRA]: Fix undefined behaviour of improve_allocation

2025-12-05 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122215 The patch was successfully bootstrapped and tested on x86-64. commit 6ca1fb648daecaa9c843ff05af304c1fc1a8fcb5 Author: Vladimir N. Makarov Date: Fri Dec 5 14:21:38 2025 -0500 [PR122215, IRA]: Fix undefined behav

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

2025-12-05 Thread Harald Anlauf
Hi Paul, Steve, Am 05.12.25 um 08:36 schrieb Paul Richard Thomas: Hi Harald, I see that Steve has OK'd it on the PR. It looks good to me too. thanks to both of you for the review! Pushed as r16-5923-gee9ded19244ab8 so far. Harald Regards Paul On Thu, 4 Dec 2025 at 21:26, Harald Anlauf

Re: [PATCH 2/2] tail-merge: Combine sequential comparisons leading to the merged block

2025-12-05 Thread Andrew Pinski
On Fri, Dec 5, 2025 at 8:57 AM Konstantinos Eleftheriou wrote: > > If we consider code like: > > if (bar1 == x) > return foo(); > if (bar2 != y) > return foo(); > return 0; > > We would like the ifcombine pass to convert this to: > > if (bar1 == x || bar2 != y) >

Re: [Patch, fortran] PRs 122578, 122669, 122670 & 122693

2025-12-05 Thread Jerry D
=== gfortran Summary === # of expected passes74558 # of expected failures 343 # of unsupported tests 82 /home/jerry/dev/objdir/gcc/gfortran version 16.0.0 20251205 (experimental) (GCC)

[PATCH] libstdc++: Move std::cmp_equal, std::cmp_less etc. to new file

2025-12-05 Thread Jonathan Wakely
This allows the [utility.intcmp] functions to be used without including all of . libstdc++-v3/ChangeLog: * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/std/latch: Include instead of . * include/std/utility: Include .

[PATCH] libstdc++: std::atomic should use std::addressof

2025-12-05 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/atomic_wait.h (__detail::__atomic_eq): Use std::addressof instead of &. * include/std/atomic (atomic::wait, atomic::notify_one) (atomic::notify_all): Likewise. --- Tested x86_64-linux. libstdc++-v3/include/bits/atomic_wait.h

[committed] libstdc++/testsuite: Fix malformed dg-error directive

2025-12-05 Thread Patrick Palka
libstdc++-v3/ChangeLog: * testsuite/20_util/function_objects/bind_front/111327.cc: Add missing space before } ending a dg-error directive. --- .../testsuite/20_util/function_objects/bind_front/111327.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libst

[PATCH v3 06/14] vect: guard niters manipulation with `LOOP_VINFO_NITERS_UNCOUNTED_P'

2025-12-05 Thread Victor Do Nascimento
New in this revision: Update patch to function correctly with contributions made by `vect: support vectorization of early break forced live IVs as scalar' commit. Regression tested with both AArch64 and x86_64, no new regressions. --- In `vect_do_peeling' and `vect_transform_loop', there are

Re: [PATCH 0/2] Enable ccmp generation on comparisons leading to equal blocks [PR102793]

2025-12-05 Thread Konstantinos Eleftheriou
That's an alternative for https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648856.html, based on the feedback. Konstantinos. On Fri, Dec 5, 2025 at 6:53 PM Konstantinos Eleftheriou < [email protected]> wrote: > > This patch series updates the tail-merging pass so that sequent

[PATCH 2/2] tail-merge: Combine sequential comparisons leading to the merged block

2025-12-05 Thread Konstantinos Eleftheriou
If we consider code like: if (bar1 == x) return foo(); if (bar2 != y) return foo(); return 0; We would like the ifcombine pass to convert this to: if (bar1 == x || bar2 != y) return foo(); return 0; The ifcombine pass can handle this transformation but it i

[PATCH 1/2] ifcombine: Add tree-ssa-ifcombine.h and update function signatures

2025-12-05 Thread Konstantinos Eleftheriou
This patch adds the tree-ssa-ifcombine.h header file, with the function declarations for `recognize_if_then_else` and `same_phi_args_p` and removes 'static' from the definitions in tree-ssa-ifcombine.cc, so that they can be used in other passes. gcc/ChangeLog: * tree-ssa-ifcombine.cc (rec

[PATCH 0/2] Enable ccmp generation on comparisons leading to equal blocks [PR102793]

2025-12-05 Thread Konstantinos Eleftheriou
This patch series updates the tail-merging pass so that sequential comparisons leading to equal blocks can be merged, allowing the generation of a ccmp instruction on targets that support it. We needed to use ifcombine's `same_phi_args_p` and `recognize_if_then_else` functions. So, a new header

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

2025-12-05 Thread Jason Merrill
On 11/30/25 11:00 PM, Jason Merrill wrote: On 11/29/25 7:04 PM, Jakub Jelinek wrote: On Sat, Nov 29, 2025 at 06:37:03PM +0530, Jason Merrill wrote: Unfortunately it is not.  ATTR_ID here is just the attribute name, so lookup_attribute_spec attempts to find it in the gnu namespace rather than

[PATCH v1 0/1] arm: avoid invalid shift in arm_canonicalize_comparison [PR122999]

2025-12-05 Thread Richard Earnshaw via Sourceware Forge
Hi gcc-patches mailing list, Richard Earnshaw has requested that the following forgejo pull request be published on the mailing list. Created on: 2025-12-05 16:36:37+00:00 Latest update: 2025-12-05 16:39:42+00:00 Changes: 1 changed files, 7 additions, 2 deletions Head revision: rearnsha/gcc-TEST

[PATCH v1 1/1] arm: avoid invalid shift in arm_canonicalize_comparison [PR122999]

2025-12-05 Thread Richard Earnshaw via Sourceware Forge
From: Richard Earnshaw There was UB in arm_canonicalize_comparison if it is called with both operands of type VOIDmode. Avoid this by first handling floating-point types, then returning if we are left with anything other than an integer mode. For belt-and-braces also check that the mode does n

Re: [PATCH] libstdc++: Implement P2404R3 relaxations to comparable_with concepts [PR122946]

2025-12-05 Thread Tomasz Kaminski
On Fri, Dec 5, 2025 at 4:38 PM Jonathan Wakely wrote: > This implements the C++23 proposal P2404R3 "Move-only types for > equality_comparable_with, totally_ordered_with, and > three_way_comparable_with". As agreed with the maintainers of libc++ and > MSVC STL, we treat this as a DR for C++20. It

Re: [PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Patrick Palka
On Fri, 5 Dec 2025, Tomasz Kaminski wrote: > > > On Fri, Dec 5, 2025 at 4:26 PM Patrick Palka wrote: > On Fri, 5 Dec 2025, Tomasz Kaminski wrote: > > > Just one small suggestion, otherwise LGTM. > > > > On Fri, Dec 5, 2025 at 3:57 PM Patrick Palka > wrote: > > 

[PATCH] libstdc++: Implement P2404R3 relaxations to comparable_with concepts [PR122946]

2025-12-05 Thread Jonathan Wakely
This implements the C++23 proposal P2404R3 "Move-only types for equality_comparable_with, totally_ordered_with, and three_way_comparable_with". As agreed with the maintainers of libc++ and MSVC STL, we treat this as a DR for C++20. It allows reasonable code to compile which wasn't originally allowe

Re: [PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Tomasz Kaminski
On Fri, Dec 5, 2025 at 4:26 PM Patrick Palka wrote: > On Fri, 5 Dec 2025, Tomasz Kaminski wrote: > > > Just one small suggestion, otherwise LGTM. > > > > On Fri, Dec 5, 2025 at 3:57 PM Patrick Palka wrote: > > Tested on x86_64-pc-linu-xgnu, does this look OK for trunk? > > > > -- >8

Re: [PATCH v4 1/5] libstdc++: Implement submdspan and submdspan_mapping for layout_left. [PR110352]

2025-12-05 Thread Luc Grosheintz
On 12/5/25 11:04, Tomasz Kaminski wrote: On Thu, Dec 4, 2025 at 10:34 PM Luc Grosheintz wrote: 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 t

Re: [PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Patrick Palka
On Fri, 5 Dec 2025, Tomasz Kaminski wrote: > Just one small suggestion, otherwise LGTM. > > On Fri, Dec 5, 2025 at 3:57 PM Patrick Palka wrote: > Tested on x86_64-pc-linu-xgnu, does this look OK for trunk? > > -- >8 -- > > Implement the cv-qual forwarding required by std::bin

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

2025-12-05 Thread Qing Zhao
> On Dec 4, 2025, at 18:43, Joseph Myers wrote: > > 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

Re: [PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Tomasz Kaminski
On Fri, Dec 5, 2025 at 4:06 PM Tomasz Kaminski wrote: > Just one small suggestion, otherwise LGTM. > > On Fri, Dec 5, 2025 at 3:57 PM Patrick Palka wrote: > >> Tested on x86_64-pc-linu-xgnu, does this look OK for trunk? >> >> -- >8 -- >> >> Implement the cv-qual forwarding required by std::bind

Re: [PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Tomasz Kaminski
Just one small suggestion, otherwise LGTM. On Fri, Dec 5, 2025 at 3:57 PM Patrick Palka wrote: > Tested on x86_64-pc-linu-xgnu, does this look OK for trunk? > > -- >8 -- > > Implement the cv-qual forwarding required by std::bind using deducing > this when available, instead of needing 4 operator

[PATCH] libstdc++: Use deducing this in std::bind when available [PR80564]

2025-12-05 Thread Patrick Palka
Tested on x86_64-pc-linu-xgnu, does this look OK for trunk? -- >8 -- Implement the cv-qual forwarding required by std::bind using deducing this when available, instead of needing 4 operator() overloads. Using deducing this here is more complicated here than in other call wrappers because std::bi

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

2025-12-05 Thread Jakub Jelinek
On Thu, Dec 04, 2025 at 02:09:21PM +0100, Jakub Jelinek wrote: > For those we only clear the cv_cache and fold_cache. We never clear > constexpr_call_table. > So, do you want to clear the whole constexpr_call_cache if (flag_reflection) > in the various cases that can change the metafunction behavi

Re: [PATCH v4 0/5] libstdc++: submdspan (part 2)

2025-12-05 Thread Tomasz Kaminski
The implementation looks solid now, only very small comments there. Please add a patch updating feature test macro, my preference would be to keep internal padded layouts FTM and give it a value 202403, with comment that corresponds to new layouts part of https://www.open-std.org/jtc1/sc22/wg21/doc

[committed] gomp/dyn_groupprivate-1.f90: Fix scan-tree-dump-times regex (was: [r16-5899 Regression] FAIL: gfortran.dg/gomp/dyn_groupprivate-1.f90 -O scan-tree-dump-times original "#pragma omp target d

2025-12-05 Thread Tobias Burnus
Haochen Jiang wrote: caused FAIL: gfortran.dg/gomp/dyn_groupprivate-1.f90 -O scan-tree-dump-times original "#pragma omp target dyn_groupprivate\\(D.4680\\)" 1 When updating for other things, the 'D.[0-9]+' was replaced by D.4680, which is prone to fail. Fixed in r16-5913-g1c78abfd19fe5

Re: [PATCH] libgomp, amdgcn, nvptx: Improve omp_target_is_accessible [PR121813]

2025-12-05 Thread Tobias Burnus
Andrew Stubbs wrote: On 28/11/2025 12:16, Andrew Stubbs wrote: This patch extends omp_target_is_accessible to check the actual device status for the memory region, on amdgcn and nvptx devices (rather than just checking if shared memory is enabled). OpenMP 6.0 has the following clarification:

Re: [PATCH v4 5/5] libstdc++: Implement submdspan_mapping for layout_right_padded. [PR110352]

2025-12-05 Thread Tomasz Kaminski
On Thu, Dec 4, 2025 at 10:35 PM Luc Grosheintz wrote: > 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. >

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

2025-12-05 Thread Tomasz Kaminski
On Thu, Dec 4, 2025 at 10:28 PM Luc Grosheintz wrote: > 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. > *

Re: [PATCH v4 3/5] libstdc++: Implement submdspan_mapping for layout_stride. [PR110352]

2025-12-05 Thread Tomasz Kaminski
On Thu, Dec 4, 2025 at 10:31 PM Luc Grosheintz wrote: > 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. > * tests

Re: [PATCH v4 2/5] libstdc++: Implement submdspan_mapping for layout_right. [PR110352]

2025-12-05 Thread Tomasz Kaminski
On Thu, Dec 4, 2025 at 10:31 PM Luc Grosheintz wrote: > 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. >

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

2025-12-05 Thread Stefan Schulze Frielinghaus
On Thu, Dec 04, 2025 at 03:08:28PM +0100, Richard Biener wrote: > 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

[PATCH 1/2] tree-optimization/120939 - remove uninitialized use of LOOP_VINFO_COST_MODEL_THRESHOLD

2025-12-05 Thread Richard Biener
The following removes an optimization that wrongly triggers right now because it accesses LOOP_VINFO_COST_MODEL_THRESHOLD which might not be computed yet and uses guessed likely max stmt executions. It also refactors the code to make the default conservative. Bootstrapped and tested on x86_64-unk

[COMMITTED 3/7] ada: Adjust documentation on floating-point overflow handling

2025-12-05 Thread Marc Poulhiès
The description of the floating-point overflow behavior is already documented in other sections: remove the duplication. This removal also removes confusing/wrong informations gcc/ada/ChangeLog: * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-gnato??): Remove redundant

[PATCH 2/2] Fix vect_need_peeling_or_partial_vectors_p wrt peeling for gaps

2025-12-05 Thread Richard Biener
The code assuming that peeling for gaps can be elided by means of knowing niters and prologue peeling is wrong. Peeling for gaps means we need an epilog. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-loop.cc (vect_need_peeling_or_partial_vectors_p): Whe

[COMMITTED 1/7] ada: Fix reducer selection when resolving 'Reduce attribute

2025-12-05 Thread Marc Poulhiès
From: Denis Mazzucato This patch ensures that, during the 'Reduce attribute resolution phase, the selected reducer subprogram exists, is not ambiguous, and has the proper reducer profile. Before we could have selected a wrong interpretation. gcc/ada/ChangeLog: * sem_attr.adb (An

[COMMITTED 7/7] ada: Unsigned_Base_Range aspect (part 6)

2025-12-05 Thread Marc Poulhiès
From: Javier Miranda Revert patch for Is_Modular_Integer_Type and Is_Signed_Integer_Type; add new synthesized predicates Has_Modular_Operations and Has_Overflow_Operations, and adjust the frontend sources to rely on them. gcc/ada/ChangeLog: * einfo.ads (Has_Unsigned_Base_Range_Aspect):

[COMMITTED 4/7] ada: Fix problematic aggregate with box notation

2025-12-05 Thread Marc Poulhiès
From: Eric Botcazou It runs afoul of the pragma Initialize_Scalars + -gnatVa combination. gcc/ada/ChangeLog: * sem_ch12.adb (Remove_Parent): Only set the Is_Transient component of the local scope stack entry. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem

[PATCH] Make gcc.dg/vect/vect-pr123002.c trigger on unfixed trunk

2025-12-05 Thread Richard Biener
The following avoids VRP to access the constant initializer. Pushed. PR tree-optimization/123002 * gcc.dg/vect/vect-pr123002.c: Make global data non-const and non-static. --- gcc/testsuite/gcc.dg/vect/vect-pr123002.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[COMMITTED 6/7] ada: Improve readability of table in reference manual

2025-12-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch changes a table in the reference manual so that the Ada code inside is properly highlighted and uses the usual casing conventions. gcc/ada/ChangeLog: * doc/gnat_rm/representation_clauses_and_pragmas.rst: Improve table. * gnat_rm.texi: Regenerat

[COMMITTED 5/7] ada: Fix false positive error for classwide containers

2025-12-05 Thread Marc Poulhiès
From: Viljar Indus Get_Cursor_Type fails if a classwide container type is passed to it as it cannot correctly identify the cursor type since it is expecting the iteration functions to have a container argument with a classwide container type. gcc/ada/ChangeLog: * sem_util.adb (Get_Curso

[COMMITTED 2/7] ada: Ensure that file is not locked on windows when opened RO

2025-12-05 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * adaint.c: use the _tsopen macro when opening RO file Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/adaint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index adc3951728

[PATCH] rs6000: Emit better code for parity in DImode [PR119468]

2025-12-05 Thread Avinash Jayakar
Hi, A small patch to fix PR119468. Bootstrapped and regtested on powerpc64le-linux. Ok for trunk? Thanks and regards, Avinash Jayakar This patch aims to fix PR119468 by emitting better code for parity builtin. Currently the following code: bool parity(unsigned long long l) { return __builti

[PATCH] Move even/odd validity check from supportable_widening_operation to caller

2025-12-05 Thread Richard Biener
The following moves the incomplete validity check to use WIDEN_MULT_{EVEN,ODD} to the caller of supportable_widening_operation where we have access to more (but not enough) information. I have made the test conservative enough I hope. For the testcase what was broken is that it uses a SLP reducti

[Patch, fortran] PRs 122578, 122669, 122670 & 122693

2025-12-05 Thread Paul Richard Thomas
Hi All, All these patches represent steps towards persuading fiats to build and test successfully. Jerry and I have had all of them on our trees for some weeks now and I think that the time has come for them to be pushed before bit rot sets in. Fiats makes heavy use of PDTs, ASSOCIATE and other mo

[r16-5899 Regression] FAIL: gfortran.dg/gomp/dyn_groupprivate-1.f90 -O scan-tree-dump-times original "#pragma omp target dyn_groupprivate\\(D.4680\\)" 1 on Linux/x86_64

2025-12-05 Thread Haochen Jiang
On Linux/x86_64, a553c70e363e75ce02c8e12e3b74b1dd9a965475 is the first bad commit commit a553c70e363e75ce02c8e12e3b74b1dd9a965475 Author: Tobias Burnus Date: Fri Dec 5 09:08:06 2025 +0100 OpenMP: C/C++ parser support for dyn_groupprivate caused FAIL: gfortran.dg/gomp/dyn_groupprivate-1.f

Re: [PATCH] gcov: Split atomic bitwise-or for some targets

2025-12-05 Thread Sebastian Huber
- Am 12. Sep 2025 um 5:13 schrieb Sebastian Huber [email protected]: > - Am 10. Jul 2025 um 7:53 schrieb Sebastian Huber > [email protected]: > >> There are targets, which only offer 32-bit atomic operations (for >> example 32-bit RISC-V). For these tar

Re: [PATCH] docs: Document -fdump-tree--alias

2025-12-05 Thread Filip Kastl
On Fri 2025-12-05 11:25:18, Jakub Jelinek wrote: > On Fri, Dec 05, 2025 at 11:03:09AM +0100, Filip Kastl wrote: > > Describe the -alias option for the -fdump-tree flag. > > > > gcc/ChangeLog: > > > > * doc/invoke.texi: Document -fdump-tree--alias. > > alias does a lot more than that. > It al

[PATCH] Add clique/base parsing and dumping to the GIMPLE FE

2025-12-05 Thread Richard Biener
The following adds clique/base on __MEM to the GIMPLE parser and to -gimple dumping. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. gcc/c/ * gimple-parser.cc (c_parser_gimple_postfix_expression): Parse optional clique : base specifier on __MEM. gcc/ * tree-p

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

2025-12-05 Thread Dongyan Chen
在 2025/12/4 22:23, 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

Re: [PATCH] docs: Document -fdump-tree--alias

2025-12-05 Thread Jakub Jelinek
On Fri, Dec 05, 2025 at 11:03:09AM +0100, Filip Kastl wrote: > Describe the -alias option for the -fdump-tree flag. > > gcc/ChangeLog: > > * doc/invoke.texi: Document -fdump-tree--alias. alias does a lot more than that. It also dumps the pt_solutions/alignment/misalignment for pointer SSA_

[PATCH] docs: Document -fdump-tree--alias

2025-12-05 Thread Filip Kastl
Describe the -alias option for the -fdump-tree flag. gcc/ChangeLog: * doc/invoke.texi: Document -fdump-tree--alias. Signed-off-by: Filip Kastl --- gcc/doc/invoke.texi | 4 1 file changed, 4 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a6d2b54cc7f..b2

Re: [PATCH] add fusage for non-ACCUMULATE_OUTGOING_ARGS calls [PR122947]

2025-12-05 Thread Eric Botcazou
> Regstrapped on x86_64-linux-gnu. Ok to install? > > for gcc/ChangeLog > > PR rtl-optimization/122947 > * calls.cc (expand_call): Add stack function usage in > non-ACCUMULATE_OUTGOING_ARGS configurations. > > for gcc/testsuite/ChangeLog > > PR rtl-optimization/1229

Re: [PATCH] cselib: lookup mem addr during invalidation

2025-12-05 Thread Eric Botcazou
> While at that, rework dump_cselib_table to not crash when > cselib_preserved_hash_table is not allocated, and to remove the > extraneous indirection from dump_cselib_val that made it inconvenient > to call from a debugger. > > Regstrapped on x86_64-linux-gnu. Ok to install? > > > for gcc/Cha

Re: [PATCH v4 0/5] libstdc++: submdspan (part 2)

2025-12-05 Thread Tomasz Kaminski
On Thu, Dec 4, 2025 at 10:27 PM Luc Grosheintz wrote: > These are the revised submdspan_mapping related patches from v2. > I will try to review it fully today. > > A few comments: > > - __any_past_the_end: the suggestion was to precheck for an empty > extent. I kept the current logic, bec

Re: [PING][PATCH 1/8] builtin: Add builtin types and function declarations for integer atomic fetch min/max

2025-12-05 Thread Soumya AR
Hi Jonathan, Pinging again for some clarification on what is the ideal way to implement atomic min/max in libstdc++. Would you prefer we check for the builtins using concepts (similar to fp add/sub)? If so, the earlier questions in this thread still apply. If not, since I do have a patch that im

Re: [r16-5897 Regression] FAIL: gcc.dg/torture/pr99782-1.c -Os (test for excess errors) on Linux/x86_64

2025-12-05 Thread Andrew Pinski
On Fri, Dec 5, 2025 at 1:00 AM Haochen Jiang wrote: > > On Linux/x86_64, > > e148a21f38327f7c0e1040bf28c676dd0d13ca38 is the first bad commit > commit e148a21f38327f7c0e1040bf28c676dd0d13ca38 > Author: Andrew Pinski > Date: Thu Oct 23 21:20:24 2025 -0700 > > x86/aarch64: Fix compile time ho

[r16-5897 Regression] FAIL: gcc.dg/torture/pr99782-1.c -Os (test for excess errors) on Linux/x86_64

2025-12-05 Thread Haochen Jiang
On Linux/x86_64, e148a21f38327f7c0e1040bf28c676dd0d13ca38 is the first bad commit commit e148a21f38327f7c0e1040bf28c676dd0d13ca38 Author: Andrew Pinski Date: Thu Oct 23 21:20:24 2025 -0700 x86/aarch64: Fix compile time hog with ccmp [PR99782] caused FAIL: gcc.dg/torture/pr99782-1.c -O0

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

2025-12-05 Thread Egas Ribeiro
On 2025-12-04 21:14, Patrick Palka wrote: > 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: > > > > > > >

[PATCH v2] libstdc++: Provide conversion between atomic_ref of similar types.

2025-12-05 Thread Tomasz Kamiński
This patch implements the P3860R1 (accepted as DR against C++20) and LWG4472. The two constraints on the constructor (that T and U are similar types and is_convertible_v) are combined into a single check: is_convertible_v<_Up(*)[1], _Tp(*)[1]>. While this check does is not equivalent for array of

[PATCH] Make gcc.dg/vect/vect-simd-clone-24.c more robust

2025-12-05 Thread Richard Biener
When -march=cascadelake is added we get 256bit vectorization by default but there's no OMP SIMD ABI for this case with inbranch. So add -mprefer-vector-width=512 to the testcase. Tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/122776 * gcc.dg/vect/vect-simd-clone-