[PATCH v2] c++/modules: Support ADL on non-discarded GM entities [PR121705]

2025-09-05 Thread Nathaniel Shead
On Fri, Sep 05, 2025 at 04:36:23PM +0200, Jason Merrill wrote: > On 8/31/25 9:24 AM, Nathaniel Shead wrote: > > Note: the tests in this patch depend on > > https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693810.html. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? >

[PATCH] c++/modules: Fix exported using-directive of imported namespace [PR121702]

2025-09-05 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- Currently we represent exported using-directives as a list of indices into the namespace array that we stream. However this list of namespaces doesn't include any namespaces that we don't expose in this module's purview, a

[PATCH v1 2/3] RISC-V: Add test for vec_duplicate + vnmsub.vv signed combine with GR2VR cost 0, 1 and 15

2025-09-05 Thread pan2 . li
From: Pan Li Add asm dump check and run test for vec_duplicate + vnmsub.vv combine to vnmsub.vx, with the GR2VR cost is 0, 2 and 15. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-1-i16.c: Add asm check for vnmsub.vx. * gcc.target/riscv/rvv/autovec/vx_v

Re: [PATCH] bitint: Fix regressions [PR117599]

2025-09-05 Thread Yang Yujie
On Tue, Sep 02, 2025 at 04:51:37PM GMT, Jakub Jelinek wrote: > On Tue, Aug 19, 2025 at 07:37:29PM +0800, Yang Yujie wrote: > > This patch fixes regressions of the gcc.dg/torture/bitint-* tests > > caused by r16-3036-ga76a032354ee48 with --enable-checking=all. > > > > The errors are similar to the

[PATCH] libstdc++: Enforce Mandates: for Boyer-Moore searchers

2025-09-05 Thread Jonathan Wakely
C++17 has a 'Requires:' precondition that the two random access iterator types have the same value type. In C++20 that is a 'Mandates:' requirement which we must diagnose. Although we could diagnose it in C++17, that might be a breaking change for any users relying on it today. Also I am lazy and

[PATCH] phiopt: Improve locations for factor out conditional operation [PR108466]

2025-09-05 Thread Andrew Pinski
This improves the locations for the phi args and the newly created statement. Since this is a factorization/commonizing in one case the location for the new statement will not always be set correctly either way. The new locations on the new phi will either be the old location of the argument to the

[PATCH v1 3/3] RISC-V: Add test for vec_duplicate + vnmsub.vv unsigned combine with GR2VR cost 0, 1 and 15

2025-09-05 Thread pan2 . li
From: Pan Li Add asm dump check and run test for vec_duplicate + vnmsub.vvm combine to vnmsub.vx, with the GR2VR cost is 0, 2 and 15. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-1-u16.c: Add asm check for vnmsub.vx. * gcc.target/riscv/rvv/autovec/vx_

[PATCH v1 0/3] RISC-V: Combine vec_duplicate + vnmsub.vv to vnmsub.vx on GR2VR cost

2025-09-05 Thread pan2 . li
From: Pan Li This patch would like to introduce the combine of vec_dup + vnmsub.vv into vnmsub.vx on the cost value of GR2VR. The late-combine will take place if the cost of GR2VRlike 1, 2, 15 in test. From: | ... | vmv.v.x | L1: | vnmsub.vv | J L1 | ... To: | ... | L1: |

[PATCH v1 1/3] RISC-V: Combine vec_duplicate + vnmsub.vv to vnmsub.vx on GR2VR cost

2025-09-05 Thread pan2 . li
From: Pan Li This patch would like to combine the vec_duplicate + vnmsub.vv to the vnmsub.vx. From example as below code. The related pattern will depend on the cost of vec_duplicate from GR2VR. Then the late-combine will take action if the cost of GR2VR is zero, and reject the combination if

Re: [PATCH 2/2] libstdc++: Implement P1494 and P3641 Partial program correctness [PR119060]

2025-09-05 Thread Iain Sandoe
> On 5 Sep 2025, at 11:09, Jonathan Wakely wrote: > > On Thu, 4 Sept 2025 at 19:03, Jonathan Wakely wrote: >> >> >> >> On Thu, 4 Sept 2025, 18:02 Iain Sandoe, wrote: >>> >>> The facility (with the original shorter name) has been in use on the >>> contracts development branch for almost a

Re: [WIP] C++ vs. -ftrivial-auto-var-init=

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 05:19:06PM +0200, Jason Merrill wrote: > > Regarding temporaries, I wonder if we want to .DEFERRED_INIT them when > > expanding TARGET_EXPRs in the gimplifier (but whether to do that always > > when flag_auto_var_init != AUTO_INIT_UNINITIALIZED or for C++26 only), > > or if

Re: [PATCH 09/14 v2] lto: Add toplevel assembly heuristics

2025-09-05 Thread Sam James
Andi Kleen writes: >> Thanks both! > > For modules the Makefile needs to be adjusted to run final LTO before > modpost etc. These were the respective hunks from the old patchkit > (may need some tweaks) Thanks Andi. This got me further: --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -

Re: [PATCH v2 7/7] kcfi: Add regression test suite

2025-09-05 Thread Kees Cook
On Fri, Sep 05, 2025 at 09:06:41AM +0200, Jakub Jelinek wrote: > On Thu, Sep 04, 2025 at 05:24:15PM -0700, Kees Cook wrote: > > --- /dev/null > > +++ b/gcc/testsuite/gcc.dg/kcfi/kcfi-adjacency.c > > @@ -0,0 +1,73 @@ > > +/* Test KCFI check/transfer adjacency - regression test for instruction > > +

Re: [WIP] C++ vs. -ftrivial-auto-var-init=

2025-09-05 Thread Jason Merrill
On 9/4/25 11:01 AM, Jakub Jelinek wrote: On Thu, Sep 04, 2025 at 02:45:16PM +0200, Jakub Jelinek via Gcc wrote: On Wed, Sep 03, 2025 at 03:38:53PM +0200, Jakub Jelinek via Gcc wrote: But there is one thing the paper doesn't care about, which looks like a show stopper to me, in particular the st

Re: [PATCH 09/14 v2] lto: Add toplevel assembly heuristics

2025-09-05 Thread Sam James
Andi Kleen writes: > Sam James writes: > >> Michal Jires writes: >> >>> I did handle node->iterate_referring, but forgot cnode->callers. >>> >>> Only change are contents of the newly separated >>> mark_symbol_referenced_from_asm >> >> Thanks, I'll try the new patch now. >> >> With the workaroun

Re: [PATCH] tree-optimization/121685 - accesses to *this are not trapping

2025-09-05 Thread Richard Biener
On Thu, 4 Sep 2025, Richard Biener wrote: > On Thu, Sep 4, 2025 at 10:27 AM Jonathan Wakely wrote: > > > > On Thu, 4 Sept 2025 at 08:26, Richard Biener wrote: > > > > > > On Wed, 3 Sep 2025, Jakub Jelinek wrote: > > > > > > > On Wed, Sep 03, 2025 at 06:41:08PM +0200, Richard Biener wrote: > > >

Re: [patch,testsuite,applied] Fix test case for PR121695

2025-09-05 Thread Andrew Pinski
On Fri, Sep 5, 2025 at 6:53 AM Georg-Johann Lay wrote: > > Applied as obvious. Thanks for doing this. Though in this case the values assigned to ai does not matter that much, and could have just changed to 1 rather than that "random" larger number. Most of the time I try to do the right thing fo

[PATCH v2 0/3] Update TLS model after processing a TLS variable

2025-09-05 Thread H.J. Lu
In C and C++ frontends, we should set a tentative TLS model to avoid tls_model attribute warnings due to lack of thread storage duration and update it with the default TLS access model after a TLS variable has been fully processed if the default TLS access model is stronger. H.J. Lu (3): c++: Up

[PATCH v2 1/3] c++: Update TLS model after processing a TLS variable

2025-09-05 Thread H.J. Lu
Set a tentative TLS model in grokvardecl and update TLS mode with the default TLS access model after a TLS variable has been fully processed if the default TLS access model is stronger. gcc/cp/ PR c++/107393 * decl.cc (grokvardecl): Set a tentative TLS model which will be

[PATCH v2 3/3] testsuite: Add tests for PR c/107419 and PR c++/107393

2025-09-05 Thread H.J. Lu
Both C and C++ frontends should set a tentative TLS model in grokvardecl and update TLS mode with the default TLS access model after a TLS variable has been fully processed if the default TLS access model is stronger. PR c/107419 PR c++/107393 * c-c++-common/tls-attr-common

Re: [WIP] C++ vs. -ftrivial-auto-var-init=

2025-09-05 Thread Qing Zhao
> On Sep 5, 2025, at 14:16, Jakub Jelinek wrote: > > On Fri, Sep 05, 2025 at 05:19:06PM +0200, Jason Merrill wrote: >>> Regarding temporaries, I wonder if we want to .DEFERRED_INIT them when >>> expanding TARGET_EXPRs in the gimplifier (but whether to do that always >>> when flag_auto_var_init

[PATCH v2 2/3] c: Update TLS model after processing a TLS variable

2025-09-05 Thread H.J. Lu
Set a tentative TLS model in grokvardecl and update TLS mode with the default TLS access model after a TLS variable has been fully processed if the default TLS access model is stronger. gcc/c/ PR c/107419 * c-decl.cc (c_decl_attributes): Update TLS model with the default T

Re: [PATCH] doc: Document the -folding option for -fdump-tree-*

2025-09-05 Thread Andrew Pinski
On Fri, Sep 5, 2025 at 7:39 AM Alex Coplan wrote: > > Hi, > > I noticed that the -fdump-tree-*-folding flag isn't documented in > the Developer options section of invoke.texi; this patch fixes that. > > Tested by building the HTML docs and spot-checking in a browser. > > OK for trunk? I noticed t

Re: [PATCH] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-05 Thread Andrew Pinski
On Fri, Sep 5, 2025 at 4:06 AM Matthias Kretz wrote: > > Okay for trunk? What about backports? > > (Also as PR at https://forge.sourceware.org/gcc/gcc-TEST/pulls/72) > > --- 8< -- > > Signed-off-by: Matthias Kretz > > gcc/testsuite/ChangeLog: > > * g++.

Re: [PATCH] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-05 Thread Andrew Pinski
On Fri, Sep 5, 2025 at 12:58 PM Matthias Kretz wrote: > > Matthias Kretz [Friday, 5 September 2025, 21:49:23 CEST]: > > > How about an assert that if words > 0, bitsize % 32 == 0? > > > > I actually thought about an assert that bytes == 2 when words == 0. I don't > > think there's a 1-Byte real ty

Re: c: Warn when returning nested functions that require a non-local context.

2025-09-05 Thread Joseph Myers
On Fri, 8 Aug 2025, Martin Uecker wrote: > diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h > index bb0b113754e..372fcbd8aa1 100644 > --- a/gcc/c/c-tree.h > +++ b/gcc/c/c-tree.h > @@ -80,6 +80,11 @@ along with GCC; see the file COPYING3. If not see > /* For a PARM_DECL, nonzero if it was declared as

Re: [PATCH] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-05 Thread Matthias Kretz
Matthias Kretz [Friday, 5 September 2025, 21:49:23 CEST]: > > How about an assert that if words > 0, bitsize % 32 == 0? > > I actually thought about an assert that bytes == 2 when words == 0. I don't > think there's a 1-Byte real type on any GCC target yet (though NVidia > apparently has hardware

Re: [PATCH v2] preprocessor: More escapes for Makefile rules (-M option) [PR41329, PR121450]

2025-09-05 Thread Joseph Myers
On Thu, 21 Aug 2025, Joerg Boehmer wrote: > diff --git a/libcpp/mkdeps.cc b/libcpp/mkdeps.cc > index a4bea6e47d4..40fd5062a8a 100644 > --- a/libcpp/mkdeps.cc > +++ b/libcpp/mkdeps.cc > @@ -121,10 +121,11 @@ public: > }; > > /* Apply Make quoting to STR, TRAIL. Note that it's not possible to >

Re: [PATCH] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 06:34:23PM +0200, Jason Merrill wrote: > > --- /dev/null > > +++ b/gcc/testsuite/g++.dg/pr121801_float16_cst_mangling.C > > @@ -0,0 +1,12 @@ > > +// PR c++/121801 > > +// { dg-do compile { target c++20 } } Not all targets have _Float16 support though. So, I think you want /

Re: [PATCH] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-05 Thread Matthias Kretz
Jason Merrill [Friday, 5 September 2025, 18:34:23 CEST]: > On 9/5/25 1:03 PM, Matthias Kretz wrote: > > Okay for trunk? What about backports? > > Regarding backports, I'm generally reluctant to change mangling within a > release unless the old behavior would always fail loudly. This case > looks

[PATCH] libstdc++: Make join_view::_Iterator::_M_get_inner noexcept [PR121804]

2025-09-05 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Since this helper (added in r16-3576-g7f7f1878eedd80) is used in the noexcept-spec of iter_move and iter_swap, it in turn needs an accurate noexcept-spec. libstdc++-v3/ChangeLog: * include/std/ranges (join_view::_Itera

[PATCH] libstdc++: Document missing implementation defined behavior for std::filesystem.

2025-09-05 Thread Tomasz Kamiński
libstdc++-v3/ChangeLog: * doc/html/manual/status.html: Regenerate the file. * doc/xml/manual/status_cxx2017.xml: Addd more entires. --- Splitting the work into smaller chunks. Let me know if the preference would be to have a one big patch. OK for trunk? libstdc++-v3/doc/html/man

Re: [PATCH] rtl-ssa: Maintain clobber_group invariant [PR121757]

2025-09-05 Thread Sam James
Richard Sandiford writes: > In order to reduce time complexity, rtl-ssa groups consecutive > clobbers together. Each group of clobbers has a splay tree for > lookup and manipulation purposes. > > This arrangement means that we might need to split a group (when > inserting a new non-clobber defin

Re: [PATCH v3 2/2] libstdc++: Adjust span/mdspan CTAD for P2781R9.

2025-09-05 Thread Jonathan Wakely
On Fri, 5 Sept 2025 at 16:26, Jonathan Wakely wrote: > > On Thu, 4 Sept 2025 at 13:22, Luc Grosheintz wrote: > > > > A usecase for P2781R9 is more ergonomic creation of span and mdspan with > > mixed static and dynamic extents, e.g.: > > > > span(ptr, cw<3>) > > extents(cw<3>, 5, cw<7>) >

Re: [WIP] C++ vs. -ftrivial-auto-var-init=

2025-09-05 Thread Qing Zhao
> On Sep 5, 2025, at 11:22, Jason Merrill wrote: > > On 9/4/25 3:47 PM, Qing Zhao wrote: >>> On Sep 4, 2025, at 11:01, Jakub Jelinek wrote: >>> >>> On Thu, Sep 04, 2025 at 02:45:16PM +0200, Jakub Jelinek via Gcc wrote: On Wed, Sep 03, 2025 at 03:38:53PM +0200, Jakub Jelinek via Gcc wrot

Re: [PATCH] c: Allow translations of a lot of C FE messages

2025-09-05 Thread Joseph Myers
On Fri, 5 Sep 2025, Jakub Jelinek wrote: > Hi! > > I've noticed a lot of diagnostic messages in the C FE aren't marked > for translation. > The reason is some weird coding style which wraps the string > literals into (), especially when they don't fit on a single line. > With that fixed, there we

[PATCH v2] preprocessor: More escapes for Makefile rules (-M option) [PR41329, PR121450]

2025-09-05 Thread joergboe
Reminder: This patch adds support for more characters that are special to GNU make in file-names. Especially GNU make expects in rules that #, %, :, *, ? and [ characters are preceded by a backslash to remove their special meaning. The original mails are: https://gcc.gnu.org/pipermail/gcc-patche

Re: [PATCH] rtl-ssa: Maintain clobber_group invariant [PR121757]

2025-09-05 Thread Richard Biener
> Am 05.09.2025 um 17:53 schrieb Richard Sandiford : > > In order to reduce time complexity, rtl-ssa groups consecutive > clobbers together. Each group of clobbers has a splay tree for > lookup and manipulation purposes. > > This arrangement means that we might need to split a group (when >

Re: [patch] uild libphobos on ppc64el when configured --with-long-double-format=ieee

2025-09-05 Thread Iain Buclaw
Excerpts from Matthias Klose's message of September 5, 2025 6:24 pm: > Build libphobos on ppc64el when configured --with-long-double-format=ieee > > Ok for the trunk and the active branches? > > For a bootstrap, you still need to build a GCC 11 with that patch, and > then build a newer GCC using

Re: [PATCH] D: disable collect fork on Darwin

2025-09-05 Thread Iain Buclaw
Excerpts from Iain Sandoe's message of September 3, 2025 9:59 pm: > > >> On 3 Sep 2025, at 20:54, Iain Buclaw wrote: >> >> Excerpts from Iain Buclaw's message of September 3, 2025 9:19 pm: >>> Excerpts from Rainer Orth's message of September 3, 2025 10:20 am: >> >> I regularly (but not

[patch,testsuite,applied] Fix test case for PR121695

2025-09-05 Thread Georg-Johann Lay
Applied as obvious. Johann -- testsuite: Fix gcc.dg/torture/pr121695-1.c This test case fails on int < 32-bit platforms obviously. This patch undoes the macro expansion from stdint.h. gcc/testsuite/ PR testsuite/121695 PR testsuite/52641 gcc.dg/torture/pr121695-1.c: in

Re: [PATCH v2 2/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-09-05 Thread Kees Cook
On Fri, Sep 05, 2025 at 10:51:03AM +0200, Peter Zijlstra wrote: > On Thu, Sep 04, 2025 at 05:24:10PM -0700, Kees Cook wrote: > > +- The check-call instruction sequence must be treated a single unit: it > > + cannot be rearranged or split or optimized. The pattern is that > > + indirect calls, "ca

Re: [PATCH v2 2/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-09-05 Thread Peter Zijlstra
On Thu, Sep 04, 2025 at 05:24:10PM -0700, Kees Cook wrote: > +- The check-call instruction sequence must be treated a single unit: it > + cannot be rearranged or split or optimized. The pattern is that > + indirect calls, "call *$target", get converted into: > + > +mov $target_expression, %ta

Re: [PATCH v4 1/2] libstdc++: Implement constant_wrapper, cw from P2781R9.

2025-09-05 Thread Tomasz Kaminski
On Fri, Sep 5, 2025 at 2:25 PM Jonathan Wakely wrote: > On Fri, 5 Sept 2025 at 08:14, Tomasz Kamiński wrote: > > > > From: Luc Grosheintz > > > > This is a partial implementation of P2781R9. It adds std::cw and > > std::constant_wrapper, but doesn't modify __integral_constant_like for > > span/

Fix scalng of auto-fdo profiles in liner

2025-09-05 Thread Jan Hubicka
Hi, with auto-fdo it is possible that function bar with non-zero profile is inlined into foo with zero profile and foo is the only caller of it. In this case we currently scale bar to also have zero profile which makes it optimized for size. With normal profiles this does not happen, since basic

Re: [PATCH v3 2/2] AArch64: Add SME LUTv2 intrinsics

2025-09-05 Thread Kyrylo Tkachov
> On 4 Sep 2025, at 16:13, Karl Meakin wrote: > > Add intrinsic functions for the SME LUTv2 architecture extension > (`svluti4_zt`, `svwrite_lane_zt` and `svwrite_zt`). > > gcc/ChangeLog: > > * config/aarch64/aarch64-sme.md (@aarch64_sme_write_zt): New > insn. > (aarch64_sme_lut_zt): Likewis

Re: [PATCH] libstdc++: Use _Drop_iter<_CharT> for formattable concept checking [PR121765]

2025-09-05 Thread Tomasz Kaminski
On Thu, Sep 4, 2025 at 2:53 PM Tomasz Kamiński wrote: > When producing output, the libstdc++ format implementation only uses > _Sink_iter > specializations. Since users cannot construct basic_format_context, this > is the > only iterator type actually used. The __format_padded helper relies on th

[committed] c++: Fix cxx_eval_cxa_builtin_fn diagnostic message

2025-09-05 Thread Jakub Jelinek
Hi! Marek Polacek reported to me internally that I've messed up one diagnostic message in this function, with one word before final double quote on one line and another word right after opening double quote on the next line, with no space in between. Fixed thusly. Bootstrapped/regtested on x86_6

Re: [PATCH] fortran: implement conditional expression for fortran 2023

2025-09-05 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: This time I use git format-patch. Hopefully fix the issue. Seem so :-) Do I read you patch correctly that you still want to improve it before committing the first version? I assume so because the changelog part of the patch is largely lacking (except for the summary li

[PATCH] rtl-ssa: Maintain clobber_group invariant [PR121757]

2025-09-05 Thread Richard Sandiford
In order to reduce time complexity, rtl-ssa groups consecutive clobbers together. Each group of clobbers has a splay tree for lookup and manipulation purposes. This arrangement means that we might need to split a group (when inserting a new non-clobber definition between two clobbers) or to join

Re: [WIP] C++ vs. -ftrivial-auto-var-init=

2025-09-05 Thread Jason Merrill
On 9/4/25 3:47 PM, Qing Zhao wrote: On Sep 4, 2025, at 11:01, Jakub Jelinek wrote: On Thu, Sep 04, 2025 at 02:45:16PM +0200, Jakub Jelinek via Gcc wrote: On Wed, Sep 03, 2025 at 03:38:53PM +0200, Jakub Jelinek via Gcc wrote: But there is one thing the paper doesn't care about, which looks

[committed] cobol: Improved handling of COBOL Special Registers.

2025-09-05 Thread Robert Dubner
From: Robert Dubner Date: Fri, 5 Sep 2025 10:41:08 -0400 Subject: [PATCH] cobol: Improved handling of COBOL Special Registers. COBOL Special Registers (e.g., RETURN-CODE; DEBUG-ITEM) are implemented as global variables. These changes define them with the prefix "__ggsr__" in their variable names

[PATCH] RISC-V: Add pattern for vector-scalar single-width floating-point reverse sub

2025-09-05 Thread Paul-Antoine Arras
This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a minus RTL instruction. The vec_duplicate is the minuend operand. Before this patch, we have two instructions, e.g.: vfmv.v.f v2,fa0 vfsub.vv v1,v2,v1 After, we get only o

Re: [PATCH] libstdc++: Document reamining C++17 implementation-defined behavior.

2025-09-05 Thread Jonathan Wakely
On Fri, 5 Sept 2025 at 15:52, Tomasz Kaminski wrote: > > > > On Fri, Sep 5, 2025 at 4:47 PM Jonathan Wakely wrote: >> >> On Fri, 5 Sept 2025 at 15:17, Tomasz Kamiński wrote: >> > >> > This also covers bad_function_call::what from C++11. >> > >> > libstdc++-v3/ChangeLog: >> > >> > * doc/h

Re: [PATCH] libstdc++: Document reamining C++17 implementation-defined behavior.

2025-09-05 Thread Tomasz Kaminski
On Fri, Sep 5, 2025 at 4:47 PM Jonathan Wakely wrote: > On Fri, 5 Sept 2025 at 15:17, Tomasz Kamiński wrote: > > > > This also covers bad_function_call::what from C++11. > > > > libstdc++-v3/ChangeLog: > > > > * doc/html/manual/status.html: Regenerate. > > * doc/xml/manual/status

Re: [PATCH] libstdc++: Document reamining C++17 implementation-defined behavior.

2025-09-05 Thread Jonathan Wakely
On Fri, 5 Sept 2025 at 15:17, Tomasz Kamiński wrote: > > This also covers bad_function_call::what from C++11. > > libstdc++-v3/ChangeLog: > > * doc/html/manual/status.html: Regenerate. > * doc/xml/manual/status_cxx2011.xml: Add entry for bad_function_call. > * doc/xml/manua

Re: [PATCH] libstdc++: Make join_view::_Iterator::_M_get_inner noexcept [PR121804]

2025-09-05 Thread Tomasz Kaminski
On Fri, Sep 5, 2025 at 4:28 PM Patrick Palka wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > Yes, I have seen bugzilla today, and this looks like an obvious fix. > > -- >8 -- > > Since this helper (added in r16-3576-g7f7f1878eedd80) is used in the > noexcept-spec of iter_m

Re: [PATCH] c++/modules: Support ADL on non-discarded GM entities [PR121705]

2025-09-05 Thread Jason Merrill
On 8/31/25 9:24 AM, Nathaniel Shead wrote: Note: the tests in this patch depend on https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693810.html. Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- [basic.lookup.argdep] p4 says that ADL also finds declarations of func

[PATCH] libstdc++: Document reamining C++17 implementation-defined behavior.

2025-09-05 Thread Tomasz Kamiński
This also covers bad_function_call::what from C++11. libstdc++-v3/ChangeLog: * doc/html/manual/status.html: Regenerate. * doc/xml/manual/status_cxx2011.xml: Add entry for bad_function_call. * doc/xml/manual/status_cxx2017.xml: Add entires for bad_any_cast and nullp

[PATCH] tree-optimization/121703 - UBSAN error with moving from uninit data

2025-09-05 Thread Richard Biener
The PR reports vectorizer.h:276:3: runtime error: load of value 32695, which is not a valid value for type 'internal_fn' which I believe is from slp_node->data = new vect_load_store_data (std::move (ls)); where 'ls' can be partly uninitialized (and that data will be not used, but of cour

Re: GFortran broken after f23bac62f46fc296a4d0526ef54824d406c3756c

2025-09-05 Thread John Ericson
The change looks good to me. Sorry about the breakage. (For context, after making the return type polymorphic, I was experiment with removing assumptions that it is even a pointer, but I never actually did that. The removal of the `= NULL` was just a stray bit of those experiments that accident

[PATCH] RISC-V: Add pattern for vector-scalar single-width floating-point sub

2025-09-05 Thread Paul-Antoine Arras
This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a minus RTL instruction. The vec_duplicate is the subtrahend operand. Before this patch, we have two instructions, e.g.: vfmv.v.f v2,fa0 vfsub.vv v1,v1,v2 After, we get onl

[PATCH] maintainer-scripts: add gen_gcc_docs.sh

2025-09-05 Thread Arsen Arsenović
This script generates docs to match https://gcc.gnu.org/onlinedocs/ in a way that's easy to invoke by anyone (i.e. in a way that doesn't depend on the specifics of the server hosting gcc.gnu.org). It is based on generate_libstdcxx_web_docs and update_web_docs_* and intends to replace them eventual

Re: [PATCH] libstdc++: Document missing implementation defined behavior for std::filesystem.

2025-09-05 Thread Jonathan Wakely
On Fri, 5 Sept 2025 at 12:33, Tomasz Kamiński wrote: > > libstdc++-v3/ChangeLog: > > * doc/html/manual/status.html: Regenerate the file. > * doc/xml/manual/status_cxx2017.xml: Addd more entires. > --- > Splitting the work into smaller chunks. Let me know if the preference > would b

Re: [PATCH v4 1/2] libstdc++: Implement constant_wrapper, cw from P2781R9.

2025-09-05 Thread Jonathan Wakely
On Fri, 5 Sept 2025 at 08:14, Tomasz Kamiński wrote: > > From: Luc Grosheintz > > This is a partial implementation of P2781R9. It adds std::cw and > std::constant_wrapper, but doesn't modify __integral_constant_like for > span/mdspan. > > libstdc++-v3/ChangeLog: > > * include/bits/version

[PATCH v2 1/2] [x86] Exclude fake cross-lane permutation from avx256_avoid_vec_perm.

2025-09-05 Thread liuhongt
SLP may take a broadcast as kind of vec_perm, the patch checks the permutation index to exclude those false positive. > Btw, you can now (in some cases) do better, namely you should > always have 'node' available and when SLP_TREE_PERMUTE_P (node) > then SLP_TREE_LANE_PERMUTATION could be inspecte

Re: [C PATCH, v2] c: Add -Wuse-after-missed-init [PR87038]

2025-09-05 Thread Martin Uecker
Am Donnerstag, dem 04.09.2025 um 18:22 + schrieb Joseph Myers: > On Thu, 4 Sep 2025, Martin Uecker wrote: > > > This change adds a warning -Wuse-after-missed-init which is similar to > > -Wjump-misses-init but better supports idiomatic C code by emitting a > > diagnostic only when

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-05 Thread Alejandro Colomar
Hi Chris, On Fri, Sep 05, 2025 at 11:15:26AM +0100, Christopher Bazley wrote: > On Thu, Sep 4, 2025 at 6:57 PM Joseph Myers wrote: > > > > On Wed, 3 Sep 2025, Alejandro Colomar wrote: > > > > > Hi Joseph, > > > > > > On Wed, Sep 03, 2025 at 03:44:28PM +, Joseph Myers wrote: > > > > On Wed, 3

Re: [PATCH 2/2] libstdc++: Implement P1494 and P3641 Partial program correctness [PR119060]

2025-09-05 Thread Jonathan Wakely
On Thu, 4 Sept 2025 at 19:03, Jonathan Wakely wrote: > > > > On Thu, 4 Sept 2025, 18:02 Iain Sandoe, wrote: >> >> The facility (with the original shorter name) has been in use on the >> contracts development branch for almost a year, and has been tested in >> isolation on x86_64-darwin and powerp

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-05 Thread Christopher Bazley
On Thu, Sep 4, 2025 at 6:57 PM Joseph Myers wrote: > > On Wed, 3 Sep 2025, Alejandro Colomar wrote: > > > Hi Joseph, > > > > On Wed, Sep 03, 2025 at 03:44:28PM +, Joseph Myers wrote: > > > On Wed, 3 Sep 2025, Alejandro Colomar wrote: > > > > > > > Hi Joseph, > > > > > > > > I'd like to ping ab

[PATCH] tree-optimization/121802 - fix vect_setup_realignment

2025-09-05 Thread Richard Biener
The following avoids looking at STMT_VINFO_VECTYPE in vect_setup_realignment and instead passes down the relevant vector type. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/121802 * tree-vectorizer.h (vect_setup_realignment): Add vectype

[committed] testsuite: Fix up fixed-point/bitint-1.c test

2025-09-05 Thread Jakub Jelinek
Hi! This test was written without _BitInt support on any target with fixed-point support as well, so was actually never tested. Now that it can be tested on loongarch64-linux, there is a missing expected error, so this patch adds it. Tested with a cross to loongarch64-linux, bootstrapped/regtest

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Iain Sandoe
> On 5 Sep 2025, at 10:46, Richard Biener wrote: > > On Fri, Sep 5, 2025 at 10:07 AM Jakub Jelinek wrote: >> >> On Fri, Sep 05, 2025 at 08:51:10AM +0100, Iain Sandoe wrote: BARRIER in RTL is like __builtin_unreachable (), so the observable checkpoint certainly can't be represented

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

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 10:30:49AM +0100, Matthew Malcomson wrote: > Ok -- TBH I don't have any extra details on this argument right now and your > point on it's feasibility seems quite convincing. (Timezones are slowing > communication with other compiler team about why it's hard in their case --

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Florian Weimer
* Iain Sandoe: >> On 5 Sep 2025, at 10:07, Florian Weimer wrote: >> >> * Iain Sandoe: >> >>> diff --git a/gcc/testsuite/g++.dg/cpp26/observable-checkpoint.C >>> b/gcc/testsuite/g++.dg/cpp26/observable-checkpoint.C >>> new file mode 100644 >>> index 000..886cda7ae33 >>> --- /dev/null >>

Re: [PATCH v2 1/2] [x86] Exclude fake cross-lane permutation from avx256_avoid_vec_perm.

2025-09-05 Thread Richard Biener
On Fri, Sep 5, 2025 at 11:26 AM Richard Biener wrote: > > On Fri, Sep 5, 2025 at 10:11 AM Hongtao Liu wrote: > > > > On Fri, Sep 5, 2025 at 3:07 PM Richard Biener > > wrote: > > > > > > On Fri, Sep 5, 2025 at 4:54 AM liuhongt wrote: > > > > > > > > SLP may take a broadcast as kind of vec_perm,

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

2025-09-05 Thread Matthew Malcomson
On 9/3/25 15:23, Jakub Jelinek wrote: External email: Use caution opening links or attachments Does that sound reasonable? No, I don't really get what is so hard to pattern match this (obviously you want to pattern match it after inlining, not before). I think we have far more complicated

Re: [PATCH v2 1/2] [x86] Exclude fake cross-lane permutation from avx256_avoid_vec_perm.

2025-09-05 Thread Richard Biener
On Fri, Sep 5, 2025 at 10:11 AM Hongtao Liu wrote: > > On Fri, Sep 5, 2025 at 3:07 PM Richard Biener > wrote: > > > > On Fri, Sep 5, 2025 at 4:54 AM liuhongt wrote: > > > > > > SLP may take a broadcast as kind of vec_perm, the patch checks the > > > permutation index to exclude those false posit

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Iain Sandoe
> On 5 Sep 2025, at 10:07, Florian Weimer wrote: > > * Iain Sandoe: > >> diff --git a/gcc/testsuite/g++.dg/cpp26/observable-checkpoint.C >> b/gcc/testsuite/g++.dg/cpp26/observable-checkpoint.C >> new file mode 100644 >> index 000..886cda7ae33 >> --- /dev/null >> +++ b/gcc/testsuite/g

Re: [PATCH] RISC-V: Check if we can vec_extract [PR121510].

2025-09-05 Thread Kito Cheng
I guess for those F16 move or vec_extract patterns it can still be supported even without zvfh/zvfhmin support, but those patterns are guarded by either ZVFH or ZVFHMIN now. However I think what I write above is kind of an optimization, and I think your fix is reasonable for the long term, it can

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 08:51:10AM +0100, Iain Sandoe wrote: > > BARRIER in RTL is like __builtin_unreachable (), so the observable > > checkpoint certainly can't be represented like that. > > Anyway, my point is that one call call std::observable_checkpoint () > > or exit (0) in any external funct

Re: [Patch fortran] PR84432 & PR114815 - test for non-conforming default PDT initializers

2025-09-05 Thread Paul Richard Thomas
Nit eradicated and pushed as r16-3590. Thanks Paul On Thu, 4 Sept 2025 at 21:53, Harald Anlauf wrote: > Hi Paul! > > Am 04.09.25 um 20:46 schrieb Paul Richard Thomas: > > Hi All, > > > > PDT components with default initializers must have type parameter and > > length expressions that reduce t

[PATCH] RISC-V: Check if we can vec_extract [PR121510].

2025-09-05 Thread Robin Dapp
Hi, For Zvfhmin a vector mode exists but the corresponding vec_extract does not. This patch checks that a vec_extract is available and otherwise falls back to standard handling. I cannot test myself right now so handing it off to the CI :) Regards Robin PR target/121510 gcc/ChangeLog

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 08:40:27AM +0100, Iain Sandoe wrote: > > On 5 Sep 2025, at 08:22, Jakub Jelinek wrote: > > > > On Fri, Sep 05, 2025 at 08:35:43AM +0200, Richard Biener wrote: > >>> i.e. keep it as a call to an optimization barrier until runtime > >>> but don't really do anything at that p

Re: [PATCHv3] Error out stack-protector unavailability on AIX

2025-09-05 Thread Ayappan
> I would think the generic -fstack-protector testcases would already pick > this up. But apparently there doesn't exist any testcase for it! So > this failure mode wasn't detected either. Oh well. > > Not something I'll ask you to improve then! Okay. So if everything is good, can the changes b

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 08:35:43AM +0200, Richard Biener wrote: > > i.e. keep it as a call to an optimization barrier until runtime > > but don't really do anything at that point. > > That's probably equivalent to the builtin. But to a builtin which is preserved until end of expansion (not sure i

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Iain Sandoe
> On 5 Sep 2025, at 08:46, Jakub Jelinek wrote: > > On Fri, Sep 05, 2025 at 09:37:42AM +0200, Richard Biener wrote: >> Yes. I'll note that while we fixed some issues with code motion across >> possible exit points we do not have good means of testing for invalid >> code motion of UB invoking

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Jakub Jelinek
On Fri, Sep 05, 2025 at 09:37:42AM +0200, Richard Biener wrote: > Yes. I'll note that while we fixed some issues with code motion across > possible exit points we do not have good means of testing for invalid > code motion of UB invoking stmts. Guessing from the ones that actually > caused traps

[PATCH v2] RISC-V: Add tt-ascalon-d8 pipeline description

2025-09-05 Thread Anton Blanchard
Add pipeline description for the Tenstorrent Ascalon 8 wide CPU. gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_TUNE): Update. * config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): Add tt_ascalon_d8. * config/riscv/riscv.md: Update tune attribute

Re: [PATCH] doc: Document missing isinf optab [PR 101852]

2025-09-05 Thread Richard Biener
On Thu, Sep 4, 2025 at 5:06 PM Wilco Dijkstra wrote: > > > Document missing isinf optab. OK. > gcc: > PR middle-end/101852 > * doc/md.texi: Document isinf optab. > > --- > > diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi > index > 973c0dd302964966a91fa8dbab85930d6dbeec9e..a9c335

Re: [PATCH v2 1/2] [x86] Exclude fake cross-lane permutation from avx256_avoid_vec_perm.

2025-09-05 Thread Richard Biener
On Fri, Sep 5, 2025 at 4:54 AM liuhongt wrote: > > SLP may take a broadcast as kind of vec_perm, the patch checks the > permutation index to exclude those false positive. > > > Btw, you can now (in some cases) do better, namely you should > > always have 'node' available and when SLP_TREE_PERMUTE_

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Iain Sandoe
Hi Jakub I apologise for the additional code (related to an earlier experiment with a front-end-only builtin) - rushing to post - updated to follow. > On 5 Sep 2025, at 08:22, Jakub Jelinek wrote: > > On Fri, Sep 05, 2025 at 08:35:43AM +0200, Richard Biener wrote: >>> i.e. keep it as a call to

Re: [PATCHv3] Error out stack-protector unavailability on AIX

2025-09-05 Thread Segher Boessenkool
On Fri, Sep 05, 2025 at 12:51:09PM +0530, Ayappan wrote: > > I would think the generic -fstack-protector testcases would already pick > > this up. But apparently there doesn't exist any testcase for it! So > > this failure mode wasn't detected either. Oh well. > > > > Not something I'll ask you

[PATCH] c: Allow translations of a lot of C FE messages

2025-09-05 Thread Jakub Jelinek
Hi! I've noticed a lot of diagnostic messages in the C FE aren't marked for translation. The reason is some weird coding style which wraps the string literals into (), especially when they don't fit on a single line. With that fixed, there were 83 unique similar messages "both % and % in declarati

Re: [PATCH 1/2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-05 Thread Richard Biener
On Fri, Sep 5, 2025 at 9:23 AM Jakub Jelinek wrote: > > On Fri, Sep 05, 2025 at 08:35:43AM +0200, Richard Biener wrote: > > > i.e. keep it as a call to an optimization barrier until runtime > > > but don't really do anything at that point. > > > > That's probably equivalent to the builtin. > > But

Re: [PATCH v3 0/2] libstdc++: Implement the constant_wrapper paper P2781R9.

2025-09-05 Thread Luc Grosheintz
On 9/5/25 09:17, Tomasz Kaminski wrote: I have posted v4 for PATCH 1/2 that adds data member tests. Both patches looks good to me. Thank you very much for your continued high quality contributions. Nice addition! Likewise thank you for the speedy reviews, answers and taking care of getting t

Re: [PATCH] tree-optimization: fabs(a+0.0) -> fabs(a) for non trapping case

2025-09-05 Thread Richard Biener
On Thu, Sep 4, 2025 at 4:15 PM Matteo Nicoli wrote: > > Dear Richard, > > No, I don’t have access to gcc git. Anyway, I updated the patch description > and attached here the new patch. Please always state how you tested a patch. This one doesn't compile because: ../../gcc/gcc/match.pd:2050:56

Re: [PATCH v2 1/3] LoongArch: Fix the semantic of 16B CAS

2025-09-05 Thread Lulu Cheng
在 2025/8/22 下午4:14, Xi Ruoyao 写道: In a CAS operation, even if expected != *memory we still need to do an atomic load of *memory into output. But I made a mistake in the initial implementation, causing the output to contain junk in this situation. Like a normal atomic load, the atomic load emb

Re: [PATCH v3 0/2] libstdc++: Implement the constant_wrapper paper P2781R9.

2025-09-05 Thread Tomasz Kaminski
I have posted v4 for PATCH 1/2 that adds data member tests. Both patches looks good to me. Thank you very much for your continued high quality contributions. On Thu, Sep 4, 2025 at 2:21 PM Luc Grosheintz wrote: > The changes since v2 are in the test code: > > - There's a short test for string

[PATCH v4 1/2] libstdc++: Implement constant_wrapper, cw from P2781R9.

2025-09-05 Thread Tomasz Kamiński
From: Luc Grosheintz This is a partial implementation of P2781R9. It adds std::cw and std::constant_wrapper, but doesn't modify __integral_constant_like for span/mdspan. libstdc++-v3/ChangeLog: * include/bits/version.def (constant_wrapper): Add. * include/bits/version.h: Regener

  1   2   >