Re: [PUSHED] libstdc++: Avoid '-Wunused-parameter' for '__what' in function 'void std::__throw_format_error(const char*)'

2025-03-07 Thread Jonathan Wakely
On Fri, 7 Mar 2025 at 09:10, Thomas Schwinge wrote: > > Hi Jonathan! Good morning, > On 2025-03-06T19:58:55+, Jonathan Wakely wrote: > > On Thu, 6 Mar 2025 at 19:48, Jonathan Wakely wrote: > >> On Thu, 6 Mar 2025 at 14:28, Thomas Schwinge wrote: > >> > In a '-fno-exceptions' configuration: >

[PATCH] tree-optimization/119145 - avoid stray .MASK_CALL after vectorization

2025-03-07 Thread Richard Biener
When we BB vectorize an if-converted loop body we make sure to not leave around .MASK_LOAD or .MASK_STORE created by if-conversion but we failed to check for .MASK_CALL. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/119145 * tree-vectorizer.cc (

Re: [PATCH v3 3/3] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-03-07 Thread Richard Sandiford
Tejas Belagod writes: > The target clause in OpenMP is used to offload loop kernels to accelarator > peripeherals. target's 'map' clause is used to move data from and to the > accelarator. When the data is SVE type, it may not be suitable because of > various reasons i.e. the two SVE targets may

Re: [PATCH] libstdc++: Fix views::zip_transform constraints for empty range pack [PR111138]

2025-03-07 Thread Jonathan Wakely
On Fri, 7 Mar 2025 at 15:59, Patrick Palka wrote: > On Fri, 7 Mar 2025, Jonathan Wakely wrote: > > > > > > > On Fri, 7 Mar 2025 at 15:05, Tomasz Kamiński wrote: > > Add missing move_constructible && regular_invocable constrains on > functor type, > > for invocations of `views::zip_tra

[PATCH] libstdc++: Make std::unique_lock self-move-assignable

2025-03-07 Thread Jonathan Wakely
LWG 4172 was approved in Hagenberg, February 2025, fixing std::unique_lock and std::shared_lock to work correctly for self-move-assignment. Our std::shared_lock was already doing the right thing (contradicting the standard) so just add a comment there. Our std::unique_lock needs to be fixed to do

[PATCH] aarch64: Avoid unnecessary use of 2-input TBLs [PR115258] (was Re: [PATCH][AARCH64][PR115258]Fix excess moves)

2025-03-07 Thread Richard Sandiford
Kugan Vivekanandarajah writes: > Hi Richard, > > I want to follow up on this and see if you have a fix for this. Sorry for the slow response. >> On 29 Oct 2024, at 9:41 pm, Richard Sandiford >> wr>> Kugan Vivekanandarajah writes: >>> Hi, >>> >>> Fix for PR115258 cases a performance regressio

Re: [PATCH] c, v2: do not warn about truncating NUL char when initializing nonstring arrays [PR117178]

2025-03-07 Thread Kees Cook
On Tue, Feb 18, 2025 at 11:51:41AM -0800, Kees Cook wrote: > On Fri, Feb 14, 2025 at 11:21:07AM +0100, Jakub Jelinek wrote: > > On Thu, Feb 13, 2025 at 02:10:25PM +0100, Jakub Jelinek wrote: > > > Kees, are you submitting this under assignment to FSF (maybe the Google > > > one > > > if it has one

Re: [PATCH] Fortran: improve checking of substring bounds [PR119118]

2025-03-07 Thread Steve Kargl
On Thu, Mar 06, 2025 at 10:04:08PM +0100, Harald Anlauf wrote: > > this patch fixes an interesting regression that prevented substring > bounds checks from being generated if the substring start was not a > variable, but rather a constant or an expression. > > The fix I chose turned out to be a l

[COMMITTED] inline-asm: Clarify documentation of operand syntax [PR67301]

2025-03-07 Thread Sandra Loosemore
gcc/ChangeLog PR c/67301 * doc/extend.texi (Extended Asm): Clarify that the square brackets around the asmSymbolicName of operands are a required part of the syntax. --- gcc/doc/extend.texi | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) d

Re: [PATCH] c++: Update TYPE_FIELDS of variant types if cp_parser_late_parsing_default_args etc. modify it [PR98533]

2025-03-07 Thread Jason Merrill
On 3/6/25 11:14 AM, Jakub Jelinek wrote: Hi! The following testcases ICE during type verification, because TYPE_FIELDS of e.g. S RECORD_TYPE in pr119123.C is different from TYPE_FIELDS of const S. Various decls are added to S's TYPE_FIELDS first, then finish_struct indirectly calls fixup_type_va

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
On 3/8/25 12:55 AM, Tejas Belagod wrote: On 3/7/25 5:34 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: Given a vector mode and its corresponding element mode, this new new language hook ret

[COMMITTED] x86: Improve documentation for -msse4 [PR116708]

2025-03-07 Thread Sandra Loosemore
gcc/ChangeLog PR target/116708 * doc/invoke.texi (x86 Options): Clarify how -msse4 and -mno-sse4 interact with other SSE options. --- gcc/doc/invoke.texi | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d9558022073..c6

Re: [PATCH v2] libstdc++: Fix views::zip_transform constraints for empty range pack [PR111138]

2025-03-07 Thread Patrick Palka
On Fri, 7 Mar 2025, Tomasz Kamiński wrote: > Add missing move_constructible && regular_invocable constrains on functor > type, > and is_object on functor result type for invocations of views::zip_transform > without range arguments. > > PR libstdc++/38 > > libstdc++-v3/ChangeLog: >

Re: [PATCH v2 5/7] IRA+LRA: Let the backend request to split basic blocks

2025-03-07 Thread Maciej W. Rozycki
On Mon, 6 Jan 2025, Richard Sandiford wrote: > > This was approved by Richard Sandiford in v1, so I'll commit it along with > > 6/7, which relies on it. > > Still stands, but I didn't think of this before, so thought I'd ask: Sure, it's never wrong to revisit things as new ideas pop in. > Wou

Re: [RFC][C]New syntax for the argument of counted_by attribute for C language

2025-03-07 Thread Jakub Jelinek
On Fri, Mar 07, 2025 at 01:38:32PM -0800, Kees Cook wrote: > I'm all for better diagnostics, but since C doesn't have a way specify > scope for a named variable, I don't see how such a diagnostic would > be actionable. > > int nr; > struct foo { > int nr; > u8 array[] __counted_by(nr);

Re: [r15-7894 Regression] FAIL: gcc.dg/Wreturn-mismatch-6.c (test for warnings, line 40) on Linux/x86_64

2025-03-07 Thread Andrew Pinski
On Fri, Mar 7, 2025 at 2:39 PM haochen.jiang wrote: > > On Linux/x86_64, > > cf65235e03d2eb1667624943eae8f7fc355bceaf is the first bad commit > commit cf65235e03d2eb1667624943eae8f7fc355bceaf > Author: Andrew Pinski > Date: Thu Mar 6 16:07:02 2025 -0800 > > c: Fix warning after an error on

[r15-7894 Regression] FAIL: gcc.dg/Wreturn-mismatch-6.c (test for warnings, line 40) on Linux/x86_64

2025-03-07 Thread haochen.jiang
On Linux/x86_64, cf65235e03d2eb1667624943eae8f7fc355bceaf is the first bad commit commit cf65235e03d2eb1667624943eae8f7fc355bceaf Author: Andrew Pinski Date: Thu Mar 6 16:07:02 2025 -0800 c: Fix warning after an error on a return statment [PR60440] caused FAIL: gcc.dg/Wreturn-mismatch-2a

[PATCH v2] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread H.J. Lu
On Tue, Mar 4, 2025 at 6:18 PM Richard Sandiford wrote: > > Richard Sandiford writes: > > Jan Hubicka writes: > >>> > >>> Thanks for running these. I saw poor results for perlbench with my > >>> initial aarch64 hooks because the hooks reduced the cost to zero for > >>> the entry case: > >>> > >

Re: [PATCH v2] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread Richard Sandiford
"H.J. Lu" writes: >> gcc/ >> PR rtl-optimization/117477 >> * config/aarch64/aarch64.cc (aarch64_count_saves): New function. >> (aarch64_count_above_hard_fp_saves, aarch64_callee_save_cost) >> (aarch64_frame_allocation_cost): Likewise. >> (TARGET_CALLEE_SAVE_

[PATCH 6/6] [RFC] AArch64: Update existing test with svbool_t operations

2025-03-07 Thread Tejas Belagod
Update existing compile test with tests to cover C/C++ operations on svbool_t type objects. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Add new tests. * g++.dg/ext/sve-sizeless-2.C: Add new tests. * g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C: Add n

[committed] arm: make arm_neon.h compatible with '-march= -mfloat-abi=softfp'

2025-03-07 Thread Richard Earnshaw
With -mfpu set to auto, an architecture specification that lacks floating-point, but has -mfloat-abi=softfp will cause a misleading error. Specifically, if we have gcc -c test.c -mfloat-abi=softfp -march=armv7-a -mfpu=auto where test.c contains #include then we get a misleading error: test.c:

Re: [1/3 PATCH]AArch64: add support for partial modes to last extractions [PR118464]

2025-03-07 Thread Richard Sandiford
Tamar Christina writes: > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? > > Thanks, > Tamar > > gcc/ChangeLog: > > > PR tree-optimization/118464 > PR tree-optimization/116855 > * config/aarch64/aarch64-sve.md (@extract__, > @fold_extract

Re: [PATCH] libstdc++: Fix views::zip_transform constraints for empty range pack [PR111138]

2025-03-07 Thread Patrick Palka
On Fri, 7 Mar 2025, Jonathan Wakely wrote: > > > On Fri, 7 Mar 2025 at 15:05, Tomasz Kamiński wrote: > Add missing move_constructible && regular_invocable constrains on > functor type, > for invocations of `views::zip_transform` without range arguments. > > libstdc++-v3/Chang

[PATCH 5/6] [RFC] AArch64: Update test to reflect new message

2025-03-07 Thread Tejas Belagod
Update test error message as svbool_t is not treated as a GNU vector. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/acle/general-c/svcount_1.c: Update message. --- gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/svcount_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH 3/6] [RFC] GIMPLE: Support TARGET_MEM_REF when walking ADDR_EXPR trees.

2025-03-07 Thread Tejas Belagod
Support TARGET_MEM_REFs when walking subtress searching for ADDR_EXPR. This scenario presents itself when walking MEM_REF subtrees looking for addr-taken entities during the execute_update_addresses_taken () pass where address-taken bitmaps are updated. gcc/ChangeLog: * gimple-walk.cc (w

Re: [PATCH] c++/modules: Better handle no-linkage decls in unnamed namespaces [PR118799]

2025-03-07 Thread Nathaniel Shead
On Fri, Mar 07, 2025 at 09:48:27PM +1100, Nathaniel Shead wrote: > On Thu, Mar 06, 2025 at 11:20:59AM -0500, Jason Merrill wrote: > > On 2/9/25 6:38 AM, Nathaniel Shead wrote: > > > On Sun, Feb 09, 2025 at 01:16:00AM +1100, Nathaniel Shead wrote: > > > > Tested on x86_64-pc-linux-gnu, OK for trunk

[PATCH 2/6] [RFC] AArch64: Support C/C++ operations on svbool_t

2025-03-07 Thread Tejas Belagod
Support a subset of C/C++ operations (bitwise, conditional etc.) on svbool_t. gcc/ChangeLog: * c-family/c-common.cc (c_build_vec_convert): Support vector boolean types for __builtin_convertvector (). (c_common_bool_type): New. Given precision and signedness, return the

Re: [PATCH 3/6] [RFC] GIMPLE: Support TARGET_MEM_REF when walking ADDR_EXPR trees.

2025-03-07 Thread Richard Biener
On Fri, 7 Mar 2025, Tejas Belagod wrote: > Support TARGET_MEM_REFs when walking subtress searching for ADDR_EXPR. This > scenario presents itself when walking MEM_REF subtrees looking for addr-taken > entities during the execute_update_addresses_taken () pass where address-taken > bitmaps are upd

Re: [PATCH] vect: Enforce dr_with_seg_len::align precondition [PR116125]

2025-03-07 Thread Richard Biener
On Fri, 7 Mar 2025, Richard Sandiford wrote: > tree-data-refs.cc uses alignment information to try to optimise > the code generated for alias checks. The assumption for "normal" > non-grouped, full-width scalar accesses was that the access size > would be a multiple of the alignment. As Richi no

[PATCH] vect: Enforce dr_with_seg_len::align precondition [PR116125]

2025-03-07 Thread Richard Sandiford
tree-data-refs.cc uses alignment information to try to optimise the code generated for alias checks. The assumption for "normal" non-grouped, full-width scalar accesses was that the access size would be a multiple of the alignment. As Richi notes in the PR, this is a documented precondition of dr

[PATCH 4/6] [RFC] c/cp/GIMPLE: Add support for index ops on svbool_t.

2025-03-07 Thread Tejas Belagod
Support subscript operation on svbool_t. This considers svbool_t as a packed bit-vector of 1-bit boolean data. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Prepare the first stage of the subscript subtree for a later gimplification step.

[PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
Given a vector mode and its corresponding element mode, this new new language hook returns a vector type that has properties of the vector mode and element type of that of the element mode. For eg. on AArch64, given VNx16BI and QImode it returns VNx16QI i.e. the wider mode to BImode that is an SVE

[PATCH] RISC-V: Do not delete fused vsetvl if it has uses [PR119115].

2025-03-07 Thread Robin Dapp
Hi, in PR119115 we end up with an orphaned vsetvli zero,t1,e16,m1,ta,ma. t1 originally came from another vsetvl that was fused from vsetvli a4,a3,e8,mf2,ta,ma vsetvli t1,a3,e8,mf2,ta,ma (1) to vsetvli zero,a3,e16,m1,ta,ma. This patch checks if t1, the VL operand

Re: [PATCH v2] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread Richard Biener
On Fri, Mar 7, 2025 at 11:30 AM H.J. Lu wrote: > > On Tue, Mar 4, 2025 at 6:18 PM Richard Sandiford > wrote: > > > > Richard Sandiford writes: > > > Jan Hubicka writes: > > >>> > > >>> Thanks for running these. I saw poor results for perlbench with my > > >>> initial aarch64 hooks because the

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Richard Biener
On Fri, 7 Mar 2025, Tejas Belagod wrote: > Given a vector mode and its corresponding element mode, this new new language > hook returns a vector type that has properties of the vector mode and element > type of that of the element mode. For eg. on AArch64, given VNx16BI and > QImode > it returns

Re: [PATCH] c: Fix warning after an error on a return statment [PR60440]

2025-03-07 Thread Joseph Myers
On Thu, 6 Mar 2025, Andrew Pinski wrote: > Like r5-6912-g3dbb84276aca10 but this is for the C front-end. > Basically we have an error on a return statement, we just return > error_mark_node and then the warning happens as there is no return > statement. Anyways instead mark the current function fo

Re: [PATCH] c++/modules: Better handle no-linkage decls in unnamed namespaces [PR118799]

2025-03-07 Thread Nathaniel Shead
On Thu, Mar 06, 2025 at 11:20:59AM -0500, Jason Merrill wrote: > On 2/9/25 6:38 AM, Nathaniel Shead wrote: > > On Sun, Feb 09, 2025 at 01:16:00AM +1100, Nathaniel Shead wrote: > > > Tested on x86_64-pc-linux-gnu, OK for trunk if full bootstrap + regtest > > > passes? > > > > > > -- >8 -- > > > >

[PATCH v3] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread H.J. Lu
On Fri, Mar 7, 2025 at 7:04 PM Richard Biener wrote: > > On Fri, Mar 7, 2025 at 11:30 AM H.J. Lu wrote: > > > > On Tue, Mar 4, 2025 at 6:18 PM Richard Sandiford > > wrote: > > > > > > Richard Sandiford writes: > > > > Jan Hubicka writes: > > > >>> > > > >>> Thanks for running these. I saw poo

Re: [PATCH v3] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread Jan Hubicka
> > This is OK. In general, I think we could also go with assert on > > mem_cost <= 2, since that is kind of bogus setting (I don't think we > > will ever need to support x86 CPU with memory stores being as cheap as > > reg-reg moves), but current form is good. > > Unless the loading/storing inte

Re: [PATCH v3 3/3] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-03-07 Thread Jakub Jelinek
On Fri, Mar 07, 2025 at 11:49:37AM +, Richard Sandiford wrote: > > +case TCTX_OMP_DEVICE_ADDR: > > + if (!silent_p) > > + error_at (loc, "SVE type %qT not allowed in target device clauses", > > type); > > Is the final error message accurate? This TCTX value is used for clauses > l

[PATCH] c++: ICE with lambda in fold expression in requires [PR119134]

2025-03-07 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/branches? -- >8 -- The r12-8258 fix assumes that DECL_CONTEXT of 'pack' in check_for_bare_parameter_packs is going to be an operator() but as this test shows, it can be empty. PR c++/119134 gcc/cp/ChangeLog: * pt.cc (ch

Re: AArch64: Turn off outline atomics with -mcmodel=large (PR112465)

2025-03-07 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Ramana, > >> -Generate code for the large code model. This makes no assumptions about >> -addresses and sizes of sections. Programs can be statically linked only. >> The >> +Generate code for the large code model. This allows large .bss and .data >> +sections, howe

[PATCH] libstdc++: Make std::erase for linked lists convert to bool

2025-03-07 Thread Jonathan Wakely
LWG 4135 (approved in Wrocław, November 2024) fixes the lambda expressions used by std::erase for std::list and std::forward_list. Previously they attempted to copy something that isn't required to be copyable. Instead they should convert it to bool right away. The issue resolution also changes th

[PATCH] libstdc++: Add poison pill for chrono::from_stream

2025-03-07 Thread Jonathan Wakely
LWG 3956 (approved in Hagenberg, February 2025) decided that from_stream should be found *only* by ADL, not ordinary unqualified lookup. Add a poison pill overload to chrono::__detail where the __parsable and operator>>(basic_istream&, _Parser) are defined. This ensures that when they use from_stre

Re: [PATCH] vect: Fix build on MacOS

2025-03-07 Thread Richard Sandiford
Simon Martin writes: > The build is broken on MacOS since r15-7881-ge8651b80aeb86d because > tree-vect-data-refs.cc uses std::min but does not include . > > This patch fixes it by defining INCLUDE_ALGORITHM in that file. > > Successfully built on x86_64-apple-darwin19.6.0. > > gcc/ChangeLog: > >

Re: [PATCH] libstdc++: Fix views::zip_transform constraints for empty range pack [PR111138]

2025-03-07 Thread Jonathan Wakely
On Fri, 7 Mar 2025 at 15:05, Tomasz Kamiński wrote: > Add missing move_constructible && regular_invocable constrains on functor > type, > for invocations of `views::zip_transform` without range arguments. > > libstdc++-v3/ChangeLog: > > * include/std/ranges (_ZipTransform::operator()): >

Re: [wwwdocs v2] gcc-15/changes: Mention the new -mveclibabi=aocl option in the IA-32/x86-64 section

2025-03-07 Thread Gerald Pfeifer
On Fri, 7 Mar 2025, Filip Kastl wrote: > Here is a second version of the patch. Thanks for the suggestions. I > addressed them both. Do you think this is better? Loving it. :) Thank you, Gerald

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: Given a vector mode and its corresponding element mode, this new new language hook returns a vector type that has properties of the vector mode and element type of that of the element mode. For eg. on AArch64, gi

Re: [PATCH v3] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread Jakub Jelinek
On Fri, Mar 07, 2025 at 01:04:10PM +0100, Jan Hubicka wrote: > > diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc > > index fb93a6fdd0a..be5e27fc391 100644 > > --- a/gcc/config/i386/i386.cc > > +++ b/gcc/config/i386/i386.cc > > @@ -20600,12 +20600,26 @@ ix86_class_likely_spilled_p (re

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Richard Biener
On Fri, 7 Mar 2025, Tejas Belagod wrote: > On 3/7/25 4:38 PM, Richard Biener wrote: > > On Fri, 7 Mar 2025, Tejas Belagod wrote: > > > >> Given a vector mode and its corresponding element mode, this new new > >> language > >> hook returns a vector type that has properties of the vector mode and >

Re: [PATCH v3] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread Jan Hubicka
> diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc > index fb93a6fdd0a..be5e27fc391 100644 > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -20600,12 +20600,26 @@ ix86_class_likely_spilled_p (reg_class_t rclass) >return false; > } > > -/* Implement TARGET_IR

[PATCH] tree-optimization/119155 - wrong aligned access for vectorized packed access

2025-03-07 Thread Richard Biener
When doing strided SLP vectorization we use the wrong alignment for the possibly piecewise access of the vector elements for loads and stores. While we are carefully using element aligned loads and stores that isn't enough for the case the original scalar accesses are packed. The following instea

[PATCH] Fix for compile-time hang in ext-dce [PR119099]

2025-03-07 Thread Alexey Merzlyakov
ext-dce + df-core could be treated as finite-state machine, whose states acting on livenow and livein bitmaps. In some situations, it can loop forever flipping/flopping or widening/narrowing livein states with livenow. Dataflow solver algorithm will never come to the null-worklists in this case. Th

[PATCH] vect: Fix build on MacOS

2025-03-07 Thread Simon Martin
The build is broken on MacOS since r15-7881-ge8651b80aeb86d because tree-vect-data-refs.cc uses std::min but does not include . This patch fixes it by defining INCLUDE_ALGORITHM in that file. Successfully built on x86_64-apple-darwin19.6.0. gcc/ChangeLog: * tree-vect-data-refs.cc: Defin

[pushed] aarch64: Use force_lowpart_subreg in a BFI splitter [PR119133]

2025-03-07 Thread Richard Sandiford
lowpart_subreg ICEs are the gift that keeps giving. This is another case where we need to use force_lowpart_subreg instead, to handle cases where the input is already a subreg and where the combined subreg is not allowed as a single operation. We don't need to check can_create_pseudo_p since the

[wwwdocs v2] gcc-15/changes: Mention the new -mveclibabi=aocl option in the IA-32/x86-64 section

2025-03-07 Thread Filip Kastl
Hi Gerald, On Thu 2025-03-06 18:38:12, Gerald Pfeifer wrote: > On Thu, 6 Mar 2025, Filip Kastl wrote: > > I would like to gently ping this. > > Ooops, sorry. > > > > + GCC now supports generating vectorized math calls to the math > > > library > > > +from AMD Optimizing CPU Libraries (AOCL

Re: [PATCH 2/4] c++/modules: Track module purview for deferred instantiations [PR114630]

2025-03-07 Thread Nathaniel Shead
On Thu, Mar 06, 2025 at 12:45:33PM -0500, Jason Merrill wrote: > On 3/5/25 7:54 AM, Nathaniel Shead wrote: > > On Wed, Feb 26, 2025 at 10:29:59AM -0500, Jason Merrill wrote: > > > On 2/21/25 6:05 AM, Nathaniel Shead wrote: > > > > After seeing PR c++/118964 I'm coming back around to this [1] patch

[PATCH 0/6] [RFC] GNU vector operations on svbool_t.

2025-03-07 Thread Tejas Belagod
This patch series implements C/C++ operators on SVE's svbool_t ACLE type. Following is a spec that describes the semantics when operators are applied to svbool_t. svbool_t is an SVE ACLE type that is a vector of non-standard booleans. svbool_t[i] is a boolean type. Initialization: svbool_t pg

Re: [PATCH v3] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread H.J. Lu
On Fri, Mar 7, 2025 at 8:42 PM Jan Hubicka wrote: > > > > This is OK. In general, I think we could also go with assert on > > > mem_cost <= 2, since that is kind of bogus setting (I don't think we > > > will ever need to support x86 CPU with memory stores being as cheap as > > > reg-reg moves), b

Re: [PATCH] libstdc++: Add missing static_assert to std::expected

2025-03-07 Thread Jonathan Wakely
On Thu, 6 Mar 2025 at 20:15, Jonathan Wakely wrote: > On Thu, 6 Mar 2025 at 20:13, Jonathan Wakely wrote: > > > > The r15-2326-gea435261ad58ea change missed a static_assert for > > is_move_constructible_v in expected::value()&&. When > > exceptions are enabled, the program is ill-formed if the er

Re: [PATCH 3/3] c++/modules: Handle exposures of TU-local types in uninstantiated member templates

2025-03-07 Thread Nathaniel Shead
On Thu, Mar 06, 2025 at 11:00:46AM -0500, Jason Merrill wrote: > On 2/8/25 7:32 AM, Nathaniel Shead wrote: > > On Fri, Feb 07, 2025 at 11:11:21AM -0500, Jason Merrill wrote: > > > On 2/7/25 9:28 AM, Nathaniel Shead wrote: > > > > On Fri, Feb 07, 2025 at 08:14:23AM -0500, Jason Merrill wrote: > > >

Re: [PATCH v3] ira: Add new hooks for callee-save vs spills [PR117477]

2025-03-07 Thread Jakub Jelinek
On Fri, Mar 07, 2025 at 07:36:29PM +0800, H.J. Lu wrote: > > > /* push is 1 byte while typical spill is 4-5 bytes. > > > ??? We probably should adjust size costs accordingly. > > > Costs are relative to reg-reg move that has 2 bytes for 32bit > > > and 3 bytes other

Re: The COBOL front end, version 3, now in 14 easy pieces

2025-03-07 Thread Richard Biener
On Fri, Mar 7, 2025 at 11:34 AM Richard Biener wrote: > > On Thu, Mar 6, 2025 at 11:50 PM James K. Lowden > wrote: > > > > On Wed, 5 Mar 2025 11:43:16 +0100 > > Richard Biener wrote: > > > > > > In short, despite not trying to support DESTDIR, we do anyway, by > > > > happy accident. And we are

Re: [PATCH] docs: Attempt to clarify complex literal suffixes [PR112960]

2025-03-07 Thread Sandra Loosemore
On 3/7/25 02:21, Jakub Jelinek wrote: Hi! This attempts to clarify Complex literal suffixes in the documentation. Thanks for helping straighten this out! --- gcc/doc/extend.texi.jj 2025-03-05 06:39:50.263296970 +0100 +++ gcc/doc/extend.texi 2025-03-07 10:00:25.816829046 +0100 @@ -990,19

Re: libgcc: Remove PREDRES and LS64 from AArch64 cpuinfo

2025-03-07 Thread Richard Sandiford
Wilco Dijkstra writes: > Change AArch64 cpuinfo to follow the latest updates to the FMV spec [1]: > Remove FEAT_PREDRES and FEAT_LS64*. Preserve the ordering in enum > CPUFeatures. > > Passes regress, OK for commit? > > [1] https://github.com/ARM-software/acle/pull/382 > > gcc: > * commo

Re: [PATCH v2] c++: ICE with operator new[] in constexpr [PR118775]

2025-03-07 Thread Jason Merrill
On 3/6/25 5:13 PM, Marek Polacek wrote: On Wed, Mar 05, 2025 at 05:28:49PM -0500, Jason Merrill wrote: On 3/5/25 4:00 PM, Marek Polacek wrote: On Wed, Mar 05, 2025 at 03:31:59PM -0500, Jason Merrill wrote: On 3/5/25 12:09 PM, Marek Polacek wrote: On Tue, Mar 04, 2025 at 05:34:10PM -0500, Jaso

[PATCH] c++: Evaluate immediate invocation call arguments with mce_true [PR119150]

2025-03-07 Thread Jakub Jelinek
Hi! Since Marek's r14-4140 which moved immediate invocation evaluation from build_over_call to cp_fold_r, the following testcase is miscompiled. The a = foo (bar ()); case is actually handled right, that is handled in cp_fold_r and the whole CALL_EXPR is at that point evaluated by cp_fold_immedia

[PATCH] c++: Perform immediate invocation evaluation separately from cp_fold_r [PR118068]

2025-03-07 Thread Jakub Jelinek
Hi! The r14-4140 change moved consteval evaluation from build_over_call to cp_fold_r. The following testcase is a regression caused by that change. There is a cast around immediate invocation, (int) foo (0x23) where consteval for returns unsigned char. When the consteval call has been folded ea

Re: AArch64: Turn off outline atomics with -mcmodel=large (PR112465)

2025-03-07 Thread Wilco Dijkstra
Hi Richard, >> Basically the small and large model are fundamentally incompatible. The >> infamous >> "dumb linker" approach means it doesn't try to sort sections, so an ADRP >> relocation >> will be out of reach if its data is placed after a huge array. Static >> linking with GLIBC or >> enabl

Re: [PUSHED] libstdc++: Avoid '-Wunused-parameter' for '__what' in function 'void std::__throw_format_error(const char*)'

2025-03-07 Thread Thomas Schwinge
Hi Jonathan! On 2025-03-06T19:58:55+, Jonathan Wakely wrote: > On Thu, 6 Mar 2025 at 19:48, Jonathan Wakely wrote: >> On Thu, 6 Mar 2025 at 14:28, Thomas Schwinge wrote: >> > In a '-fno-exceptions' configuration: >> > >> > In file included from >> > ../../../../../source-gcc/libstdc++-v3

[PATCH] docs: Attempt to clarify complex literal suffixes [PR112960]

2025-03-07 Thread Jakub Jelinek
Hi! This attempts to clarify Complex literal suffixes in the documentation. Ok for trunk? 2025-03-07 Jakub Jelinek PR c/112960 PR c/117029 * extend.texi (Complex): Add I and J suffixes to the list of complex suffixes, adjust for all of those being part of ISO

[TO-BE-COMMITED,PATCH] s390: Deprecate ESA/390 support

2025-03-07 Thread Stefan Schulze Frielinghaus
Deprecate support for the ESA/390 architecture which will be eventually removed, and encourage the usage of the z/Architecture instead. Furthermore, default for -m31 to -mzarch whereas previously we defaulted to -mesa. gcc/ChangeLog: * config.gcc: Fail in case of option --with-mode=esa.

Re: [PATCH] LoongArch: Add a dedicated pattern for bitwise + alsl

2025-03-07 Thread Lulu Cheng
LGTM, but since we're now in stage 4, I believe it should be merged into GCC16 Stage 1. Thanks! 在 2025/3/1 上午11:38, Xi Ruoyao 写道: We've implemented the slli + bitwise => bitwise + slli reassociation in r15-7062. I'd hoped late combine could handle slli.d + bitwise + add.d => bitwise + slli.d

Re: [PATCH] c, v2: do not warn about truncating NUL char when initializing nonstring arrays [PR117178]

2025-03-07 Thread Kees Cook
On February 14, 2025 2:21:07 AM PST, Jakub Jelinek wrote: >On Thu, Feb 13, 2025 at 02:10:25PM +0100, Jakub Jelinek wrote: >> Kees, are you submitting this under assignment to FSF (maybe the Google one >> if it has one) or DCO? See https://gcc.gnu.org/contribute.html#legal >> for details. If D

[COMMITTED] Sanitizer: Mention -g option in documentation [PR56682]

2025-03-07 Thread Sandra Loosemore
gcc/ChangeLog PR sanitizer/56682 * doc/invoke.texi (Instrumentation Options): Document that -g is useful with -fsanitize=thread and -fsanitize=address. Also mention -fno-omit-frame-pointer per the asan wiki. --- gcc/doc/invoke.texi | 9 - 1 file changed, 8 i

RE: The COBOL front end, version 3, now in 14 easy pieces

2025-03-07 Thread Robert Dubner
Richard and Jakub, and everybody else who has offered advice and help I trust you realize that your message means Jim and I are reaching the top of a mountain we've been climbing for several years now. This is very exciting. Thank you. Thank you very much. Bob Dubner > -Original Message-

Re: [PATCH] ipa-cp: Avoid ICE when redistributing nodes among edges to recursive clones (PR 118318)

2025-03-07 Thread Martin Jambor
Hello, On Mon, Mar 03 2025, Martin Jambor wrote: > Hi, > > PR 118318 reported an ICE during PGO build of Firefox when IPA-CP, in > the final stages of update_counts_for_self_gen_clones where it > attempts to guess how to distribute profile count among clones created > for recursive edges and the v

Ping: [PATCH v2 1/5][STAGE1] c-family: add btf_type_tag and btf_decl_tag attributes

2025-03-07 Thread David Faust
Ping. this patch: https://gcc.gnu.org/pipermail/gcc-patches/2025-February/675242.html series: https://gcc.gnu.org/pipermail/gcc-patches/2025-February/675241.html On 2/6/25 11:54, David Faust wrote: > Add two new c-family attributes, "btf_type_tag" and "btf_decl_tag" > along with a simple shar

Re: [PATCH v2 6/7] Alpha: Add option to avoid data races for sub-longword memory stores [PR117759]

2025-03-07 Thread Maciej W. Rozycki
On Mon, 6 Jan 2025, Jeff Law wrote: > > I note that the atomic sequences emitted are suboptimal performance-wise > > as the looping branch for the unsuccessful completion of the sequence > > points backwards, which means it will be predicted as taken despite that > > in most cases it will fall thr

Re: [PATCH] libstdc++: Fix views::zip_transform constraints for empty range pack [PR111138]

2025-03-07 Thread Tomasz Kaminski
On Fri, Mar 7, 2025 at 5:08 PM Jonathan Wakely wrote: > > > On Fri, 7 Mar 2025 at 15:59, Patrick Palka wrote: > >> On Fri, 7 Mar 2025, Jonathan Wakely wrote: >> >> > >> > >> > On Fri, 7 Mar 2025 at 15:05, Tomasz Kamiński wrote: >> > Add missing move_constructible && regular_invocable const

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
On 3/7/25 5:34 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: Given a vector mode and its corresponding element mode, this new new language hook returns a vector type that has properties of

Re: [PATCH v2 7/7] Alpha: Add option to avoid data races for partial writes [PR117759]

2025-03-07 Thread Maciej W. Rozycki
On Mon, 13 Jan 2025, Jeff Law wrote: > > + For non-BWX targets we need to load data from memory, mask it such as > > + to keep any part outside the area written, insert data to be stored, > > + and write the result back atomically. For sizes that are not a power > > + of 2 there are no by

Re: [PATCH] c, v2: do not warn about truncating NUL char when initializing nonstring arrays [PR117178]

2025-03-07 Thread Joseph Myers
On Thu, 13 Feb 2025, Jakub Jelinek wrote: > 2025-02-13 Kees Cook > Jakub Jelinek > > PR c/117178 > gcc/ > * doc/invoke.texi (Wunterminated-string-initialization): Document > the new interaction between this warning and -Wc++-compat and that > initialization

Re: [PATCH] c-family, tree: Allow nonstring attribute on multidimensional arrays [PR117178]

2025-03-07 Thread Joseph Myers
On Fri, 14 Feb 2025, Jakub Jelinek wrote: > --- gcc/testsuite/c-c++-common/attr-nonstring-9.c.jj 2025-02-13 > 16:32:38.375848629 +0100 > +++ gcc/testsuite/c-c++-common/attr-nonstring-9.c 2025-02-14 > 10:58:08.557320758 +0100 > @@ -0,0 +1,51 @@ > +/* Test to exercise attribute "nonstring" sy

Re: AArch64: Turn off outline atomics with -mcmodel=large (PR112465)

2025-03-07 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >>> Basically the small and large model are fundamentally incompatible. The >>> infamous >>> "dumb linker" approach means it doesn't try to sort sections, so an ADRP >>> relocation >>> will be out of reach if its data is placed after a huge array. Static >

Re: [PATCH v2] c++: ICE with operator new[] in constexpr [PR118775]

2025-03-07 Thread Marek Polacek
On Fri, Mar 07, 2025 at 12:00:00PM -0500, Jason Merrill wrote: > On 3/6/25 5:13 PM, Marek Polacek wrote: > > On Wed, Mar 05, 2025 at 05:28:49PM -0500, Jason Merrill wrote: > > > On 3/5/25 4:00 PM, Marek Polacek wrote: > > > > On Wed, Mar 05, 2025 at 03:31:59PM -0500, Jason Merrill wrote: > > > > >

Ping: [PATCH v2 2/5][STAGE1] dwarf: create annotation DIEs for btf tags

2025-03-07 Thread David Faust
Ping. Patches 3-5 in the series have been reviewed, but depend heavily upon the DWARF implementation in this patch. It would be useful to have some indication of whether the new DWARF implementation is generally OK... Richard, your feedback on earlier iterations was very helpful, maybe you could

Re: [PATCH] c++: Evaluate immediate invocation call arguments with mce_true [PR119150]

2025-03-07 Thread Marek Polacek
On Fri, Mar 07, 2025 at 05:53:58PM +0100, Jakub Jelinek wrote: > Hi! > > Since Marek's r14-4140 which moved immediate invocation evaluation > from build_over_call to cp_fold_r, the following testcase is miscompiled. > > The a = foo (bar ()); case is actually handled right, that is handled > in cp

[PUSHED] Fix testcases up after recent -Wreturn-type change

2025-03-07 Thread Andrew Pinski
I missed these two testcases in the diff when looking for testcases that fail. The change is the same as what was done for gcc.dg/Wreturn-mismatch-2.c. Pushed as obvious after a quick test. gcc/testsuite/ChangeLog: * gcc.dg/Wreturn-mismatch-2a.c: Change dg-warning for the last -W

Re: [RFC][C]New syntax for the argument of counted_by attribute for C language

2025-03-07 Thread Kees Cook
On Thu, Mar 06, 2025 at 04:27:49PM -0800, Yeoul Na wrote: > Thanks for writing up the RFC and keeping us in the loop. Are > you planning to add “__self.” to GCC's C++ compiler as well in Isn't this strictly a C feature? [1] > the future? The problem we have with “__self” being a default > way of

[PATCH v2] libstdc++: Fix views::zip_transform constraints for empty range pack [PR111138]

2025-03-07 Thread Tomasz Kamiński
Add missing move_constructible && regular_invocable constrains on functor type, and is_object on functor result type for invocations of views::zip_transform without range arguments. PR libstdc++/38 libstdc++-v3/ChangeLog: * include/std/ranges (_ZipTransform::operator()):

Re: [RFC][C]New syntax for the argument of counted_by attribute for C language

2025-03-07 Thread Bill Wendling
On Thu, Mar 6, 2025 at 4:28 PM Yeoul Na wrote: > > Hi Qing, > > Thanks for writing up the RFC and keeping us in the loop. Are you planning to > add “__self.” to GCC's C++ compiler as well in the future? The problem we > have with “__self” being a default way of annotating bounds is that C++ > c

Re: [RFC] PR81358: Enable automatic linking of libatomic

2025-03-07 Thread Sam James
Sam James writes: > Prathamesh Kulkarni writes: > >>> -Original Message- >>> From: Prathamesh Kulkarni >>> Sent: 10 January 2025 09:48 >>> To: Thomas Schwinge >>> Cc: Tobias Burnus ; Joseph Myers >>> ; Xi Ruoyao ; Matthew >>> Malcomson ; gcc-patches@gcc.gnu.org; Tom de >>> Vries >>> S

[PATCH] contrib: Clean up outdated parts of gcc-git-customization.sh

2025-03-07 Thread Jonathan Wakely
It's very unlikely that anybody is still using the old remotes/$user Git repo setup and still needs this script to be able to migrate it to the remotes/users/$user structure. Simplify the script by removing those parts. This fixes an error that gets displayed in some circumstances: fatal: no such

Re: libstdc++: Allow 'configure.host' to pre-set 'EXTRA_CFLAGS', 'EXTRA_CXX_FLAGS' (was: [PATCH] libstdc++: Allow 'configure.host' to modify 'EXTRA_CFLAGS', 'EXTRA_CXX_FLAGS')

2025-03-07 Thread Jonathan Wakely
On Thu, 6 Mar 2025 at 13:54, Thomas Schwinge wrote: > > Hi! > > On 2025-02-26T23:08:29+, Jonathan Wakely wrote: > > On Wed, 26 Feb 2025 at 20:53, Thomas Schwinge > > wrote: > >> On 2025-02-26T10:50:11+, Jonathan Wakely wrote: > >> > On Wed, 26 Feb 2025 at 10:47, Jonathan Wakely wrote:

Re: [RFC][C]New syntax for the argument of counted_by attribute for C language

2025-03-07 Thread Yeoul Na
Hi Kees, > On Mar 7, 2025, at 1:38 PM, Kees Cook wrote: > > On Thu, Mar 06, 2025 at 04:27:49PM -0800, Yeoul Na wrote: >> Thanks for writing up the RFC and keeping us in the loop. Are >> you planning to add “__self.” to GCC's C++ compiler as well in > > Isn't this strictly a C feature? [1] No,