Re: Coarray shared memory testing

2025-07-22 Thread Andre Vehreschild
Hi Jerry, > Andre, one of the the other things I have not got to yet is reviewing the > interface between gfortran and the caf_shmem. Is this interface generic > enough to allow other libraries to be used. For example, we have the > caf_shmem library and we have the OpenCoarrays library, down t

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

2025-07-22 Thread Nathan Myers
This should be close to ready. However, std::is_invocable and noexcept still fail oddly applied to the not_fp result. The remaining failing test cases in */nttp.cc, commented out, need careful examination to see whether they should be expecting different results given that the argument function obj

[PATCH] libstdc++: Fix obvious mistake in inplace_vector::assign_range [PR119137]

2025-07-22 Thread Tomasz Kamiński
In case of input iterators, the loop that assigns to existing elements should run up to number of elements in vector (_M_size) not capacity (_Nm). PR libstdc++/119137 libstdc++-v3/ChangeLog: * include/std/inplace_vector (inplace_vector::assign_range): Replace _Nm with _M_

[r16-2374 Regression] FAIL: gcc.target/i386/asm-hard-reg-2.c (test for errors, line 32) on Linux/x86_64

2025-07-22 Thread haochen.jiang
On Linux/x86_64, a51c146ebce41b5e4326b222f2d9e04bb22d276f is the first bad commit commit a51c146ebce41b5e4326b222f2d9e04bb22d276f Author: Stefan Schulze Frielinghaus Date: Mon Jul 21 13:05:26 2025 +0200 Hard register constraints caused FAIL: gcc.dg/asm-hard-reg-1.c scan-assembler-times f

[PATCH] libstdc++: doc: Rectify referencing of non-existent type

2025-07-22 Thread mrcarrot4
From: Tuur Martens The unordered_map header incorrectly refers to a non-existent template parameter _Value in default template argument descriptions. They should refer to _Key instead.\n\nThis patch fixes these descriptions to match the actual template parameters. libstdc++-v3/ChangeLog:

[COMMITTED 07/22] ada: Fix wrong indirect access to bit-packed array in iterated loop

2025-07-22 Thread Marc Poulhiès
From: Eric Botcazou This comes from a missing expansion of the bit-packed array reference in the loop, because the actual subtype created for the dereference lacks a Packed_Array_Impl_Type as it is ultimately created by the Preanalyze_Range call present in Analyze_Loop_Statement. gcc/ada/ChangeL

[COMMITTED 04/22] ada: exp_util.adb: prevent infinite loop in case of broken code

2025-07-22 Thread Marc Poulhiès
From: Ghjuvan Lacambre A recent commit modified exp_util.adb in order to fix the selection of Finalize subprograms in the case of untagged objects. This introduced regressions for GNATSAS in fixedbugs by causing GNAT2SCIL to loop over the same type over and over in case of broken code. We fix thi

[COMMITTED 02/22] ada: Ensure Expression_Copy has a parent before analysis

2025-07-22 Thread Marc Poulhiès
From: Viljar Indus Some analysis requires going up the parent chain to get the relevant context. Ensure that is done for the Expression_Copy node which is not a syntactic node. gcc/ada/ChangeLog: * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Ensure the Expression_Copy al

[COMMITTED 05/22] ada: Capacity determination for container aggregate with container iterator

2025-07-22 Thread Marc Poulhiès
From: Gary Dismukes In the case of a container aggregate that has a container_element_association given by an iterator_specification that iterates over a container object (for example, "[for E of V => E]"), the compiler will now determine the number of elements in the object and can use that in d

[COMMITTED 12/22] ada: Fix unnecessary extra RE_Activation_Chain_Access with No_Task_Parts

2025-07-22 Thread Marc Poulhiès
From: Denis Mazzucato This patch checks the presence of No_Task_Parts on any ancestor or inherited interface, not only its root type, since No_Task_Parts prohibits tasking for any of its descendant. In case the current subprogram is overridden/inherited, we need to return the same value we would

[COMMITTED 11/22] ada: Adding support to defer the addition of extra formals

2025-07-22 Thread Marc Poulhiès
From: Javier Miranda Add support to create the extra formals when the underlying type of some formal type or return type of a subprogram, subprogram type or entry is not available when the entity is frozen. For example, when a function that returns a private type is frozen before the full-view of

[COMMITTED 03/22] ada: Add Unique_Component_Name function for use by CCG.

2025-07-22 Thread Marc Poulhiès
From: Steve Baird Define a new function which, initially, is never called. It is intended to be called from CCG. If an Ada tagged record type has a component named Foo, then the generated corresponding C struct might have a component with the same name. This approach almost works, but breaks down

[COMMITTED 10/22] ada: Tune recent change for bit-packed arrays to help GNATprove backend

2025-07-22 Thread Marc Poulhiès
From: Piotr Trojanek When GNAT is operating in GNATprove_Mode the Expander_Active flag is disabled, but we still must do things that ordinary backends expect. gcc/ada/ChangeLog: * sem_util.adb (Get_Actual_Subtype): Do the same for GCC and GNATprove backends. Tested on x86_64-pc

[COMMITTED 09/22] ada: Expand continue procedure calls for GNATprove

2025-07-22 Thread Marc Poulhiès
From: Martin Clochard Continue being a non-reserved keyword, occurrences of continue may be resolved as procedure calls. Get that special case out of the way for GNATprove, in anticipation of support for continue keyword. gcc/ada/ChangeLog: * exp_spark.adb (Expand_SPARK): Add expansion

[COMMITTED 16/22] ada: Remove obsolete code from Safe_Unchecked_Type_Conversion

2025-07-22 Thread Marc Poulhiès
From: Eric Botcazou That's a kludge added to work around the limitations of the stack checking mechanism used in the early days. gcc/ada/ChangeLog: * exp_util.ads (May_Generate_Large_Temp): Delete. * exp_util.adb (May_Generate_Large_Temp): Likewise. (Safe_Unchecked_Type_

Re: [PATCH v3] libstdc++: Implement std::dims from .

2025-07-22 Thread Tomasz Kaminski
On Mon, Jul 21, 2025 at 5:51 PM Luc Grosheintz wrote: > This commit implements the C++26 feature std::dims described in P2389R2. > It sets the feature testing macro to 202406 and adds tests. > > Also fixes the test mdspan/version.cc > > libstdc++-v3/ChangeLog: > > * include/bits/version.d

[PATCH] Default to -mcpu=ultrasparc3 on Solaris/SPARC

2025-07-22 Thread Rainer Orth
Prompted by the discussions around a recent clang bug, I realized that gcc still defaults to -mcpu=v9 on Solaris/SPARC. This is an oversight since the Oracle Studio 12.6 cc, released in 2017, already defaults to -xarch=sparcvis2, the equivalent of -mcpu=ultrasparc3. Besides, both the 32 and 64-bi

[COMMITTED 13/22] ada: Fix assertion failure on aggregate with controlled component

2025-07-22 Thread Marc Poulhiès
From: Eric Botcazou The assertion is: pragma Assert (Side_Effect_Free (L)); in Make_Tag_Ctrl_Assignment and demonstrates that the sequence: Remove_Side_Effects (L); pragma Assert (Side_Effect_Free (L)); does not hold in this case. What happens is that Remove_Side_Effects uses a ren

[COMMITTED 06/22] ada: Replace "not Present" test with "No" test

2025-07-22 Thread Marc Poulhiès
From: Gary Dismukes Minor change to satisfy GNAT SAS checker. gcc/ada/ChangeLog: * exp_aggr.adb (Build_Size_Expr): Change test of "not Present (...)" to "No (...)". Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 3 +-- 1 file changed, 1 inserti

Re: [PATCH v2 1/3] libstdc++: Implement is_sufficiently_aligned [PR120994]

2025-07-22 Thread Tomasz Kaminski
On Mon, Jul 21, 2025 at 10:18 AM Luc Grosheintz wrote: > This commit implements and tests the function is_sufficiently_aligned > from P2897R7. > > PR libstdc++/120994 > > libstdc++-v3/ChangeLog: > > * include/bits/align.h (is_sufficiently_aligned): New function. > * includ

[COMMITTED 19/22] ada: Add destructors extension

2025-07-22 Thread Marc Poulhiès
From: Ronan Desplanques This patch adds a GNAT-specific extension which enables "destructors". Destructors are an optional replacement for Ada.Finalization where some aspects of the interaction with type derivation are different. gcc/ada/ChangeLog: * doc/gnat_rm/gnat_language_extensions

[COMMITTED 01/22] ada: Improved support for mutably tagged types

2025-07-22 Thread Marc Poulhiès
From: Steve Baird Fix bugs related to mutably tagged types in streaming operations, Put_Image attributes, aggregates, composite equality comparisons with mutably-tagged components, and other issues. gcc/ada/ChangeLog: * exp_aggr.adb (Build_Record_Aggr_Code.Gen_Assign): In the case of

[PATCH] libstdc++: Make testsuite_iterators constexpr and expand inplace_vector tests [PR119137]

2025-07-22 Thread Tomasz Kamiński
All functions in testsuite_iterators.h are now marked constexpr, targeting the earliest possible standard. Most functions use C++14 due to multi-statement bodies, with exceptions: * BoundsContainer and some constructors are C++11 compatible. * OutputContainer is C++20 due to operator new/delete us

[COMMITTED 08/22] ada: Tune check for restriction No_Relative_Delay and call to Set_Handler

2025-07-22 Thread Marc Poulhiès
From: Piotr Trojanek When checking restriction No_Relative_Delay and detecting calls to Ada.Real_Time.Timing_Events.Set_Handler with a Time_Span parameter, we looked at the exact type of the actual parameter, while we should look at its base type. This patch looks at the type of actual parameter

[COMMITTED 14/22] ada: Additional condition for Capacity discriminant on bounded container aggregates

2025-07-22 Thread Marc Poulhiès
From: Gary Dismukes This change test an additional condition as part of the criteria used for deciding whether to generate a call to a container type's Length function (for passing to the Empty function) when determining the size of the object to allocate for a bounded container aggregate with a

Re: [PATCH] zlib: import zlib-1.3.1

2025-07-22 Thread Jeff Law
On 7/20/25 6:54 PM, Sam James wrote: This is vanilla zlib-1.3.1 imported over the existing zlib/ dir with: * README adjusted to add the GCC note at the top; * GCC's ChangeLog merged with the upstream one, as before; * Deleted upstream Makefile as has been done before (we use an autoconf- ge

[PATCH v2] defaults.h: Default MAX_FIXED_MODE_SIZE to MAX (BITS_PER_WORD * 2, 64)

2025-07-22 Thread Hans-Peter Nilsson
On Fri, 18 Jul 2025, Pietro Monteiro wrote: > I think you need to update the description of MAX_FIXED_MODE_SIZE in > gcc/doc/tm.texi.in with the new default. Oops, absolutely, thanks for pointing that out. Here's v2, with info and dvi results inspected for sanity. Ok to commit now? (Note: sciss

Re: [PATCH v2] testsuite: Fix overflow in gcc.dg/vect/pr116125.c

2025-07-22 Thread Siddhesh Poyarekar
On 2025-07-21 04:52, Siddhesh Poyarekar wrote: On 2025-07-14 03:02, Richard Biener wrote: On Fri, Jul 11, 2025 at 8:27 PM Siddhesh Poyarekar wrote: The test ends up writing a byte beyond bounds of the buffer, which

Re: [PATCH] strlen: Don't do the malloc+memset->calloc optimization in some cases [PR83022]

2025-07-22 Thread Andrew Pinski
On Fri, Apr 18, 2025 at 5:08 PM Andrew Pinski wrote: > > This fixes a long standing (since GCC 5) issue where the malloc+memset->calloc > optimization would happen even if the memset was not always executed. > This is a varient of Nathan's patch: > https://inbox.sourceware.org/gcc-patches/f4b5d10

[PATCH v1 1/2] RISC-V: Avoid vaaddu.vx combine pattern pollute VXRM csr

2025-07-22 Thread pan2 . li
From: Pan Li The vaaddu.vx combine almost comes from avg_floor, it will requires the vxrm to be RDN. But not all vaaddu.vx should depends on the RDN. The vaaddu.vx combine should leverage the VXRM value as is instead of pollute them all to RDN. This patch would like to fix this and set it as i

[PATCH v1 0/2] Avoid RVV fixed insn VX combine pollute VXRM

2025-07-22 Thread pan2 . li
From: Pan Li The RVV fixed point insn VX combine should focus on the insn itself, instead of any standard name like avg_floor, the vxrm should be the value of insn as is. The below test suites are passed for this patch series. * The rv64gcv fully regression test. Pan Li (2): RISC-V: Avoid vaa

[PATCH] testsuite: Mark fn1 in pr81627.c as noinline [PR120101]

2025-07-22 Thread Andrew Pinski
Since r16-372-g064cac730f88dc fn1 is now inlined into main which meant the scan dump was failing since it was looking for it only once. Marking fn1 as noinline gets us back to the old behavior and no longer dependent on the inliner. Pushed as obvious after a quick test. PR testsuite/12010

[PATCH v1 2/2] RISC-V: Add test case for vx combine polluting VXRM

2025-07-22 Thread pan2 . li
From: Pan Li Add asm check to make sure vx combine of vaaddu.vx will not pollute the vxrm. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-fixed-vxrm-1-u16.c: New test. * gcc.target/riscv/rvv/autovec/vx_vf/vx-fixed-vxrm-1-u32.c: New test. * gcc.target/ri

Re: [PATCH] RISC-V: Rework broadcast handling [PR121073].

2025-07-22 Thread Jeff Law
On 7/22/25 3:03 AM, Robin Dapp wrote: Hi, During the last weeks it became clear that our current broadcast handling needs an overhaul in order to improve maintainability. PR121073 showed that my intermediate fix wasn't enough and caused regressions. This patch now goes a first step towards u

[PATCH v3] x86-64: Remove redundant TLS calls

2025-07-22 Thread H.J. Lu
For TLS calls: 1. UNSPEC_TLS_GD: (parallel [ (set (reg:DI 0 ax) (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr"))) (const_int 0 [0]))) (unspec:DI [(symbol_ref:DI ("e") [flags 0x50]) (reg/f:DI 7 sp)] UNSPEC_TLS_GD) (clobber (reg:DI 5 di))]

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

2025-07-22 Thread Siddhesh Poyarekar
[Apologies if I've missed some context in my reading since I'm coming back to this after a big break] On 2025-07-22 12:33, Qing Zhao wrote: Why it's wrong to pass the VALUE of the original pointer as the first argument to the call to .ACCESS_WITH_SIZE For a pointer field with counted_by attri

Re: [PATCH v2] x86-64: Remove redundant TLS calls

2025-07-22 Thread H.J. Lu
On Mon, Jul 21, 2025 at 8:09 PM Hongtao Liu wrote: > > On Tue, Jul 22, 2025 at 4:47 AM H.J. Lu wrote: > > > > For TLS calls: > > > > 1. UNSPEC_TLS_GD: > > > > (parallel [ > > (set (reg:DI 0 ax) > > (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr"))) > > (const_in

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-22 Thread Martin Uecker
Am Montag, dem 21.07.2025 um 16:03 -0700 schrieb Bill Wendling: > On Mon, Jul 21, 2025 at 2:19 PM Martin Uecker wrote: > > Am Montag, dem 21.07.2025 um 04:29 -0700 schrieb Bill Wendling: > > > On Sun, Jul 20, 2025 at 4:41 AM Martin Uecker wrote: .. > > > > Re original context: The 'struct c_par

Re: [PATCH v3 4/5] vect: Misalign checks for gather/scatter.

2025-07-22 Thread Robin Dapp
So this is the only part I think is odd - there is a dataref, it just has only DR_REF as relevant data. I would have expected we can adjust vect_supportable_dr_alignment to deal with the scatter/gather case. I'm OK with doing it how you did it here, but seeing the /* For now assume all condit

Re: [PATCH v2 3/3] libstdc++: Implement aligned_accessor from mdspan [PR120994]

2025-07-22 Thread Tomasz Kaminski
On Mon, Jul 21, 2025 at 10:25 AM Luc Grosheintz wrote: > This commit completes the implementation of P2897R7 by implementing and > testing the template class aligned_accessor. > > PR libstdc++/120994 > > libstdc++-v3/ChangeLog: > > * include/bits/version.def (aligned_accessor): Ad

Re: [PATCH v2 2/3] libstdc++: Prepare test code for default_accessor for reuse.

2025-07-22 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 11:58 AM Tomasz Kaminski wrote: > > > On Mon, Jul 21, 2025 at 10:19 AM Luc Grosheintz > wrote: > >> All test code of default_accessor can be reused. This commit moves >> the reuseable code into a file generic.cc and prepares the tests for >> reuse with aligned_accessor. >

Re: [PATCH v2 0/3] Implement aligned_accessor [P2897R7]

2025-07-22 Thread Tomasz Kaminski
Hi, These commits mostly LGTM, as mentioned, but as I have mentioned in other emails, They may stay as is for some time. However, we could land a (test rewrite) patch soon, as it does not introduce any functional changes, so you could send a v2 of that, and then patch series with only functional p

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

2025-07-22 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 11:28 AM Tomasz Kaminski wrote: > > > On Tue, Jul 22, 2025 at 9:22 AM Nathan Myers wrote: > >> This should be close to ready. However, std::is_invocable >> and noexcept still fail oddly applied to the not_fp result. >> The remaining failing test cases in */nttp.cc, commen

[PATCH] [aarch64] check for non-NULL vectype in aarch64_vector_costs::add_stmt_cost

2025-07-22 Thread Richard Biener
With a patch still in development we get NULL STMT_VINFO_VECTYPE. One side-effect is that during scalar stmt testing we no longer pass a vectype. The following adjusts aarch64_vector_costs::add_stmt_cost to check for a non-NULL vectype before accessing it, like all the code surrounding it. The ot

Re: [PATCH v3 4/5] vect: Misalign checks for gather/scatter.

2025-07-22 Thread Richard Biener
On Tue, Jul 22, 2025 at 12:02 PM Robin Dapp wrote: > > > So this is the only part I think is odd - there is a dataref, it just > > has only DR_REF as relevant data. I would have expected we can > > adjust vect_supportable_dr_alignment to deal with the scatter/gather > > case. I'm OK with doing i

[PATCH] tree-optimization/121202 - fix vector stmt placement

2025-07-22 Thread Richard Biener
When we have a vector shift with a scalar the shift operand can be external - in that case we should not use the shift operand def as hint where to place the vector shift instruction. The ICE in the PR is because stmt dominance queries only work inside of the vector region. But we should also nev

[PATCH] middle-end/121216 - ICE with VLA const string initializer

2025-07-22 Thread Richard Biener
constant_byte_string fails to consider the string type might be VLA when initialized by an empty string CTOR. Bootstrap and regtest running on x86_64-unknown-linux-gnu. PR middle-end/121216 * expr.cc (constant_byte_string): Check the string type size fits an uhwi before co

Re: [PATCH v2 0/3] Implement aligned_accessor [P2897R7]

2025-07-22 Thread Luc Grosheintz
Hi Tomasz, there's no time-pressure or rush from my side. We've finished the C++23 parts of mdspan, I think that's the important milestone. Hence, I feel it makes a lot of sense if you deprioritize reviewing mdspan related patches for a while. Personally, I think it would be least work for every

[PATCH] RISC-V: testsuite: Fix vx_vf_*run-1-f16.c run tests.

2025-07-22 Thread Robin Dapp
Hi, This patch fixes the vf_vfmacc-run-1-f16.c test failures on rv32 by adding zvfh requirements as well as options to the test and the target harness. Regtested on rv64gcv_zvl512b and rv32gcv_zvl512b. Going to commit as obvious if the CI agrees that it's obvious ;) Regards Robin gcc/testsuit

[PATCH] asf: Skip when an instruction doesn't satisfy the constraints [PR119795]

2025-07-22 Thread Konstantinos Eleftheriou
While scanning the instructions and upon reaching an instruction that doesn't satisfy the constraints that we have set, we were removing the already detected stores, but we were continuing adding stores from that point onward. This was causing issues when the address ranges from later stores overla

Re: [PATCH v5 0/3] Hard Register Constraints

2025-07-22 Thread Stefan Schulze Frielinghaus
On Mon, Jul 21, 2025 at 01:54:55PM -0700, H.J. Lu wrote: > On Mon, Jul 21, 2025 at 4:16 AM Stefan Schulze Frielinghaus > wrote: > > > > On Sat, Jul 19, 2025 at 08:26:22AM -0600, Jeff Law wrote: > > > > > > > > > On 7/17/25 2:24 AM, Stefan Schulze Frielinghaus wrote: > > > > On Wed, Jul 09, 2025 at

Re: [PATCH] [RFC] Move STMT_VINFO_TYPE to SLP_TREE_TYPE

2025-07-22 Thread Richard Biener
On Tue, 22 Jul 2025, Robin Dapp wrote: > The more I look at our heuristic the more it appears due for a rewrite. > But that's really not in my plans right now. I just sent a riscv patch > that does the necessary preparations so you can basically > > s/STMT_VINFO_TYPE (stmt_info)/SLP_TREE_TYPE (n

[PATCH v2] MicroBlaze : Enhance support for atomics. Fix PR118280

2025-07-22 Thread Gopi Kumar Bulusu
namaskaaram Revised patch is attached. This patch no longer changes the default option value for xl-barrel-shift On Mon, Jul 14, 2025 at 10:29 AM Gopi Kumar Bulusu wrote: > > > On Fri, Jul 11, 2025 at 8:12 PM Michael Eager wrote: > >> On 7/10/25 4:41 AM, Gopi Kumar Bulusu wrote: >> > >> > nam

[PATCH 2/4] [aarch64] check for non-NULL vectype in aarch64_vector_costs::add_stmt_cost

2025-07-22 Thread Richard Biener
With a patch still in development we get NULL STMT_VINFO_VECTYPE. One side-effect is that during scalar stmt testing we no longer pass a vectype. The following adjusts aarch64_vector_costs::add_stmt_cost to check for a non-NULL vectype before accessing it, like all the code surrounding it. The ot

[PATCH 3/4] Pass vectype to vect_check_gather_scatter, handle early processing

2025-07-22 Thread Richard Biener
The following removes the STMT_VINFO_VECTYPE usage from vect_check_gather_scatter and instead gets the vector type passed in from the caller. For the two early callers, the one from dataref analysis and the one from vect_mark_stmts_to_be_vectorized we add a mode that works with a NULL vector type

[PATCH] libstdc++: Negative tests for constexpr uses inplace_vector [PR119137]

2025-07-22 Thread Tomasz Kamiński
Adds negative tests for preconditions on inserting into a full inplace_vector and erasing non-existent elementsi at compile-time. This ensures coverage for the inplace_vector specialization. Also extends element access tests to cover front() and back() methods, and const and mutable overloads for

[PATCH v2] libstdc++: Negative tests for constexpr uses inplace_vector [PR119137]

2025-07-22 Thread Tomasz Kamiński
Adds negative tests for preconditions on inserting into a full inplace_vector and erasing non-existent elementsi at compile-time. This ensures coverage for the inplace_vector specialization. Also extends element access tests to cover front() and back() methods, and const and mutable overloads for

[PATCH 1/4] Use SLP graph based walk to perform alignment analysis

2025-07-22 Thread Richard Biener
The following makes us use the SLP graph and its recorded vector types to perform alignment analysis even for loops. This avoids accessing STMT_VINFO_VECTYPE we want to get rid of. v2 adjusts alignment peeling to ignore DRs that are dead because of conditional store pattern recognition.

Re: [PATCH] [aarch64] check for non-NULL vectype in aarch64_vector_costs::add_stmt_cost

2025-07-22 Thread Andrew Pinski
On Tue, Jul 22, 2025, 6:09 AM Richard Biener wrote: > With a patch still in development we get NULL STMT_VINFO_VECTYPE. > One side-effect is that during scalar stmt testing we no longer > pass a vectype. The following adjusts aarch64_vector_costs::add_stmt_cost > to check for a non-NULL vectype

[PATCH 4/4] Do not set STMT_VINFO_VECTYPE from dataref analysis

2025-07-22 Thread Richard Biener
The following makes dataref analysis not set STMT_VINFO_VECTYPE. This leaves the field ready for taking when vectorizable_* transition to use SLP_TREE_VECTYPE. It also delays determining the vectorization mode a little bit - SLP build will first do that then. I have kept a check that there is any

[PATCH] RISC-V: Rework broadcast handling [PR121073].

2025-07-22 Thread Robin Dapp
Hi, During the last weeks it became clear that our current broadcast handling needs an overhaul in order to improve maintainability. PR121073 showed that my intermediate fix wasn't enough and caused regressions. This patch now goes a first step towards untangling broadcast (vmv.v.x), "set first"

[COMMITTED 20/22] ada: Fix minor issues in comments

2025-07-22 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * einfo.ads (Is_Controlled_Active): Fix pasto in comment. * sem_util.ads (Propagate_Controlled_Flags): Update comment for Destructor aspect. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo.ads| 2 +-

[COMMITTED 15/22] ada: Wrong dispatch on result in presence of dependent expression

2025-07-22 Thread Marc Poulhiès
From: Javier Miranda The compiler generates wrong code in a dispatching call on result when the call is performed under dependent conditional expressions or case-expressions. gcc/ada/ChangeLog: * sinfo.ads (Is_Expanded_Dispatching_Call): New flag. (Tag_Propagated): New flag.

[COMMITTED 18/22] ada: Fix crash when creating extra formals for aliased types

2025-07-22 Thread Marc Poulhiès
From: Denis Mazzucato This patch makes sure that we return the same decision for all aliased types when checking if the BIP task extra actuals are needed. gcc/ada/ChangeLog: * sem_ch6.adb (Might_Need_BIP_Task_Actuals): Before retrieving the original corresponding operation we r

[COMMITTED 21/22] ada: Only fold array attributes in SPARK when prefix is safe to evaluate

2025-07-22 Thread Marc Poulhiès
From: Piotr Trojanek Fix missing checks for prefixes of array attributes in GNATprove mode. gcc/ada/ChangeLog: * sem_attr.adb (Eval_Attribute): Only fold array attributes when prefix is static or at least safe to evaluate Tested on x86_64-pc-linux-gnu, committed on master. ---

[PATCH][v2] Use SLP graph based walk to perform alignment analysis

2025-07-22 Thread Richard Biener
The following makes us use the SLP graph and its recorded vector types to perform alignment analysis even for loops. This avoids accessing STMT_VINFO_VECTYPE we want to get rid of. v2 adjusts alignment peeling to ignore DRs that are dead because of conditional store pattern recognition. Bootstap

[PATCH] Run feedback directed ipa-split for flag_auto_profile

2025-07-22 Thread Kugan Vivekanandarajah
Hi, IPA split is now running before auto-profile annotation. Changing it after annotation as it is done for PGO. gcc/ChangeLog: 2025-07-21 Kugan Vivekanandarajah * ipa-split.cc (pass_split_functions::gate): Do not run when flag_auto_profile. (pass_feedback_split_funct

[PATCH v7 11/13] c: Add target_version attribute support.

2025-07-22 Thread Alfie Richards
Hello, Quick update for this patch as I found a minor bug with it. Changed the decl merging logic slightly and added a new test. Reg tested on Aarch64 and x68_64. Kind regards, Alfie -- >8 -- This commit introduces support for the target_version attribute in the c frontend, following the beha

[PATCH v7 11/13] c: Add target_version attribute support.

2025-07-22 Thread Alfie Richards
Hi All, Apologies, that previous patch was clearly hastily made and included some rubbish temp files. Cleaned up patch attached -- >8 -- This commit introduces support for the target_version attribute in the c frontend, following the behavior defined in the Arm C Language Extension. Key change

Re: [PATCH] RISC-V: testsuite: Fix vx_vf_*run-1-f16.c run tests.

2025-07-22 Thread Jeff Law
On 7/22/25 3:04 AM, Robin Dapp wrote: Hi, This patch fixes the vf_vfmacc-run-1-f16.c test failures on rv32 by adding zvfh requirements as well as options to the test and the target harness. Regtested on rv64gcv_zvl512b and rv32gcv_zvl512b.  Going to commit as obvious if the CI agrees that it

Re: [PATCH v2] libstdc++: Negative tests for constexpr uses inplace_vector [PR119137]

2025-07-22 Thread Patrick Palka
On Tue, 22 Jul 2025, Tomasz Kamiński wrote: > Adds negative tests for preconditions on inserting into a full > inplace_vector and erasing non-existent elementsi at compile-time. > This ensures coverage for the inplace_vector specialization. > > Also extends element access tests to cover front() a

Re: [PING][PATCH 0/1] aarch64: testsuite: Keep -mtune=generic when specifying -moverride

2025-07-22 Thread Spencer Abson
Gentle ping. On Mon, Jul 14, 2025 at 09:43:29PM +, Spencer Abson wrote: > Hi all, > > Currently, using '-moverride' in the testsuite will reset the baseline tuning > model from 'generic' to the default tuning for the architecture level. Since > 'generic' is the tuning model relied upon by mo

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

2025-07-22 Thread Qing Zhao
Hi, More thought on this over the weekend. -:) I summarized my thought in the following small writeup, please provide any comment or suggestion. Thanks a lot! Qing === Why it's wrong to pass the VALUE of the original pointer as the first argument to the call

[PATCH] switch-conversion: Reject VLA vector types [PR121091]

2025-07-22 Thread Andrew Pinski
The switch conversion code will generate an array with VLA vector constants in it in some cases but this does not work as the length of the vector type is not known at compile time; only the min size is known. I tried to reject this in initializer_constant_valid_p but code from the C++ front-en

Re: [PATCH] aarch64: Fix fma steering when rename fails [PR120119]

2025-07-22 Thread Remi Machet
On 7/22/25 13:32, Andrew Pinski wrote: > External email: Use caution opening links or attachments > > > Regrename can fail in some case and `insn_rr[INSN_UID (insn)].op_info` > will be null. The FMA steering code was not expecting the failure to happen. > This started to happen after early RA was

Re: [PATCH] tree-sra: Avoid total SRA if there are incompat. aggregate accesses (PR119085)

2025-07-22 Thread Richard Biener
> Am 22.07.2025 um 17:05 schrieb Martin Jambor : > > Hi, > > we currently use the types encountered in the function body and not in > type declaration to perform total scalarization. Bug PR 119085 > uncovered that we miss a check that when the same data is accessed > with aggregate types tha

[PATCH] tree-sra: Avoid total SRA if there are incompat. aggregate accesses (PR119085)

2025-07-22 Thread Martin Jambor
Hi, we currently use the types encountered in the function body and not in type declaration to perform total scalarization. Bug PR 119085 uncovered that we miss a check that when the same data is accessed with aggregate types that those are actually compatible. Without it, we can base total scal

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-07-22 Thread Qing Zhao
Hi, an update on this feature: For a more complicated testing case like the following: #define MAX_LENGTH 10 int a[MAX_LENGTH]; void __attribute__ ((noinline)) foo (int i, bool is_day, bool is_dollar) { if (i < MAX_LENGTH) { if (is_day) __builtin_printf ("day"); else

Re: [PATCH 2/2] xtensa: Fix inaccuracy in xtensa_rtx_costs()

2025-07-22 Thread Max Filippov
On Wed, Jul 16, 2025 at 1:13 AM Takayuki 'January June' Suwa wrote: > > This patch fixes the following defects in the function: > >- The cost of move instructions larger than the natural word width, > specifically "movd[if]_internal", cannot be estimated correctly >- Floating-point or

[PATCH] aarch64: Fix fma steering when rename fails [PR120119]

2025-07-22 Thread Andrew Pinski
Regrename can fail in some case and `insn_rr[INSN_UID (insn)].op_info` will be null. The FMA steering code was not expecting the failure to happen. This started to happen after early RA was added but it has been a latent bug before that. Build and tested for aarch64-linux-gnu. PR target/1

Re: [PATCH v3 4/5] vect: Misalign checks for gather/scatter.

2025-07-22 Thread Robin Dapp
Note if-conversion emits IFN_MASK_LOAD/STORE, only the vectorizer later emits the LEN variants. So this is about whether there are (might) be uarchs that have vector aligned loads (aka target alignment is sizeof(vector)) and in addition to that have support for misaligned loads but those with sti

Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-22 Thread Iain Sandoe
Hi Andre It would be very helpful if there were such a thing as a “hello-coarrays.fxx” code for those of us who do not have existing installations of mpi &c. aand limited time to so tests… … experiments so far - below thanks Iain > >> > > We like everyone to test the new caf_shmem library an

[PATCH] Fortran: fix passing of character length of function to procedure [PR121203]

2025-07-22 Thread Harald Anlauf
Dear all, the attached patch fixes a long-standing issue with legacy code, where an assumed-length character function is passed as actual argument to a procedure, and when there is no explicit interface. The solution is to do the same as in the case when there is an actual interface: take the cha

Re: [PATCH] aarch64: Fix fma steering when rename fails [PR120119]

2025-07-22 Thread Andrew Pinski
On Tue, Jul 22, 2025, 11:05 AM Remi Machet wrote: > > On 7/22/25 13:32, Andrew Pinski wrote: > > External email: Use caution opening links or attachments > > > > > > Regrename can fail in some case and `insn_rr[INSN_UID (insn)].op_info` > > will be null. The FMA steering code was not expecting th

Re: [Fortran, Coarray] Call-out to everyone having Fortran coarray-codes available

2025-07-22 Thread Toon Moene
On 7/22/25 17:22, Iain Sandoe wrote: Hi Andre 2. If I try linking a trivial Fortran code thus: gfortran /src-local/test/fortran/hello.f90 -o h -lcaf_shmem -fcoarray=lib the exe then hangs - it looks like it might be deadlocked in startup code: Call graph: 2166 Thread_408707810 Disp

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-22 Thread Bill Wendling
+josmy...@redhat.com On Sun, Jul 20, 2025 at 4:20 AM wrote: > > From: Bill Wendling > > Also, this code doesn't go further than parsing. I.e., it doesn't generate the > internal gimple code that accesses the struct fields. The code is meant to > show > that it *is* possible to perform a delayed

[pushed] c++: constexpr union placement new [PR121068]

2025-07-22 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The note and example in [class.union] p6 think that placement new can be used to change the active member of a union, but we didn't support that for array members in constant-evaluation even after implementing P1330 and P2747. First I tried

Re: [PATCH] Fortran: fix passing of character length of function to procedure [PR121203]

2025-07-22 Thread Jerry D
On 7/22/25 11:28 AM, Harald Anlauf wrote: Dear all, the attached patch fixes a long-standing issue with legacy code, where an assumed-length character function is passed as actual argument to a procedure, and when there is no explicit interface. The solution is to do the same as in the case when

Re: [RFC PATCH v2 2/6] aarch64: Enable dumping of AArch64 CPU tuning parameters to JSON

2025-07-22 Thread Andrew Pinski
On Thu, Jul 17, 2025 at 10:35 PM wrote: > > From: Soumya AR > > This patch adds functionality to dump AArch64 CPU tuning parameters to a JSON > file. The new '-fdump-tuning-model=' flag allows users to export the current > tuning model configuration to a JSON file. > > This patch was bootstrapped

[PATCH] c++: name lookup for non-dep rewritten != expr [PR121179]

2025-07-22 Thread Patrick Palka
Bootstrapped and rgetested on x86_64-pc-linux-gnu, does this look OK for trunk? In order to properly handle all rewritten operator expressions, I suppose we could teach build_min_non_dep_op_overload to carefully look through 'non_dep' and note when arguments are reversed etc. But rather than that

[PATCH] c++: fix __is_invocable for std::reference_wrapper [PR121055]

2025-07-22 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Our implementation of the INVOKE spec ([func.require]) was incorrectly treating reference_wrapper::get() as returning T instead of T&, which notably makes a difference when invoking a ref-qualified memfn poin

Re: [PATCH] c++: fix __is_invocable for std::reference_wrapper [PR121055]

2025-07-22 Thread Jason Merrill
On 7/22/25 4:18 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK, and I think go ahead and apply it to the 15 branch as well. -- >8 -- Our implementation of the INVOKE spec ([func.require]) was incorrectly treating reference_wrapper:

[RFC] RISC-V: support vnclip idiom [PR120378]

2025-07-22 Thread Edwin Lu
This patch would add a new middle-end representation for matching the x264 narrowing clip idiom: inline U_NT clip_uint8 (S_WT x) { return x & (~((U_NT)-1)) ? (-x) >> 31 : x; } which would be accessible through the define_expand clip2 optabs. For example, truncating int32_t to uint8_t would pro

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-22 Thread Martin Uecker
IMHO there are enough reasons to reject delayed parsing as bad design for C. We should work towards proper language features that cleanly fit into the language, instead of pushing the boundaries with macros. But this requires true collaboration, which can not exist when one side is not able to

Re: [PATCH v3 4/5] vect: Misalign checks for gather/scatter.

2025-07-22 Thread Richard Biener
On Tue, Jul 22, 2025 at 5:21 PM Robin Dapp wrote: > > > Note if-conversion emits IFN_MASK_LOAD/STORE, only the vectorizer later > > emits the LEN variants. So this is about whether there are (might) be > > uarchs that have vector aligned loads (aka target alignment is > > sizeof(vector)) > > and

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-22 Thread Kees Cook
[Explicitly CCing Joseph since this thread[1] is about the C front-end] On Tue, Jul 22, 2025 at 09:01:35PM +, Qing Zhao wrote: > However, given the current situation, I also think that provide two different > interfaces from CLANG > and GCC might be the practical solution to this endless disc

Re: [PATCH v3] gcc-16/changes.html: Add --enable-x86-64-mfentry

2025-07-22 Thread Gerald Pfeifer
On Tue, 15 Jul 2025, H.J. Lu wrote: >> This feels a bit complex to parse. How about something like >> >> + The new --enable-x86-64-mfentry configure option >> + makes -mfentry use __fentry__ instead >> + of mcount for profiling on x86-64. This option is >> + enabled by default for

[AutoFDO] Propagate single succ/pred block's annotation

2025-07-22 Thread Kugan Vivekanandarajah
Hi, In afdo_propagate_edge, annotate edge from the connected basic_block if they have single predcessor/succcessor. Tested with spec2017 intrate/intspeed and shows slight improvement. gcc/ChangeLog: 2025-07-21 Kugan Vivekanandarajah * auto-profile.cc (afdo_propagate_edge): Propagate

Re: [PATCH v2 2/3] libstdc++: Prepare test code for default_accessor for reuse.

2025-07-22 Thread Tomasz Kaminski
On Mon, Jul 21, 2025 at 10:19 AM Luc Grosheintz wrote: > All test code of default_accessor can be reused. This commit moves > the reuseable code into a file generic.cc and prepares the tests for > reuse with aligned_accessor. > > The AllocatorTrait creates a unified interface for creating both >

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

2025-07-22 Thread Tomasz Kaminski
On Tue, Jul 22, 2025 at 9:22 AM Nathan Myers wrote: > This should be close to ready. However, std::is_invocable > and noexcept still fail oddly applied to the not_fp result. > The remaining failing test cases in */nttp.cc, commented > out, need careful examination to see whether they should > be

  1   2   >