[pushed: r16-1002] diagnostics: consolidate calls to colorizer::set_named_color

2025-05-30 Thread David Malcolm
I noticed whilst working on another issue that in diagnostic-show-locus within the quoted source lines and the annotation underlines that when we're showing highlight-{a,b} that we emit start-colorization-code, character, end-colorization-code per *character*, rather than just when the colorizati

[patch, Fortran, committed] Fix PR 120355, regression with global functions

2025-05-30 Thread Thomas Koenig
Hello world, I have just committed the attached patch as obvious and simple after regression-testing. Will backport to gcc 15 soonish. This fixes a 15/16 regression where the code was looking at the typespec of the symbol which we don't set if there is a RESULT clause. Thanks to Harald for poin

RE: [PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd

2025-05-30 Thread Li, Pan2
> The CI shows some scan failures in vls/avg-[456].c and > widen/vec-avg-rv32gcv.c. Oops, I should run all test locally without additional failures before sent out, let me double check about it. > Also, the lint check complains about this line: Sure. Pan -Original Message- From: Robi

Re: [PATCH] C: Flex array in union followed by a structure field is not reported [PR120354]

2025-05-30 Thread Joseph Myers
On Fri, 30 May 2025, Qing Zhao wrote: > There is only one last_field for a structure type, but there might > be multiple last_fields for a union type, therefore we should ORed > the result of TYPE_INCLUDES_FLEXARRAY for multiple last_fields of > a union type. > > The patch has been bootstrapped a

[PATCH] libstdc++: Test for formatting with empty spec for calendar types.

2025-05-30 Thread Tomasz Kamiński
Adding a test for behavior of the ostream operator and the formatting with empty chron-spec for the chrono types. This commit covers calendar types. libstdc++-v3/ChangeLog: * testsuite/std/time/format/empty_spec.cc: New test. --- Tested on x86_64-linux. OK for trunk? .../testsuite/std/t

Re: [PATCH v2] libstdc++: Implement LWG 2439 for std::unique_copy [PR120386]

2025-05-30 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 10:38 PM Jonathan Wakely wrote: > The current overload set for __unique_copy handles three cases: > > - The input range uses forward iterators, the output range does not. > This is the simplest case, and can just compare adjacent elements of > the input range. > > - Ne

Re: [PATCH v4 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-30 Thread Luc Grosheintz
On 5/29/25 10:07, Tomasz Kaminski wrote: On Thu, May 29, 2025 at 9:23 AM Tomasz Kaminski wrote: On Mon, May 26, 2025 at 4:13 PM Luc Grosheintz wrote: Implements the remaining parts of layout_left and layout_right; and all of layout_stride. The implementation of layout_stride::mapping

[PATCH v2 2/2] RISC-V: Use helper function to get FPR to VR move cost

2025-05-30 Thread Paul-Antoine Arras
Since last patch introduced get_fr2vr_cost () to get the correct cost to move data from a floating-point to a vector register, this patch replaces existing uses of the constant FR2VR. gcc/ChangeLog: * config/riscv/riscv-vector-costs.cc (costs::adjust_stmt_cost): Replace FR2VR with

[PATCH v2 1/2] RISC-V: Add pattern for vector-scalar multiply-add/sub [PR119100]

2025-05-30 Thread Paul-Antoine Arras
This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a plus-mult or minus-mult RTL instruction. Before this patch, we have two instructions, e.g.: vfmv.v.fv6,fa0 vfmadd.vv v9,v6,v7 After, we get only one: vfmadd.vf

Re: [PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd

2025-05-30 Thread Robin Dapp
Similar to the avg_floor, the avg_ceil has the rounding mode towards +inf, while the vaadd.vv has the rnu which totally match the sematics. From RVV spec, the fixed vaadd.vv with rnu, The CI shows some scan failures in vls/avg-[456].c and widen/vec-avg-rv32gcv.c. Also, the lint check complains

Re: [PATCH v3] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-05-30 Thread Surya Kumari Jangala
On 29/05/25 9:05 pm, Segher Boessenkool wrote: >> +#define _AMO_LD_INCREMENT(NAME, TYPE, OPCODE, FC) \ >> +static __inline__ TYPE >> \ >> +NAME (TYPE *_PTR) \ >> +{

Re: [PATCH v3] c++: Unwrap type traits defined in terms of builtins within diagnostics [PR117294]

2025-05-30 Thread Patrick Palka
On Fri, 30 May 2025, Nathaniel Shead wrote: > On Wed, May 28, 2025 at 02:14:06PM -0400, Patrick Palka wrote: > > On Tue, 27 May 2025, Nathaniel Shead wrote: > > > > > On Wed, Nov 27, 2024 at 11:45:40AM -0500, Patrick Palka wrote: > > > > On Fri, 8 Nov 2024, Nathaniel Shead wrote: > > > > > > > >

Re: [PATCH v3] c++: Unwrap type traits defined in terms of builtins within diagnostics [PR117294]

2025-05-30 Thread Patrick Palka
On Fri, 30 May 2025, Patrick Palka wrote: > On Fri, 30 May 2025, Nathaniel Shead wrote: > > > On Wed, May 28, 2025 at 02:14:06PM -0400, Patrick Palka wrote: > > > On Tue, 27 May 2025, Nathaniel Shead wrote: > > > > > > > On Wed, Nov 27, 2024 at 11:45:40AM -0500, Patrick Palka wrote: > > > > > On

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-05-30 Thread Qing Zhao
Hi, Richard, Really appreciate for your suggestions. > On May 30, 2025, at 05:22, Richard Biener wrote: > > On Fri, May 23, 2025 at 10:49 PM Qing Zhao wrote: >> >> Hi, Richard, >> >> Thanks a lot for your comments and questions. >> Please see my answers embedded below: >> >>> On May 19, 202

Re: [EXT] Re: [PATCH v3] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-05-30 Thread Segher Boessenkool
On Thu, May 29, 2025 at 03:07:34PM -0500, Peter Bergner wrote: > On 5/29/25 5:35 AM, Segher Boessenkool wrote: > > > > Add yourself to suthors as well? > > Agreed. Just add your name/email address directly under mine, like so: > > 2025-05-29 Peter Bergner > Jeevitha Palanisamy Li

Re: [PATCH v2 00/16] libstdc++: Atomic wait/notify ABI stabilization

2025-05-30 Thread Jonathan Wakely
On Thu, 29 May 2025 at 12:12, Jonathan Wakely wrote: > > This series complete Tom's work to refactor the C++20 atomic wait/notify > code, and includes several follow-up patches from me. The goal is to > move the core implementation pieces into libstdc++.so instead of > defining everything inline i

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-05-30 Thread Richard Biener
On Fri, May 23, 2025 at 10:49 PM Qing Zhao wrote: > > Hi, Richard, > > Thanks a lot for your comments and questions. > Please see my answers embedded below: > > > On May 19, 2025, at 06:44, Richard Biener > > wrote: > > > > On Fri, May 16, 2025 at 3:34 PM Qing Zhao wrote: > >> > >> Control this

Re: [PATCH v4 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-30 Thread Luc Grosheintz
On 5/29/25 09:23, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 4:13 PM Luc Grosheintz wrote: Implements the remaining parts of layout_left and layout_right; and all of layout_stride. The implementation of layout_stride::mapping::is_exhaustive applies the following change to the standard:

Re: [PATCH v4 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-30 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 12:01 PM Luc Grosheintz wrote: > > > On 5/29/25 10:07, Tomasz Kaminski wrote: > > On Thu, May 29, 2025 at 9:23 AM Tomasz Kaminski > wrote: > > > >> > >> > >> > >> On Mon, May 26, 2025 at 4:13 PM Luc Grosheintz < > luc.groshei...@gmail.com> > >> wrote: > >> > >>> Implement

Re: [PATCH] RISC-V: Add pattern for vector-scalar multiply-add/sub [PR119100]

2025-05-30 Thread Robin Dapp
Hi Paul-Antoine, overall the patch looks reasonable to me now, provided the fr2vr followup. BTW it's the late-combine pass that performs the optimization, not the combine pass. You might still want to fix this in the commit message. Please CC patchworks...@rivosinc.com for the next version

[PATCH v5 1/8] libstdc++: Improve naming, whitespace and silence warnings for extents.

2025-05-30 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * include/std/mdspan(__mdspan::_ExtentsStorage): Change name of private member _M_dynamic_extens to _M_dyn_exts. * include/std/mdspan(extents): Change name of private member from _M_dynamic_extents to _M_exts. * include/std/mdspan: Fi

[PATCH v5 0/8] Implement layouts from mdspan.

2025-05-30 Thread Luc Grosheintz
The discussion for v4 is here: https://gcc.gnu.org/pipermail/libstdc++/2025-May/061665.html The non-trivial changes are: * Fixed bug in __offset that called m(0...) even for empty extents; added a test. * Fixed buggy tests for class mandates. * Fix layout_stride::is_{,always_}exhaustive

[PATCH v5 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-05-30 Thread Luc Grosheintz
[mdspan.layout.left.cons] of N4950 states that this ctor is not noexcept. Since, all other ctors of layout_left, layout_right or layout_stride are noexcept, the choice was made, based on [res.on.exception.handling], to make this ctor noexcept. Two other major standard library implementations make

[PATCH v5 7/8] libstdc++: Add tests for layout_stride.

2025-05-30 Thread Luc Grosheintz
Implements the tests for layout_stride and for the features of the other two layouts that depend on layout_stride. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add tests for layout_stride. * testsuite/23_containers/mdspan/layouts/c

[PATCH v5 2/8] libstdc++: Implement layout_left from mdspan.

2025-05-30 Thread Luc Grosheintz
Implements the parts of layout_left that don't depend on any of the other layouts. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_left): New class. * src/c++23/std.cc.in: Add layout_left. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan | 306 +++

[PATCH v5 3/8] libstdc++: Add tests for layout_left.

2025-05-30 Thread Luc Grosheintz
Implements a suite of tests for the currently implemented parts of layout_left. The individual tests are templated over the layout type, to allow reuse as more layouts are added. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: New test. * tes

[PATCH v5 5/8] libstdc++: Add tests for layout_right.

2025-05-30 Thread Luc Grosheintz
Adds tests for layout_right and for the parts of layout_left that depend on layout_right. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add tests for layout_right. * testsuite/23_containers/mdspan/layouts/ctors.cc: Add tests for

[PATCH v5 4/8] libstdc++: Implement layout_right from mdspan.

2025-05-30 Thread Luc Grosheintz
Implement the parts of layout_left that depend on layout_right; and the parts of layout_right that don't depend on layout_stride. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_right): New class. * src/c++23/std.cc.in: Add layout_right. Signed-off-by: Luc Grosheintz --- l

[PATCH v5 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-30 Thread Luc Grosheintz
Implements the remaining parts of layout_left and layout_right; and all of layout_stride. The implementation of layout_stride::mapping::is_exhaustive applies the following change to the standard: 4266. layout_stride::mapping should treat empty mappings as exhaustive https://cplusplus.github.io

[PATCH v2] c: fix ICE related to tagged types with attributes in diagnostics [PR120380]

2025-05-30 Thread Martin Uecker
Am Donnerstag, dem 29.05.2025 um 20:57 + schrieb Joseph Myers: > On Thu, 29 May 2025, Martin Uecker wrote: > > > get_aka_type will create a new type for diagnostics, but for tagged > > types > > attributes will then be ignored with a warning. This can lead to > > reentering > >

Re: [PATCH v2] c: fix ICE related to tagged types with attributes in diagnostics [PR120380]

2025-05-30 Thread Joseph Myers
On Fri, 30 May 2025, Martin Uecker wrote: > c: fix ICE related to tagged types with attributes in diagnostics > [PR120380] > > get_aka_type will create a new type for diagnostics, but for tagged types > attributes will then be ignored with a warning. This can lead to > reenteri

[PUSHED] libgomp: Add testcases for the standard C++ math library on offload targets

2025-05-30 Thread Thomas Schwinge
From: Kwok Cheung Yeung libgomp/ * testsuite/libgomp.c++/target-std__cmath.C: New. * testsuite/libgomp.c++/target-std__complex.C: Likewise. * testsuite/libgomp.c++/target-std__numbers.C: Likewise. --- .../testsuite/libgomp.c++/target-std__cmath.C | 340 ++

[PATCH] Fortran: parameter inquiries of constant complex arrays [PR102599,PR114022]

2025-05-30 Thread Harald Anlauf
Dear all, here's a patch fixing the handling of parameter inquiries of constant complex arrays. It profits from previous fixes for inquiries of substrings and essentially adds only the simplification of %re/%im applies to complex arrays - and fixes a minor frontend memleak encountered on the way

Re: [PATCH] Fortran: parameter inquiries of constant complex arrays [PR102599,PR114022]

2025-05-30 Thread Steve Kargl
On Fri, May 30, 2025 at 07:37:49PM +0200, Harald Anlauf wrote: > > here's a patch fixing the handling of parameter inquiries of > constant complex arrays. It profits from previous fixes for > inquiries of substrings and essentially adds only the simplification > of %re/%im applies to complex arra

Re: [PATCH] C: Flex array in union followed by a structure field is not reported [PR120354]

2025-05-30 Thread Qing Zhao
Thanks. Pushed to trunk. And will pushed to GCC14 after 2-3 weeks. Is that okay? Qing > On May 30, 2025, at 09:25, Joseph Myers wrote: > > On Fri, 30 May 2025, Qing Zhao wrote: > >> There is only one last_field for a structure type, but there might >> be multiple last_fields for a union type,

Re: [PATCH] C: Flex array in the middle via type alias is not reported [PR120353]

2025-05-30 Thread Joseph Myers
On Fri, 30 May 2025, Qing Zhao wrote: > Thanks. > Pushed to trunk. > And will pushed to GCC14 after 2-3 weeks. Is that okay? Subject to applying to GCC 15 before GCC 14 (and testing on each release branch before applying it there), yes unless other release managers express concerns. (There is

Re: [PATCH] C: Flex array in union followed by a structure field is not reported [PR120354]

2025-05-30 Thread Joseph Myers
On Fri, 30 May 2025, Qing Zhao wrote: > Thanks. > Pushed to trunk. > And will pushed to GCC14 after 2-3 weeks. Is that okay? As with the other patch, subject to applying to GCC 15 before GCC 14 (and testing on each release branch before applying it there), yes unless other release managers exp

[pushed] c++: more xobj lambda 'this' capture [PR113563]

2025-05-30 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Nathaniel shared a more extensive test, which revealed more needed fixes. PR c++/113563 gcc/cp/ChangeLog: * lambda.cc (lambda_capture_field_type): Handle 'this' normally. (build_capture_proxy): Special-case 'this'

[PATCH] tree-optimization/120457 - avoid lowering of some single-element interleave

2025-05-30 Thread Richard Biener
The following makes sure we are not lowering single-element interleaving schemes in a way that defeats load vectorizing later but allows the VMAT_ELEMENTWISE fallback to be used. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/120457 * tree-vect-s

Re: [PATCH] Fortran: parameter inquiries of constant complex arrays [PR102599,PR114022]

2025-05-30 Thread Harald Anlauf
On 5/30/25 19:44, Steve Kargl wrote: On Fri, May 30, 2025 at 07:37:49PM +0200, Harald Anlauf wrote: here's a patch fixing the handling of parameter inquiries of constant complex arrays. It profits from previous fixes for inquiries of substrings and essentially adds only the simplification of %

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-05-30 Thread Richard Biener
On Fri, May 30, 2025 at 11:30 AM Jan Hubicka wrote: > > Hi, > > > > > > Hi, > > > > > > the attached Ada testcase compiled with -O2 -gnatn makes the compiler > > > crash in > > > vect_can_force_dr_alignment_p during SLP vectorization: > > > > > > if (decl_in_symtab_p (decl) > > > && !symt

Re: [PATCH v4 7/8] libstdc++: Add tests for layout_stride.

2025-05-30 Thread Luc Grosheintz
On 5/29/25 10:06, Tomasz Kaminski wrote: On Thu, May 29, 2025 at 9:49 AM Tomasz Kaminski wrote: On Mon, May 26, 2025 at 4:25 PM Luc Grosheintz wrote: Implements the tests for layout_stride and for the features of the other two layouts that depend on layout_stride. libstdc++-v3/ChangeL

Re: [PATCH v4 3/8] libstdc++: Add tests for layout_left.

2025-05-30 Thread Luc Grosheintz
On 5/28/25 14:49, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 4:21 PM Luc Grosheintz wrote: Implements a suite of tests for the currently implemented parts of layout_left. The individual tests are templated over the layout type, to allow reuse as more layouts are added. libstdc++-v3/Cha

[PUSHED] Add 'libgomp.c++/target-flex-[...].C' test cases

2025-05-30 Thread Thomas Schwinge
From: Waffl3x libgomp/ChangeLog: * testsuite/libgomp.c++/target-flex-10.C: New test. * testsuite/libgomp.c++/target-flex-100.C: New test. * testsuite/libgomp.c++/target-flex-101.C: New test. * testsuite/libgomp.c++/target-flex-11.C: New test. * testsuite/l

[PUSHED] Defuse 'RESULT_DECL' check in 'pass_nrv' (for offloading compilation) [PR119835]

2025-05-30 Thread Thomas Schwinge
... to avoid running into ICEs per PR119835, until that's resolved properly. PR middle-end/119835 gcc/ * tree-nrv.cc (pass_nrv::execute): Defuse 'RESULT_DECL' check. libgomp/ * testsuite/libgomp.oacc-c-c++-common/abi-struct-1.c: '#pragma GCC optimize

[PUSHED] libgomp: Add testcases for concurrent access to standard C++ containers on offload targets, a number of USM variants

2025-05-30 Thread Thomas Schwinge
libgomp/ * testsuite/libgomp.c++/target-std__array-concurrent-usm.C: New. * testsuite/libgomp.c++/target-std__array-concurrent.C: Adjust. * testsuite/libgomp.c++/target-std__bitset-concurrent-usm.C: New. * testsuite/libgomp.c++/target-std__bitset-concurrent.C

[PUSHED] libgomp: Add testcases for concurrent access to standard C++ containers on offload targets

2025-05-30 Thread Thomas Schwinge
From: Kwok Cheung Yeung libgomp/ * testsuite/libgomp.c++/target-std__array-concurrent.C: New. * testsuite/libgomp.c++/target-std__bitset-concurrent.C: Likewise. * testsuite/libgomp.c++/target-std__deque-concurrent.C: Likewise. * testsuite/libgomp.c++/target-std__f

[PUSHED] Add 'libgomp.c++/target-valarray-1.C'

2025-05-30 Thread Thomas Schwinge
libgomp/ * testsuite/libgomp.c++/target-std__valarray-1.C: New. * testsuite/libgomp.c++/target-std__valarray-1.output: Likewise. --- .../libgomp.c++/target-std__valarray-1.C | 179 ++ .../libgomp.c++/target-std__valarray-1.output | 22 +++ 2 files chan

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-05-30 Thread Jan Hubicka
Hi, > > > > Hi, > > > > the attached Ada testcase compiled with -O2 -gnatn makes the compiler crash > > in > > vect_can_force_dr_alignment_p during SLP vectorization: > > > > if (decl_in_symtab_p (decl) > > && !symtab_node::get (decl)->can_increase_alignment_p ()) > > return false; > >

[PATCH] tree-optimization/120341 - stores into STRING_CSTs can trap

2025-05-30 Thread Richard Biener
The following fixes conditional store elimination and store motion so they consider stores to STRING_CSTs as trapping. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/120341 * tree-ssa-loop-im.cc (can_sm_ref_p): STRING_CSTs are readonly. *

Re: [PATCH] libstdc++: Test for formatting with empty spec for calendar types.

2025-05-30 Thread Tomasz Kaminski
On Fri, May 30, 2025 at 1:55 PM Jonathan Wakely wrote: > On Fri, 30 May 2025 at 10:38, Tomasz Kamiński wrote: > > > > Adding a test for behavior of the ostream operator and the formatting > > with empty chron-spec for the chrono types. This commit covers calendar > > types. > > > > libstdc++-v3/

[PATCH] tree-optimization/120357 - ICE with early break vectorization

2025-05-30 Thread Richard Biener
When doing early break vectorization of a loop with a conditional reduction the epilog creation code is confused as to before which exit to insert the conditional reduction induction IV update. The following make sure this is done before the main IV exit. Bootstrapped and tested on x86_64-unknown

Re: [PATCH] libstdc++: Test for formatting with empty spec for calendar types.

2025-05-30 Thread Jonathan Wakely
On Fri, 30 May 2025 at 15:26, Tomasz Kaminski wrote: > > > > On Fri, May 30, 2025 at 1:55 PM Jonathan Wakely wrote: >> >> On Fri, 30 May 2025 at 10:38, Tomasz Kamiński wrote: >> > >> > Adding a test for behavior of the ostream operator and the formatting >> > with empty chron-spec for the chrono

[PATCH] c++: Add co_await, co_yield and co_return to dump_expr.

2025-05-30 Thread Iain Sandoe
Tested on x86_64-darwin, OK for trunk? thanks Iain --- 8< --- These were omitted there as an oversight, most of the error handling for the coroutines code is specific rather than using generic %qE etc. gcc/cp/ChangeLog: * error.cc (dump_expr): Add co_await, co_yield and co_return. Sign

[PATCH] c++: Emit an error for attempted constexpr co_await [PR118903].

2025-05-30 Thread Iain Sandoe
Tested on x86_64-darwin (but does need the addition of the coroutine keywords to dump_expr), OK for trunk? Thanks, Iain --- 8< --- We checked that the coroutine expressions were not suitable for constexpr, but did not emit and error when needed. PR c++/118903 gcc/cp/ChangeLog:

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-05-30 Thread Jan Hubicka
> On Fri, May 30, 2025 at 11:30 AM Jan Hubicka wrote: > > > > Hi, > > > > > > > > Hi, > > > > > > > > the attached Ada testcase compiled with -O2 -gnatn makes the compiler > > > > crash in > > > > vect_can_force_dr_alignment_p during SLP vectorization: > > > > > > > > if (decl_in_symtab_p (decl

[PUSHED] Fix typo in comment in execute_all_ipa_transforms.

2025-05-30 Thread Andrew Pinski
small typo, missing n at the end of function. Pushed as obvious after a bootstrap/test. gcc/ChangeLog: * passes.cc (execute_all_ipa_transforms): Fix typo in commenet. Signed-off-by: Andrew Pinski --- gcc/passes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: RISC-V frm mode switching and late_combine2

2025-05-30 Thread Vineet Gupta
+CC gcc-patches On 5/30/25 14:04, Vineet Gupta wrote: > Hi Jeff, Richard > > As part of RISC-V FRM mode switching improvements, I'm running into a behavior > in late_combine2 where it is eliminating FRM save/restores when it is desired > to > keep them. > > I'm pasting snippet of RTL dumps, could

Re: [PATCH] C: Flex array in union followed by a structure field is not reported [PR120354]

2025-05-30 Thread Qing Zhao
> On May 30, 2025, at 12:52, Joseph Myers wrote: > > On Fri, 30 May 2025, Qing Zhao wrote: > >> Thanks. >> Pushed to trunk. >> And will pushed to GCC14 after 2-3 weeks. Is that okay? > > As with the other patch, subject to applying to GCC 15 before GCC 14 (and > testing on each release bra

Re: [PATCH] C: Flex array in the middle via type alias is not reported [PR120353]

2025-05-30 Thread Qing Zhao
> On May 30, 2025, at 12:52, Joseph Myers wrote: > > On Fri, 30 May 2025, Qing Zhao wrote: > >> Thanks. >> Pushed to trunk. >> And will pushed to GCC14 after 2-3 weeks. Is that okay? > > Subject to applying to GCC 15 before GCC 14 (and testing on each release > branch before applying it th

Re: [PATCH] C: Flex array in the middle via type alias is not reported [PR120353]

2025-05-30 Thread Qing Zhao
Thanks. Pushed to trunk. And will pushed to GCC14 after 2-3 weeks. Is that okay? Qing > On May 29, 2025, at 17:04, Joseph Myers wrote: > > On Thu, 29 May 2025, Qing Zhao wrote: > >> The root cause of the bug is: the TYPE_INCLUDES_FLEXARRAY marking of the >> structure type is not copied to its

Re: [pushed] c++: xobj lambda 'this' capture [PR113563]

2025-05-30 Thread Patrick Palka
On Thu, 29 May 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > Various places were still making assumptions that we could get to the 'this' > capture through current_class_ref in a lambda op(), which is incorrect for > an explicit object op(). > >

[committed] c: Update description of C library facilities provided by GCC for C23

2025-05-30 Thread Joseph Myers
The documentation of which standard C library facilities (headers) are provided by GCC, as being those required of freestanding implementations, is reasonably accurate for C99 and before (if you ignore the provision of for non-GNU targets). It's less accurate for C11, since we provide although t

Re: [PATCH] widening_mul: Make better use of overflowing operations in codegen of min/max(a, add/sub(a, b))

2025-05-30 Thread Andrew Pinski
On Thu, May 29, 2025 at 1:05 AM wrote: > > From: Dhruv Chawla > > This patch folds the following patterns: > - max (a, add (a, b)) -> [sum, ovf] = addo (a, b); !ovf ? sum : a > - max (a, sub (a, b)) -> [sum, ovf] = subo (a, b); !ovf ? a : sum > - min (a, add (a, b)) -> [sum, ovf] = addo (a, b); !

Re: [PATCH] libstdc++: Test for formatting with empty spec for calendar types.

2025-05-30 Thread Jonathan Wakely
On Fri, 30 May 2025 at 10:38, Tomasz Kamiński wrote: > > Adding a test for behavior of the ostream operator and the formatting > with empty chron-spec for the chrono types. This commit covers calendar > types. > > libstdc++-v3/ChangeLog: > > * testsuite/std/time/format/empty_spec.cc: New t

[committed] OpenMP: Support OpenMP 5.0 "declare mapper" directives for C

2025-05-30 Thread Tobias Burnus
I have now committed the second declare mapper patch, submitted by Julian at https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629367.html again it is based in the associated OG15 commit (kudos to all doing the rediffs): 69fd51954fc OpenMP: Support OpenMP 5.0 "declare mapper" directives

RE: [PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd

2025-05-30 Thread Li, Pan2
> The CI shows some scan failures in vls/avg-[456].c and > widen/vec-avg-rv32gcv.c. Looks like the CI cannot tell patch series? There are 3 patches and the CI will run for each one. Of course, the first one will have scan failure due to expanding change, but the second one reconciles them. Fin

Re: [PATCH] RISC-V: Add pattern for vector-scalar multiply-add/sub [PR119100]

2025-05-30 Thread Paul-Antoine Arras
Hi Robin, On 30/05/2025 10:18, Robin Dapp wrote: BTW it's the late-combine pass that performs the optimization, not the combine pass.  You might still want to fix this in the commit message. I updated the commit message. Actually, it depends whether or not the vec_duplicate is hoisted to the

Re: [PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd

2025-05-30 Thread Robin Dapp
Looks like the CI cannot tell patch series? There are 3 patches and the CI will run for each one. Of course, the first one will have scan failure due to expanding change, but the second one reconciles them. Finally the third one will have all test passed as below, I think it indicates all test

RE: [PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd

2025-05-30 Thread Li, Pan2
> Yes, you're right. I have looked at it again an hour ago and came to the > same > conclusion. I thought this worked before and it would only show results for > the last patch of the series? > Anyway, the series is OK. Thanks Robin, will commit it with the format issue fixed after test is OK

[PATCH] config: Update obsolete macro in pkg.m4

2025-05-30 Thread Pietro Monteiro
The autoconf macro PKG_CHECK_MODULES defined in config/pkg.m4 is used in binutils/gdb, but not in GCC. That macro uses the obsolete AC_TRY_LINK[1]. Update the code to use AC_LINK_IFELSE as documented by autoconf. Regenerating all autotool files in both trees shows no difference. [1] https://www

[Patch] libgomp: Add OpenMP's omp_target_memset/omp_target_memset_async [PR120444]

2025-05-30 Thread Tobias Burnus
Attached patch adds omp_target_memset and omp_target_memset_async permitting to set (potentially large) data on the device to a certain value - in particular to '\0'. It uses 'memset' on the host (and for shared memory, e.g. via requires unified_shared_memory/self_maps). For nvptx, cuMemsetD8 is

[pushed: r16-1024] diagnostics: implement highlight-a vs -b in HTML output [PR116792]

2025-05-30 Thread David Malcolm
Update HTML output so that it renders highlight-a vs highlight-b via tags in the message itself, in the quoted source line, in the underlines, and in the labels and their vertical bars. Example output can be seen at: https://dmalcolm.fedorapeople.org/gcc/2025-05-28/diagnostic-ranges.c.html Suc

[PATCH] or1k: Fix struct return test

2025-05-30 Thread Stafford Horne
In or1k structs are returned from functions using the memory address passed in r3. In the current version of GCC the struct stores changed from r11 (the return value) to r3 the incoming memory address. Both of are valid. Adjust the test to match what GCC is producing now. gcc/testsuite/ChangeLo

[PATCH v2] or1k: Support long jump offsets with -mcmodel=large

2025-05-30 Thread Stafford Horne
The -mcmodel=large option was originally added to handle generation of large binaries with large PLTs. However, when compiling the Linux kernel with allyesconfig the output binary is so large that the jump instruction 26-bit immediate is not large enough to store the jump offset to some symbols wh

[PATCH v1] RISC-V: Fix line too long format issue for autovect.md [NFC]

2025-05-30 Thread pan2 . li
From: Pan Li Inspired by the avg_ceil patches, notice there were even more lines too long from autovec.md. So fix that format issues. gcc/ChangeLog: * config/riscv/autovec.md: Fix line too long for sorts of pattern. Signed-off-by: Pan Li --- gcc/config/riscv/autovec.md | 54

[PATCH] Have TODO_verify_* not set by any pass

2025-05-30 Thread Andrew Pinski
This is a follow up to the patch set starting at https://gcc.gnu.org/pipermail/gcc-patches/2014-April/386650.html. Currently TODO_verify_{il,all} is set by a few passes as TODOs afterwards but we don't need to do that any more. Those were mostly removed back in https://gcc.gnu.org/pipermail/gcc-p

[PATCH, V7] Fix PR 118541, do not generate unordered fp cmoves for IEEE compares

2025-05-30 Thread Michael Meissner
I've lost track of the number of rewrites to this patch, but I think it is V7. In bug PR target/118541 on power9, power10, and power11 systems, for the function: extern double __ieee754_acos (double); double __acospi (double x) { double ret = __ieee754_a

Re: Fix PR 118541 (V3), do not generate unordered fp cmoves for IEEE compares

2025-05-30 Thread Michael Meissner
On Thu, May 22, 2025 at 02:17:41PM +0530, Surya Kumari Jangala wrote: > Hi Mike, > The source code changes are missing. Whoops. I just posted a completely new patch. https://gcc.gnu.org/pipermail/gcc-patches/2025-May/685233.html -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 0143

Re: [Patch] libgomp: Add OpenMP's omp_target_memset/omp_target_memset_async [PR120444]

2025-05-30 Thread Sandra Loosemore
On 5/30/25 16:36, Tobias Burnus wrote: Attached patch adds omp_target_memset and omp_target_memset_async permitting to set (potentially large) data on the device to a certain value - in particular to '\0'. It uses 'memset' on the host (and for shared memory, e.g. via requires unified_shared_memo