[PATCH 2/3] tree: Add 7 and 8 argument TREE_CHECK_* and TREE_NOT_CHECK_*

2025-07-08 Thread Alex (Waffl3x)
From 0403104f65dd8cce4c71270d492d0922a7f2702c Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Tue, 8 Jul 2025 19:28:12 -0600 Subject: [PATCH 2/3] tree: Add 7 and 8 argument TREE_CHECK_* and TREE_NOT_CHECK_* I needed an 8 argument version of TREE_NOT_CHECK_*, it felt wrong to leave a gap so the oth

[PATCH 3/3] middle-end/121005 Add checks for TREE_LANG_FLAG_*

2025-07-08 Thread Alex (Waffl3x)
From 11f2b46bb882c427f45f194196d89b22ec470240 Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Tue, 8 Jul 2025 19:52:05 -0600 Subject: [PATCH 3/3] middle-end/121005 Add checks for TREE_LANG_FLAG_* TREE_LANG_FLAG_* is only valid for tree codes that do not use other union fields in tree_base, previous

[PATCH 1/3] tree: Add TREE_NOT_RANGE_CHECK

2025-07-08 Thread Alex (Waffl3x)
From d7107c64189f944adfb64f9e8acfb7ed2cbfe796 Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Tue, 8 Jul 2025 19:25:20 -0600 Subject: [PATCH 1/3] tree: Add TREE_NOT_RANGE_CHECK There was no inverted counterpart to TREE_RANGE_CHECK, this adds one. gcc/ChangeLog: * tree.cc (tree_not_range_check_fa

RE: [PATCH V3] x86: Enable separate shrink wrapping

2025-07-08 Thread Cui, Lili
> -Original Message- > From: Segher Boessenkool > Sent: Wednesday, July 9, 2025 1:13 AM > To: Cui, Lili > Cc: ubiz...@gmail.com; gcc-patches@gcc.gnu.org; Liu, Hongtao > ; richard.guent...@gmail.com; Michael Matz > > Subject: Re: [PATCH V3] x86: Enable separate shrink wrapping > > Hi! >

[PATCH 0/3] middle-end/121005 Add checks for TREE_LANG_FLAG_*

2025-07-08 Thread Alex (Waffl3x)
This set of patches are not tested quite yet, I'm going to start it as soon as I finish this e-mail. I would really like to implement the multiple argument tree_check* and tree_not_check* as a variadic template. I know how to do it in such a way that would limit the amount of instantiations, and

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-07-08 Thread Kugan Vivekanandarajah
Hi Honza, > On 28 Jun 2025, at 1:04 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > > HI, > I have tested your patch on exchange2 and noticed multiple problems: > 1) with LTO the translation from dwarf names to symbol names is disabled > since we fr

[PATCH v1] RISCV: Remove the v extension requirement for sat scalar run test

2025-07-08 Thread pan2 . li
From: Pan Li The sat scalar run test should not require the v extension, thus take rv32 || rv64 instead of riscv_v for the requirement. The below test suites are passed for this patch series. * The rv64gcv fully regression test. * The rv32gcv fully regression test. gcc/testsuite/ChangeLog:

[PATCH v2 2/3] tree: Add 7 and 8 argument TREE_[NOT_]CHECK_*

2025-07-08 Thread Alex (Waffl3x)
From 979825e4528bebf5ed83b5580e3d39fb738f43b7 Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Tue, 8 Jul 2025 19:28:12 -0600 Subject: [PATCH 2/3] tree: Add 7 and 8 argument TREE_[NOT_]CHECK_* I needed an 8 argument version of TREE_NOT_CHECK_*, it felt wrong to leave a gap so the other versions are

[PATCH v2 1/3] tree: Add TREE_NOT_RANGE_CHECK

2025-07-08 Thread Alex (Waffl3x)
Fixed some very obvious errors that should have been fixed before I submitted v1, lesson learned this time I hope. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? From 32fa771d65eeca675d268bcf96b654fe5ac64eaf Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Tue, 8 Jul 2025 19:25:20 -0600

Re: [PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Tomasz Kaminski
On Tue, Jul 8, 2025 at 11:34 AM Jonathan Wakely wrote: > On Tue, 8 Jul 2025 at 09:27, Luc Grosheintz > wrote: > > > > PR libstdc++/107761 > > > > libstdc++-v3/ChangeLog: > > > > * include/bits/version.def (mdspan): Set to 202207 and remove > > no_stdname. > > * in

Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R2

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 13:24, Jonathan Wakely wrote: > > On Tue, 8 Jul 2025 at 12:54, Paul Keir wrote: > > > > Let me know if this needs a refresh. > > The patch fails to apply: > > error: patch failed: libstdc++-v3/include/bits/shared_ptr_base.h:1715 > error: libstdc++-v3/include/bits/shared_ptr_

[PATCH] Avoid IPA opts around guality plumbing

2025-07-08 Thread Richard Biener
The following avoids inlining the actual main() (renamed to guality_main) into the guality plumbing. This can cause jump threading opportunities to appear and generally increase the chance what we actually test isn't what we think. Likewise make guality_check noipa instead of just noinline. Boot

Re: [PATCH] x86: Keep non all 0s/1s redundant vector loads on AMD znverN

2025-07-08 Thread Richard Biener
On Tue, Jul 8, 2025 at 12:48 PM H.J. Lu wrote: > > aba3b9d3a48a0703fd565f7c5f0caf604f59970b is the first bad commit > commit aba3b9d3a48a0703fd565f7c5f0caf604f59970b > Author: H.J. Lu > Date: Fri May 9 07:17:07 2025 +0800 > > x86: Extend the remove_redundant_vector pass > > which removed no

Re: [PATCH v5 0/2] tree-optimization: extend scalar comparison folding to vectors [PR119196]

2025-07-08 Thread Richard Biener
On Tue, 8 Jul 2025, Icen Zeyada wrote: > > New in V5: > Added a check to confirm that the target is supported. OK. Thanks, Richard. > --- > > This patch generalizes existing scalar bitwise comparison simplifications > to vect

Re: [PATCH] libstdc++: Make debug iterator pointer sequence const [PR116369]

2025-07-08 Thread Jonathan Wakely
On Mon, 7 Jul 2025 at 11:12, Jonathan Wakely wrote: > > On Sat, 5 Jul 2025 at 14:03, François Dumont wrote: > > > > On 01/07/2025 22:51, Jonathan Wakely wrote: > > > On Mon, 16 Jun 2025 at 18:36, François Dumont > > > wrote: > > >> I eventually wonder if it is such a big deal to add the new sym

Re: [PATCH] libstdc++: Fix attribute order on __normal_iterator friends [PR120949]

2025-07-08 Thread Tomasz Kaminski
On Sat, Jul 5, 2025 at 1:27 AM Jonathan Wakely wrote: > In r16-1911-g6596f5ab746533 I claimed to have reordered some attributes > for compatibility with Clang, but it looks like I got the Clang > restriction backwards and put them all in the wrong order. > > libstdc++-v3/ChangeLog: > > PR

Re: [PATCH] libstdc++: Ensure pool resources meet alignment requirements [PR118681]

2025-07-08 Thread Tomasz Kaminski
On Sat, Jul 5, 2025 at 1:12 AM Jonathan Wakely wrote: > For allocations with size > alignment and size % alignment != 0 we were > sometimes returning pointers that did not meet the requested aligment. > For example, allocate(24, 16) would select the pool for 24-byte objects > and the second alloc

Re: [PATCH 0/1] [RFC][AutoFDO]: Source filename tracking in GCOV

2025-07-08 Thread Jan Hubicka
> Hi Honza, > > > On 8 Jul 2025, at 2:26 am, Jan Hubicka wrote: > > > > External email: Use caution opening links or attachments > > > > > > Hi, > > as discussed also on the autofdo pull request, LLVM solves the same > > problem using -funique-internal-linkage-names > > https://reviews.llvm.or

Re: [PATCH] Avoid IPA opts around guality plumbing

2025-07-08 Thread Jakub Jelinek
On Tue, Jul 08, 2025 at 03:17:39PM +0200, Richard Biener wrote: > The following avoids inlining the actual main() (renamed to > guality_main) into the guality plumbing. This can cause > jump threading opportunities to appear and generally increase > the chance what we actually test isn't what we t

Re: [PATCH] libstdc++: Ensure pool resources meet alignment requirements [PR118681]

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 14:12, Tomasz Kaminski wrote: > > > > On Tue, Jul 8, 2025 at 2:48 PM Jonathan Wakely wrote: >> >> On Tue, 8 Jul 2025 at 13:31, Tomasz Kaminski wrote: >> > >> > >> > >> > On Sat, Jul 5, 2025 at 1:12 AM Jonathan Wakely wrote: >> >> >> >> For allocations with size > alignment

[COMMITTED] s390: Always compute address of stack protector guard

2025-07-08 Thread Stefan Schulze Frielinghaus
Computing the address of the thread pointer on s390 involves multiple instructions and therefore bears the risk that the address of the canary or intermediate values of it are spilled after prologue in order to be reloaded for the epilogue. Since there exists no mechanism to ensure that a value is

Re: [PATCH] libstdc++: Fix attribute order on __normal_iterator friends [PR120949]

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 13:26, Tomasz Kaminski wrote: > > > > On Sat, Jul 5, 2025 at 1:27 AM Jonathan Wakely wrote: >> >> In r16-1911-g6596f5ab746533 I claimed to have reordered some attributes >> for compatibility with Clang, but it looks like I got the Clang >> restriction backwards and put them

Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL.

2025-07-08 Thread Richard Biener
On Tue, Jul 8, 2025 at 3:45 PM Robert Dubner wrote: > > > -Original Message- > > From: Andreas Schwab > > Sent: Tuesday, July 8, 2025 03:16 > > To: Robert Dubner > > Cc: Rainer Orth ; gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL. > > > > On Jul 07

Re: [PATCH] riscv: allow zero in zacas subword atomic cas

2025-07-08 Thread Andreas Schwab
Please fix your git to remove the subject prefix. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R2

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 12:54, Paul Keir wrote: > > Let me know if this needs a refresh. The patch fails to apply: error: patch failed: libstdc++-v3/include/bits/shared_ptr_base.h:1715 error: libstdc++-v3/include/bits/shared_ptr_base.h: patch does not apply but I think it's your mail client mungi

Re: [PATCH v2] Handle non default git prefix configurations

2025-07-08 Thread Alexander Monakov
On Mon, 7 Jul 2025, Pierre-Emmanuel Patry wrote: > Mklog parses the diff content from prepare-commit-msg hook but fails > when git has been configured with mnemonicPrefix. Forcing the default > values for the prefixes would set a distinct diff configuration supported > by mklog and prevent most

[PATCH v5 2/2] gimple-fold: extend vector simplification to match scalar bitwise optimizations [PR119196]

2025-07-08 Thread Icen Zeyada
Generalize existing scalar gimple_fold rules to apply the same bitwise comparison simplifications to vector types. Previously, an expression like (x < y) && (x > y) would fold to `false` if x and y are scalars, but equivalent vector comparisons were left untouched. T

[PATCH v5 0/2] tree-optimization: extend scalar comparison folding to vectors [PR119196]

2025-07-08 Thread Icen Zeyada
New in V5: Added a check to confirm that the target is supported. --- This patch generalizes existing scalar bitwise comparison simplifications to vector types by matching patterns of the form ``` (cmp x y) bit_and (cmp x y) (

[PATCH v5 1/2] tree-simplify: unify simple_comparison ops in vec_cond for bit and/or/xor [PR119196]

2025-07-08 Thread Icen Zeyada
Merge simple_comparison patterns under a single vec_cond_expr for bit_and, bit_ior, and bit_xor in the simplify pass. Ensure that when both operands of a bit_and, bit_or, or bit_xor are simple_comparison results, they reside within the same vec_cond_expr rather than separate ones. This prepares t

Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R2

2025-07-08 Thread Paul Keir
Let me know if this needs a refresh. From: Paul Keir Sent: 06 June 2025 5:32 PM To: Jonathan Wakely Cc: gcc-patches@gcc.gnu.org; libstd...@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R

Re: [PATCH] Check backend when setting DECL_ALIGN for PARM_DECL

2025-07-08 Thread Jason Merrill
On 7/8/25 4:35 AM, Richard Biener wrote: On Mon, Jul 7, 2025 at 11:33 PM H.J. Lu wrote: On Tue, Jul 8, 2025 at 5:02 AM H.J. Lu wrote: On Mon, Jul 7, 2025 at 11:08 PM Jason Merrill wrote: On 7/1/25 5:36 PM, H.J. Lu wrote: On Tue, Jul 1, 2025 at 9:37 PM Jason Merrill wrote: On 6/30/25

Re: [PATCH] libstdc++: Ensure pool resources meet alignment requirements [PR118681]

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 14:12, Tomasz Kaminski wrote: > > > > On Tue, Jul 8, 2025 at 2:48 PM Jonathan Wakely wrote: >> >> On Tue, 8 Jul 2025 at 13:31, Tomasz Kaminski wrote: >> > >> > >> > >> > On Sat, Jul 5, 2025 at 1:12 AM Jonathan Wakely wrote: >> >> >> >> For allocations with size > alignment

Re: [PATCH] libstdc++: Make debug iterator pointer sequence const [PR116369]

2025-07-08 Thread François Dumont
Now fixed as trivial, I set you as author. François On 08/07/2025 13:55, Jonathan Wakely wrote: On Mon, 7 Jul 2025 at 11:12, Jonathan Wakely wrote: On Sat, 5 Jul 2025 at 14:03, François Dumont wrote: On 01/07/2025 22:51, Jonathan Wakely wrote: On Mon, 16 Jun 2025 at 18:36, François Dumont

Re: [PATCH v2] xtensa: Fix B[GE/LT]UI instructions with immediate values of 32768 or 65536 not being emitted

2025-07-08 Thread Max Filippov
On Mon, Jul 7, 2025 at 7:40 AM Takayuki 'January June' Suwa wrote: > > This is because in canonicalize_comparison() in gcc/expmed.cc, the COMPARE > rtx_cost() for the immediate values in the title does not change between > the old and new versions. This patch fixes that. > > (note: Currently, thi

Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R2

2025-07-08 Thread Paul Keir
Thanks Jonathan. From: Jonathan Wakely Sent: 08 July 2025 1:37 PM To: Paul Keir Cc: gcc-patches@gcc.gnu.org; libstd...@gcc.gnu.org Subject: Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R2 Warning: Do no

Re: [PATCH] tree-optimization/120929: Limit MEM_REF handling to .ACCESS_WITH_SIZE

2025-07-08 Thread Qing Zhao
I just updated PR121000: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121000. Yes, the root cause is exactly what you mentioned in the other email: “ The IL must clearly use the value (the size of the element), otherwise DCE or other passes will happily optimize it away, they don't keep some expr

[PATCH] c++: optional template after :: causing error [PR119838]

2025-07-08 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Found while working on Reflection where we currently reject: constexpr auto r = ^^::template C::type; which should work, because "::template C::" should match the nested-name-specifier template(opt) simple-template-id ::

Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL.

2025-07-08 Thread James K. Lowden
On Tue, 8 Jul 2025 14:11:19 -0500 (CDT) Robert Dubner wrote: > But I have other requirements. I apologize if I keep repeating > myself, but I am being forced to. > > I want to be able to, for example, > > CXXFLAGS='-ggdb -O0' > CXXFLAGS_FOR_COBOL="-Wsomething_or_other" ../configure

[PATCH v2 3/3] middle-end/121005 Add checks for TREE_LANG_FLAG_*

2025-07-08 Thread Alex (Waffl3x)
From df25e9a27938123e4e3737f1532b402b0fd320e3 Mon Sep 17 00:00:00 2001 From: Waffl3x Date: Tue, 8 Jul 2025 19:52:05 -0600 Subject: [PATCH 3/3] middle-end/121005 Add checks for TREE_LANG_FLAG_* TREE_LANG_FLAG_* is only valid for tree codes that do not use other union fields in tree_base, previous

Re: [PATCH v2 3/3] middle-end/121005 Add checks for TREE_LANG_FLAG_*

2025-07-08 Thread Jakub Jelinek
On Tue, Jul 08, 2025 at 11:54:23PM -0600, Alex (Waffl3x) wrote: > --- a/gcc/tree.h > +++ b/gcc/tree.h > @@ -571,6 +571,15 @@ extern void omp_clause_range_check_failed (const_tree, > const char *, int, >TREE_CHECK6 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, REAL_TYPE, > \ >

[PATCH 1/2] Change how --param fsm-scale-path-stmts works

2025-07-08 Thread Richard Biener
Currently we scale the number of stmts allowed for forward jump threading to limit those for backwards jump threading by applying a factor of two to the counted stmts. That doesn't allow fine-grained adjustments, like by a single stmt as needed for PR109893. The following changes the factor to be

[PATCH 2/2] tree-optimization/109893 - allow more backwards jump threading

2025-07-08 Thread Richard Biener
The following changes the percentage that determines how many stmts are allowed for backwards jump threading from 50 to 54, enabling the missed jump threading observed in PR109893. Bootstrapped and tested on x86_64-unknown-linux-gnu. It seems that at least backward threading is prone to profile m

Re: [PATCH v4 1/2] tree-simplify: unify simple_comparison ops in vec_cond for bit and/or/xor [PR119196]

2025-07-08 Thread Richard Biener
On Thu, 3 Jul 2025, Icen Zeyada wrote: > Merge simple_comparison patterns under a single vec_cond_expr for bit_and, > bit_ior, and bit_xor in the simplify pass. > > Ensure that when both operands of a bit_and, bit_or, or bit_xor are > simple_comparison > results, they reside within the same vec_

Re: [PATCH v4 2/2] gimple-fold: extend vector simplification to match scalar bitwise optimizations [PR119196]

2025-07-08 Thread Richard Biener
On Thu, 3 Jul 2025, Icen Zeyada wrote: > Generalize existing scalar gimple_fold rules to apply the same > bitwise comparison simplifications to vector types. Previously, an > expression like > > (x < y) && (x > y) > > would fold to `false` if x and y are scalars, but equ

Re: [PATCH 3/7] aarch64: Handle DImode BCAX operations

2025-07-08 Thread Richard Sandiford
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Monday, July 7, 2025 12:55 PM >> To: Kyrylo Tkachov >> Cc: GCC Patches ; Richard Earnshaw >> ; Alex Coplan ; Andrew >> Pinski >> Subject: Re: [PATCH 3/7] aarch64: Handle DImode BCAX operations >> >> Richa

RE: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL.

2025-07-08 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Tuesday, July 8, 2025 14:22 > To: Robert Dubner > Cc: Rainer Orth ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL. > > On Tue, Jul 8, 2025 at 12:46 AM Robert Dubner wrote: > > > > > > > > > -Orig

Re: [PATCH] x86: Keep non all 0s/1s redundant vector loads on AMD znverN

2025-07-08 Thread H.J. Lu
On Tue, Jul 8, 2025 at 7:26 PM Richard Biener wrote: > > On Tue, Jul 8, 2025 at 12:48 PM H.J. Lu wrote: > > > > aba3b9d3a48a0703fd565f7c5f0caf604f59970b is the first bad commit > > commit aba3b9d3a48a0703fd565f7c5f0caf604f59970b > > Author: H.J. Lu > > Date: Fri May 9 07:17:07 2025 +0800 > > >

[PATCH] libstdc++: Add more template keywords to for Clang

2025-07-08 Thread Jonathan Wakely
This fixes: include/c++/16.0.0/mdspan:1182:33: error: use 'template' keyword to treat 'mapping' as a dependent template name 1182 | const typename _OLayout::mapping<_OExtents>&> |^ include/c++/16.0.0/mdspan:1185:31: error: use 'template

[PATCH] libstdc++: Fix __uninitialized_default for constexpr case

2025-07-08 Thread Jonathan Wakely
We should not use the std::fill optimization for trivial types during constant evaluation, because we need to begin the lifetime of all objects, even trivially default constructible ones. This fixes a bug that Clang diagnosed: include/c++/16.0.0/bits/stl_algobase.h:925:11: note: assignment to obj

[PATCH] libstdc++: Do not use list-initialization in std::span members [PR120997]

2025-07-08 Thread Jonathan Wakely
As the bug report shows, for span the return statements of the form `return {data(), count};` will use the new C++26 constructor, span(initializer_list). Although the conversions from data() to bool and count to bool are narrowing and should be ill-formed, in system headers the narrowing diagnosti

Re: [PATCH] tree-optimization/120929: Limit MEM_REF handling to .ACCESS_WITH_SIZE

2025-07-08 Thread Siddhesh Poyarekar
On 2025-07-08 17:17, Qing Zhao wrote: Are the above the correct and efficient updates to the .ACCESS_WITH_SIZE to resolve both PR121000 and the issue we have with counted_by for pointers? I don't know about PR121000, but for counted_by with pointers, I think the REF_TO_OBJ (and the result_typ

[PATCH] libstdc++: Implement std::chrono::current_zone() for Windows

2025-07-08 Thread Björn Schäpers
From: Björn Schäpers I have based this on my previous (not yet landed) patch, but it only reuses the #ifdef to include . Since std::array isn't used anywhere else I thought that was the right place to put it. I hope the formatting is okay. I've used wide strings for the Windows zone name and te

RE: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL.

2025-07-08 Thread Robert Dubner
> -Original Message- > From: Andreas Schwab > Sent: Tuesday, July 8, 2025 10:01 > To: Robert Dubner > Cc: Rainer Orth ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL. > > There is already $(CFLAGS-$@) to add extra flags for a particular > target. Thi

Re: [PATCH] tree-optimization/120929: Limit MEM_REF handling to .ACCESS_WITH_SIZE

2025-07-08 Thread Qing Zhao
Hi, Jakub, Thanks a lot for your comments and suggestions. Please see my questions below: > On Jul 7, 2025, at 17:47, Jakub Jelinek wrote: > > On Mon, Jul 07, 2025 at 09:18:53PM +, Qing Zhao wrote: >> From OLD: >> >> _2 = &a->c; >> _3 = &a->count; >> _1 = .ACCESS_WITH_SIZE (_2, _3, 1, 0, -

[committed] libstdc++: Fix double free in new pool resource test [PR118681]

2025-07-08 Thread Jonathan Wakely
This was supposed to free p1 and p2, not free p2 twice. libstdc++-v3/ChangeLog: PR libstdc++/118681 * testsuite/20_util/unsynchronized_pool_resource/118681.cc: Fix deallocate argument. --- Tested x86_64-linux. Pushed to trunk. Thanks to Daniel Boles for noticing this.

Re: [SNAPv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-08 Thread Tomasz Kaminski
On Tue, Jul 8, 2025 at 5:41 AM Nathan Myers wrote: > This is a snapshot of work in progress, for reference. > bind_front(...) is uglified directly from the sample > implementation in P2714, at include/std/functional:1284 . > > Test failures: > > bind_front/1.cc:53: error: static assertion failed

Re: [Ping, Fortran, Patch, PR120637, v1] Ensure expression in finalizer creation is freed only when unused.

2025-07-08 Thread Andre Vehreschild
Hi Jerry, thanks for the review. Pushed as gcc-16-2086-gd1f05661fa6. Thanks again, Andre On Mon, 7 Jul 2025 10:49:50 -0700 Jerry D wrote: > On 7/7/25 8:39 AM, Andre Vehreschild wrote: > > Ping! > > > OK for mainline. > > Thanks, > > Jerry > > > > On Thu, 26 Jun 2025 15:32:47 +0

Re: [PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Luc Grosheintz
On 7/8/25 11:32, Jonathan Wakely wrote: On Tue, 8 Jul 2025 at 09:27, Luc Grosheintz wrote: PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove no_stdname. * include/bits/version.h: Regenerate.

[PATCH] testsuite: i386: Fix gcc.target/i386/memcpy-pr120683-1.c etc. on Solaris/x86

2025-07-08 Thread Rainer Orth
The new tests from commit 401199377c50045ede560daf3f6e8b51749c2a87 Author: H.J. Lu Date: Tue Jun 17 10:17:17 2025 +0800 x86: Improve vector_loop/unrolled_loop for memset/memcpy FAIL on 64-bit Solaris/x86: FAIL: gcc.target/i386/memcpy-pr120683-1.c check-function-bodies foo FAIL: gcc.targe

Re: [PATCH v2] libstdc++: Search for tzdata on Windows (msys)

2025-07-08 Thread Björn Schäpers
Am 08.07.2025 um 12:01 schrieb Jonathan Wakely: On Mon, 7 Jul 2025 at 23:53, Björn Schäpers wrote: From: Björn Schäpers Windows does not provide a tzdata.zi, but msys does. Use this, if available, instead of the embedded (and possibly outdated) database. libstdc++-v3/Changelog: Us

RE: [PATCH 3/7] aarch64: Handle DImode BCAX operations

2025-07-08 Thread Tamar Christina
> -Original Message- > From: Richard Sandiford > Sent: Tuesday, July 8, 2025 10:07 AM > To: Tamar Christina > Cc: Kyrylo Tkachov ; GCC Patches patc...@gcc.gnu.org>; Richard Earnshaw ; Alex > Coplan ; Andrew Pinski > Subject: Re: [PATCH 3/7] aarch64: Handle DImode BCAX operations > > Ta

Re: [PATCH v2] libstdc++: Search for tzdata on Windows (msys)

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 11:31, Björn Schäpers wrote: > > Am 08.07.2025 um 12:01 schrieb Jonathan Wakely: > > On Mon, 7 Jul 2025 at 23:53, Björn Schäpers wrote: > >> > >> From: Björn Schäpers > >> > >> Windows does not provide a tzdata.zi, but msys does. Use this, if > >> available, instead of the

Re: [PATCH] testsuite: i386: Fix gcc.target/i386/memcpy-pr120683-1.c etc. on Solaris/x86

2025-07-08 Thread H.J. Lu
On Tue, Jul 8, 2025 at 6:26 PM Rainer Orth wrote: > > The new tests from > > commit 401199377c50045ede560daf3f6e8b51749c2a87 > Author: H.J. Lu > Date: Tue Jun 17 10:17:17 2025 +0800 > > x86: Improve vector_loop/unrolled_loop for memset/memcpy > > FAIL on 64-bit Solaris/x86: > > FAIL: gcc.t

Re: [PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Tomasz Kaminski
On Tue, Jul 8, 2025 at 12:08 PM Jonathan Wakely wrote: > On Tue, 8 Jul 2025 at 10:54, Luc Grosheintz > wrote: > > > > This implements P3029R1. In P3029R1, the CTAD for span is refined to > > permit deducing the extent of the span from an integral constant, e.g. > > > > span((T*) ptr, integral_

[PATCH] x86: Keep non all 0s/1s redundant vector loads on AMD znverN

2025-07-08 Thread H.J. Lu
aba3b9d3a48a0703fd565f7c5f0caf604f59970b is the first bad commit commit aba3b9d3a48a0703fd565f7c5f0caf604f59970b Author: H.J. Lu Date: Fri May 9 07:17:07 2025 +0800 x86: Extend the remove_redundant_vector pass which removed non all 0s/1s redundant vector loads, caused SPEC CPU 2017 519.lbm

Re: [Fortran, Patch, PR120711, v1] 1/(3) Fix out of bounds access in cleanup of array constructor

2025-07-08 Thread Andre Vehreschild
HI Harald, hi Mikael, why shall the testcase be invalid? The `list` is empty. Concatenating with it is valid in Fortran like in most other programming languages. The mapping of an empty list in gfortran is to have the array's data pointer set to NULL and the ubound below the lbound. Current gfortr

Re: [Fortran, Patch, PR120711, v1] 1/(3) Fix out of bounds access in cleanup of array constructor

2025-07-08 Thread Harald Anlauf
Am 09.07.25 um 08:50 schrieb Andre Vehreschild: HI Harald, hi Mikael, why shall the testcase be invalid? The `list` is empty. Concatenating with it is valid in Fortran like in most other programming languages. The mapping of an empty list in gfortran is to have the array's data pointer set to NU

Re: [PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 11:46, Tomasz Kaminski wrote: > > > > On Tue, Jul 8, 2025 at 12:08 PM Jonathan Wakely wrote: >> >> On Tue, 8 Jul 2025 at 10:54, Luc Grosheintz wrote: >> > >> > This implements P3029R1. In P3029R1, the CTAD for span is refined to >> > permit deducing the extent of the span f

Re: [PATCH v2 1/2] libstdc++: Silence a warning in a test for span.

2025-07-08 Thread Jonathan Wakely
OK On Tue, 8 Jul 2025 at 10:50, Luc Grosheintz wrote: > > In a test of span, there's an unused variable myspan. This > commit silences the warning. > > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/span/contiguous_range_neg.cc: Silence > warning about unused variable myspa

Re: [PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Tomasz Kaminski
On Tue, Jul 8, 2025 at 12:26 PM Luc Grosheintz wrote: > > On 7/8/25 11:32, Jonathan Wakely wrote: > > On Tue, 8 Jul 2025 at 09:27, Luc Grosheintz > wrote: > >> > >> PR libstdc++/107761 > >> > >> libstdc++-v3/ChangeLog: > >> > >> * include/bits/version.def (mdspan): Set to 20220

Re: [PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Tomasz Kaminski
Maybe adding a negative test for the error when converting negative values would be valuable then. I think we can add it as separate commit later, I will try to get everything merged today, On Tue, Jul 8, 2025 at 12:56 PM Jonathan Wakely wrote: > On Tue, 8 Jul 2025 at 11:46, Tomasz Kaminski wro

[PATCH 2/2]middle-end: Use rounding division for ranges for partial vectors [PR120922]

2025-07-08 Thread Tamar Christina
This patch adds support for niters ranges for partial vector loops. Due to the last iteration being partial the bounds should be at least 1 but niters // vf as the max. Bootstrapped Regtested on aarch64-none-linux-gnu, arm-none-linux-gnueabihf, x86_64-pc-linux-gnu -m32, -m64 and no issues. Teste

[PATCH] riscv: allow zero in zacas subword atomic cas

2025-07-08 Thread Andreas Schwab
gcc: PR target/120995 * config/riscv/sync.md (zacas_atomic_cas_value_strong): Allow op3 to be zero. gcc/testsuite: PR target/120995 * gcc.target/riscv/amo/zabha-zacas-atomic-cas.c: New test. --- gcc/config/riscv/sync.md | 2 +-

Re: [PATCH v4 1/2] tree-simplify: unify simple_comparison ops in vec_cond for bit and/or/xor [PR119196]

2025-07-08 Thread Icen Zeyada
From: Richard Biener Sent: 08 July 2025 10:01 To: Icen Zeyada Cc: gcc-patches@gcc.gnu.org ; jeffreya...@gmail.com ; i...@airs.com ; Richard Earnshaw ; pins...@gmail.com ; Victor Do Nascimento ; Tamar Christina Subject: Re: [PATCH v4 1/2] tree-simplify: unify

Re: [PATCH v4 1/2] tree-simplify: unify simple_comparison ops in vec_cond for bit and/or/xor [PR119196]

2025-07-08 Thread Richard Biener
On Tue, 8 Jul 2025, Icen Zeyada wrote: > > > From: Richard Biener > Sent: 08 July 2025 10:01 > To: Icen Zeyada > Cc: gcc-patches@gcc.gnu.org ; jeffreya...@gmail.com > ; i...@airs.com ; Richard Earnshaw > ; pins...@gmail.com ; Victor Do > Nascimento ; Tamar Ch

Re: [PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 09:27, Luc Grosheintz wrote: > > PR libstdc++/107761 > > libstdc++-v3/ChangeLog: > > * include/bits/version.def (mdspan): Set to 202207 and remove > no_stdname. > * include/bits/version.h: Regenerate. > * testsuite/23_containers/mdspan/

[committed] s390: Split tests for 31bit support

2025-07-08 Thread Juergen Christ
The new vector pattern tests used int128 without guard. This causes failure on 31bit targets. Split the tests such that the tests requiring 128 bit support are only executed on targets supporting them. Committed as obvious. Signed-off-by: Juergen Christ gcc/testsuite/ChangeLog: * gcc

Re: [PATCH v4 5/6] libstdc++: Implement mdspan and tests [PR107761].

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 09:26, Luc Grosheintz wrote: > > Implements the class mdspan as described in N4950, i.e. without P3029. > It also adds tests for mdspan. This commit completes the implementation > of P0009, i.e. the C++23 part . > > PR libstdc++/107761 > > libstdc++-v3/ChangeLog: > >

Re: [PATCH v4 0/6] Implement mdspan.

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 09:26, Luc Grosheintz wrote: > > Patches 1/5 ... 4/5 aren't sent because corresponding commits from v3 > should be used. The changes for 5/5 are: > > * Fix ADL issue in swap and create tests. > * Replace pragma once with include guard in layout_like.h. > * Use VERIFY(md

Re: [PATCH v2] libstdc++: Search for tzdata on Windows (msys)

2025-07-08 Thread Jonathan Wakely
On Mon, 7 Jul 2025 at 23:53, Björn Schäpers wrote: > > From: Björn Schäpers > > Windows does not provide a tzdata.zi, but msys does. Use this, if > available, instead of the embedded (and possibly outdated) database. > > libstdc++-v3/Changelog: > > Use msys provided time zone information.

[PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Luc Grosheintz
This implements P3029R1. In P3029R1, the CTAD for span is refined to permit deducing the extent of the span from an integral constant, e.g. span((T*) ptr, integral_constant{}); is deduced as span. Similarly, in auto exts = extents(integral_constant); auto md = mdspan((T*) ptr, integral_con

[PATCH v2 1/2] libstdc++: Silence a warning in a test for span.

2025-07-08 Thread Luc Grosheintz
In a test of span, there's an unused variable myspan. This commit silences the warning. libstdc++-v3/ChangeLog: * testsuite/23_containers/span/contiguous_range_neg.cc: Silence warning about unused variable myspan. Signed-off-by: Luc Grosheintz --- .../testsuite/23_containers/sp

Re: [SNAPv4] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-07-08 Thread Tomasz Kaminski
To test forwarding, I would suggest using a by-value member: struct F { quals operator()(int&) const { return { false, true }; } quals operator()(int const&) const { return { true, true }; } quals operator()(int&&) const { return { false, false }; } quals operator()(int const&&)

Re: [PATCH v2 2/2] libstdc++: Better CTAD for span and mdspan [PR120914].

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 10:54, Luc Grosheintz wrote: > > This implements P3029R1. In P3029R1, the CTAD for span is refined to > permit deducing the extent of the span from an integral constant, e.g. > > span((T*) ptr, integral_constant{}); > > is deduced as span. Similarly, in > > auto exts = ex

Re: [PATCH v2] libstdc++: Search for tzdata on Windows (msys)

2025-07-08 Thread Jonathan Wakely
On Mon, 7 Jul 2025 at 23:53, Björn Schäpers wrote: > > From: Björn Schäpers > > Windows does not provide a tzdata.zi, but msys does. Use this, if > available, instead of the embedded (and possibly outdated) database. > > libstdc++-v3/Changelog: > > Use msys provided time zone information.

Re: [PATCH] libstdc++: Do not expose set_brackets/set_separator for formatter with format_kind other than sequence [PR119861]

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 09:23, Tomasz Kamiński wrote: > > The standard defines separate specializations of range-default-formatter, out > of which only one for range_format::sequence provide the set_brackets and > set_separator methods. We implemented it as one specialization and exposed > this meth

Re: [PATCH v1 0/3] Implement aligned_accessor [P2897R7].

2025-07-08 Thread Luc Grosheintz
How would you like to track this on bugzilla: 1. As part of submdspan: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110352 https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2630r4.html 2. As a new issue, because it's a different paper: https://www.open-std.org/jtc1/sc22/wg21/do

Re: [PATCH v1 0/3] Implement aligned_accessor [P2897R7].

2025-07-08 Thread Tomasz Kaminski
I have created a separate bugzilla for it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120994 On Tue, Jul 8, 2025 at 9:58 AM Luc Grosheintz wrote: > How would you like to track this on bugzilla: > >1. As part of submdspan: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110352 >https:

[PATCH] libstdc++: Do not expose set_brackets/set_separator for formatter with format_kind other than sequence [PR119861]

2025-07-08 Thread Tomasz Kamiński
The standard defines separate specializations of range-default-formatter, out of which only one for range_format::sequence provide the set_brackets and set_separator methods. We implemented it as one specialization and exposed this method for range_format other than string or debug_string, i.e. whe

RE: [PATCH V3] x86: Enable separate shrink wrapping

2025-07-08 Thread Cui, Lili
> -Original Message- > From: Segher Boessenkool > Sent: Friday, July 4, 2025 9:21 PM > To: Cui, Lili > Cc: ubiz...@gmail.com; gcc-patches@gcc.gnu.org; Liu, Hongtao > ; richard.guent...@gmail.com; Michael Matz > > Subject: Re: [PATCH V3] x86: Enable separate shrink wrapping > > Hi! >

[PATCH v4 0/6] Implement mdspan.

2025-07-08 Thread Luc Grosheintz
Patches 1/5 ... 4/5 aren't sent because corresponding commits from v3 should be used. The changes for 5/5 are: * Fix ADL issue in swap and create tests. * Replace pragma once with include guard in layout_like.h. * Use VERIFY(md.empty()) when checking value initialization. Since the code for

Re: [PATCH] c-family: Check backend for argument alignment on stack

2025-07-08 Thread Richard Biener
On Mon, Jul 7, 2025 at 11:08 PM H.J. Lu wrote: > > On Mon, Jul 7, 2025 at 11:08 PM Jason Merrill wrote: > > > > On 7/1/25 5:36 PM, H.J. Lu wrote: > > > On Tue, Jul 1, 2025 at 9:37 PM Jason Merrill wrote: > > >> > > >> On 6/30/25 7:03 PM, H.J. Lu wrote: > > >>> On Mon, Jun 30, 2025 at 10:36 PM Ja

[PATCH v4 5/6] libstdc++: Implement mdspan and tests [PR107761].

2025-07-08 Thread Luc Grosheintz
Implements the class mdspan as described in N4950, i.e. without P3029. It also adds tests for mdspan. This commit completes the implementation of P0009, i.e. the C++23 part . PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/std/mdspan (mdspan): New class. * src/c++23

Re: [PATCH] libstdc++: Document that LWG 3881 is resolved, by using different apporach.

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025 at 08:35, Tomasz Kamiński wrote: > > libstdc++-v3/ChangeLog: > > * include/std/queue (formatter, _CharT>) > (formatter, _CharT>): > Add _GLIBCXX_RESOLVE_LIB_DEFECTS comments. OK thanks > --- > I would send this as committed, but realized, that there is

[PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Luc Grosheintz
PR libstdc++/107761 libstdc++-v3/ChangeLog: * include/bits/version.def (mdspan): Set to 202207 and remove no_stdname. * include/bits/version.h: Regenerate. * testsuite/23_containers/mdspan/ftm.cc: Test presence of FTM. Signed-off-by: Luc Grosheintz

Re: [PATCH v4 6/6] libstdc++: Set FMT for complete C++23 mdspan [PR107761].

2025-07-08 Thread Tomasz Kaminski
On Tue, Jul 8, 2025 at 10:26 AM Luc Grosheintz wrote: > PR libstdc++/107761 > > libstdc++-v3/ChangeLog: > > * include/bits/version.def (mdspan): Set to 202207 and remove > no_stdname. > * include/bits/version.h: Regenerate. > * testsuite/23_containers/mdspa

Re: [PATCH] Check backend when setting DECL_ALIGN for PARM_DECL

2025-07-08 Thread Richard Biener
On Mon, Jul 7, 2025 at 11:33 PM H.J. Lu wrote: > > On Tue, Jul 8, 2025 at 5:02 AM H.J. Lu wrote: > > > > On Mon, Jul 7, 2025 at 11:08 PM Jason Merrill wrote: > > > > > > On 7/1/25 5:36 PM, H.J. Lu wrote: > > > > On Tue, Jul 1, 2025 at 9:37 PM Jason Merrill wrote: > > > >> > > > >> On 6/30/25 7:

Re: [PATCH] libstdc++: provide debug impl of P2697 ctor [PR119742]

2025-07-08 Thread Tomasz Kaminski
LGTM. Thanks. On Mon, Jul 7, 2025 at 11:09 PM Nathan Myers wrote: > This adds the new bitset constructor from string_view > defined in P2697 to the debug version of the type. > > libstdc++-v3/Changelog: > PR libstdc++/119742 > * include/debug/bitset: Add new ctor. > --- > libstd

Re: [PATCH] cobol: Implement CXXFLAGS_FOR_COBOL.

2025-07-08 Thread Andreas Schwab
On Jul 07 2025, Robert Dubner wrote: > Furthermore, even if this method did work, I need the CXXFLAGS_FOR_COBOL > options to appear at the end of the list, not the beginning, since they > may need to override what came before. Why can't you use CXXFLAGS? -- Andreas Schwab, SUSE Labs, sch...@sus

Re: [PATCH] libstdc++: provide debug impl of P2697 ctor [PR119742]

2025-07-08 Thread Jonathan Wakely
On Tue, 8 Jul 2025, 08:04 Tomasz Kaminski, wrote: > LGTM. Thanks. > > On Mon, Jul 7, 2025 at 11:09 PM Nathan Myers wrote: > >> This adds the new bitset constructor from string_view >> defined in P2697 to the debug version of the type. >> >> libstdc++-v3/Changelog: >> PR libstdc++/119742

  1   2   >