[PATCH v1] rs6000: Restore opaque overload variant for correct diagnostics

2025-06-05 Thread Kishan Parmar
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. After r12-5752-gd08236359eb229, a new bif infrastructure was introduced which stopped using opaque vector types (e.g. opaque_V4SI_type_node) for overloaded built-in functions, which led to incorrect and misleadi

[PATCH] tree-sra: Use MOVE_MAX for sra size limit [PR112824]

2025-06-05 Thread Hongyu Wang
Hi, Current sra use UNITS_PER_WORD to define max scalarization size, but for targets like x86 it allows operations on larger size, so the components like vector variables in an aggregate can be larger than just UNITS_PER_WORD. Use MOVE_MAX instead of UNITS_PER_WORD to allow sra for aggregates with

Re: [AutoFDO] Profile merging for clone test

2025-06-05 Thread Kugan Vivekanandarajah
Hi, > On 4 Jun 2025, at 9:53 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> This patch introduces a new testcase to verify the merging of profiles >> is performed for cloned functions. >> >> Since this is invoked very early, before the pass manager,

Re: Reverted. (was Re: [PATCH v4] libstdc++: stringstream ctors from string_view [PR119741])

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 07:39, Jonathan Wakely wrote: > > There was no need to revert this, it wasn't breaking bootstrap, only causing > a handful of test failures. > > The new wchar_t tests just need the same { dg-do run { target c++26 } } > directives as the char tests. > > Dejagnu only looks fo

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

2025-06-05 Thread Luc Grosheintz
On 6/5/25 10:18, Tomasz Kaminski wrote: On Wed, Jun 4, 2025 at 5:15 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/Chang

Re: [PATCH] More use MEM_EXPR only if MEM_P is true

2025-06-05 Thread Richard Sandiford
"H.J. Lu" writes: > On Wed, Jun 4, 2025 at 4:13 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Wed, Jun 4, 2025 at 7:28 AM H.J. Lu wrote: >> >> >> >> On s390x, for input: >> >> >> >> (call_insn/u 7 6 11 2 (parallel [ >> >> (set (reg:SI 2 %r2) >> >>

Re: [PATCH] More use MEM_EXPR only if MEM_P is true

2025-06-05 Thread H.J. Lu
On Thu, Jun 5, 2025 at 4:12 PM Richard Sandiford wrote: > > "H.J. Lu" writes: > > On Wed, Jun 4, 2025 at 4:13 PM Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Wed, Jun 4, 2025 at 7:28 AM H.J. Lu wrote: > >> >> > >> >> On s390x, for input: > >> >> > >> >> (call_insn/u

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: > Rename __semaphore_base to __semaphore_impl, because it's not used as a > base class. Replace the three identical lambda expressions with a named > class, __semaphore_impl::_Can_acquire, which stores the most recent > value of the counter a

[Patch] builtins.def: Enable OpenMP/OpenACC builtins also with -fno-nonansi-builtins

2025-06-05 Thread Tobias Burnus
Currently, using the ISO version of C and C++ will disable the OpenMP and OpenACC intrinsics, which is rather surprising. The reason is that those imply -fno-nonansi-builtins and the OpenMP/OpenACC are marked as non-ansi builtins. While the latter is true, -fopenmp/-fopenacc seems to be rather or

Re: [PATCH 2/2] libstdc++: Add assertions to atomic waiting functions that need platform wait

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 12:10 AM Jonathan Wakely wrote: > These overloads should never be used for proxy waits, so add assertions > to ensure that they aren't used accidentally. > > The reason they can't be used is that they don't call > __args._M_setup_wait to obtain a __wait_state pointer. Even

Re: RISC-V frm mode switching and late_combine2

2025-06-05 Thread Richard Sandiford
Jeff Law writes: > On 6/3/25 11:11 AM, Richard Sandiford wrote: >> Vineet Gupta writes: >>> On 6/3/25 08:24, Richard Sandiford wrote: I think the issue is that: (insn 9 8 27 2 (parallel [ (asm_operands/v ("fsrm %0") ("") 0 [ (reg:SI 15 a5

[COMMITTED 09/40] ada: Fix adareducer oracle generation

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch adds a missing "-quiet" switch to the compiler invocations performed by generated oracles. Without that switch, log lines could be present before bug boxes for crashes in gigi and that caused the crash detection logic to fail. gcc/ada/ChangeLog: * gene

[COMMITTED 06/40] ada: Mark constants inside a declare expression as referenced

2025-06-05 Thread Marc Poulhiès
From: Viljar Indus Expressions within a declare expression were simply bound to locally defined constants. However they were never marked as referenced. This would trigger an unreferenced constant warning if -gnatwu was used. gcc/ada/ChangeLog: * sem_res.adb (Resolve_Declare_Expression)

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:26 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/ChangeLog: > > * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add > tests fo

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:23 PM Luc Grosheintz wrote: > [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 no

Re: [PATCH v6 0/8] Implement layouts from mdspan.

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:06 PM Luc Grosheintz wrote: > The previous iteration can be found here: > https://gcc.gnu.org/pipermail/libstdc++/2025-May/061781.html > > Changes since v5: > > * Fixed tests on 32-bit systems. > * Expand tests to check absense of UB while multiplying dynamic > ex

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 11:41, Jonathan Wakely wrote: > > On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: > > > > > > > > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: > >> > >> Rename __semaphore_base to __semaphore_impl, because it's not used as a > >> base class. Replace the three

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: > > > > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: >> >> Rename __semaphore_base to __semaphore_impl, because it's not used as a >> base class. Replace the three identical lambda expressions with a named >> class, __semaphore_impl::_

Re: [PATCH 0/7] Support privileged RISC-V extensions

2025-06-05 Thread Jiawei
Thanks, pushed to trunk. Jiawei 在 2025/6/5 14:36, Kito Cheng 写道: LGTM :) On Thu, Jun 5, 2025 at 2:21 PM Jiawei wrote: These patches add support for several privileged RISC-V extensions, including Sm/scsrind, Smrnmi, Ssccptr, Sscounterenw, Sstvala, Sstvecd, and Ssu64xl. The CSRs definition i

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-05 Thread Robin Dapp
But that would not pass the alignment check either, no? In fact, I assume that for strided loads we have a scalar type as component (ptype), so we always get supported unaligned accesses here? I was thinking of the case where we have e.g. a group of 4 int8s and use a strided load with int32 el

Re: [PATCH v5 08/24] Add get_clone_versions and get_target_version functions.

2025-06-05 Thread Alfie Richards
On 04/06/2025 15:57, Jeff Law wrote: On 5/29/25 6:46 AM, Alfie Richards wrote: This is a reimplementation of get_target_clone_attr_len, get_attr_str, and separate_attrs using string_slice and auto_vec to make memory management and use simpler. Adds get_target_version helper function to get th

Re: [PATCH] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 4:46 PM Tomasz Kamiński wrote: > We do not test with wchar_t currently, as operator<< (and format) are > ill-formed in such case, because we do not widen abbrev member of > local_info. > > Adding a tests for behavior of the ostream operator and the formatting > with empty c

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-05 Thread Robin Dapp
But that would not pass the alignment check either, no? In fact, I assume that for strided loads we have a scalar type as component (ptype), so we always get supported unaligned accesses here? Perhaps I'm missing something, though. What I was missing is that we're using the same element size

[PATCH] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kamiński
We do not test with wchar_t currently, as operator<< (and format) are ill-formed in such case, because we do not widen abbrev member of local_info. Adding a tests for behavior of the ostream operator and the formatting with empty chrono-spec for the chrono types. The coverage is now complete: * s

[PATCH] ranger: Add support for float <-> int casts [PR120231]

2025-06-05 Thread Jakub Jelinek
Hi! The following patch adds support for float <-> integer conversions in ranger. The patch reverts part of the r16-571 changes, those changes were right for fold_range, but not for op1_range, where RO_IFI and RO_FIF are actually called rather than RO_IFF and RO_FII that the patch expected. Also,

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski wrote: > > > > On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely wrote: >> >> On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: >> > >> > >> > >> > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: >> >> >> >> Rename __semaphore_base to __semaph

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 6:44 PM Jonathan Wakely wrote: > On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski wrote: > > > > > > > > On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely > wrote: > >> > >> On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski > wrote: > >> > > >> > > >> > > >> > On Thu, Jun 5, 2025 a

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > On Thu, Jun 05, 2025 at 08:46:25PM +, Joseph Myers wrote: > > On Thu, 5 Jun 2025, Marek Polacek wrote: > > > > > Also adjust redirects. > > > > I don't see the .htaccess updates here, the existing redirects should be > > updated and a new one for /

Re: [PING * 3][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-06-05 Thread Peter Frost
Thanks for the review, much appreciated. Agreed on all those points, I'll remove it from -Wextra and just leave it as a standalone warning, and I'll add those tests you suggested. On 02/06/2025 19:08, Joseph Myers wrote: On Sun, 1 Jun 2025, Peter Frost wrote: Ping https://gcc.gnu.org/piperma

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 18:58, Tomasz Kaminski wrote: > > > > On Thu, Jun 5, 2025 at 6:44 PM Jonathan Wakely wrote: >> >> On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski wrote: >> > >> > >> > >> > On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely wrote: >> >> >> >> On Thu, 5 Jun 2025 at 10:00, Tomasz

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > Also adjust redirects. I don't see the .htaccess updates here, the existing redirects should be updated and a new one for /c99status.html added. -- Joseph S. Myers josmy...@redhat.com

[PATCH] i386: Improve "movcc" expander for DImode immediates [PR120553]

2025-06-05 Thread Uros Bizjak
"movcc" expander uses x86_64_general_operand predicate that limits the range of immediate operands to 32-bit size. The usage of this predicate causes ifcvt to force out-of-range immediates to registers when converting through noce_try_cmove. The testcase: long long foo (long long c) { return c >

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Marek Polacek
On Thu, Jun 05, 2025 at 08:46:25PM +, Joseph Myers wrote: > On Thu, 5 Jun 2025, Marek Polacek wrote: > > > Also adjust redirects. > > I don't see the .htaccess updates here, the existing redirects should be > updated and a new one for /c99status.html added. Like so? -- >8 -- --- htdocs/.h

Re: [PATCH] libstdc++: do not use an unreserved name in _Temporary_buffer [PR119496]

2025-06-05 Thread Giuseppe D'Angelo
On 05/06/2025 21:46, Jonathan Wakely wrote: On Thu, 5 Jun 2025 at 20:19, Giuseppe D'Angelo wrote: Hi, This is a super-minor fix regarding the usage of an unreserved identifier in some private API. The patch is also available on forge here: https://forge.sourceware.org/gcc/gcc-TEST/pulls/53 I'

[Patch] gcn: Update --with-arch= for newer archs

2025-06-05 Thread Tobias Burnus
As a user reported, --with=arch= did not support the newer devices, as we forgot to update the list. While we still have lists to update, this one can be replaced by checking directly against the .def file. There was another list that we didn't update - in install.texi: https://gcc.gnu.org/insta

Re: [PATCH] libstdc++: Fix std::format thousands separators when sign present [PR120548]

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 8:47 PM Jonathan Wakely wrote: > The leading sign character should be skipped when deciding whether to > insert thousands separators into a floating-point format. > > libstdc++-v3/ChangeLog: > > PR libstdc++/120548 > * include/std/format (__formatter_fp::_M_

Re: [PATCH] RISC-V: Support CPUs in -march.

2025-06-05 Thread Kito Cheng
Hi MaskRay, I was thinking that since GCC is still in the development stage, it would be fine to accept the change now and adjust it later, because the release processes for GCC and LLVM are quite different. I've always preferred having a consistent user interface between the GNU toolchain and LL

[to-be-committed] RISC-V: Don't use structured binding in riscv-common.cc

2025-06-05 Thread Kito Cheng
It's new C++ language feature introduced in C++17, which is higher than the build environment required by the GCC (C++14). gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Remove structured binding from the code. --- gcc/common/config/riscv/riscv-common.cc | 27 +

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:02 PM Luc Grosheintz wrote: > 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: L

[COMMITTED 20/40] ada: Error about assignment to limited target on aggregate with "for of" iterator

2025-06-05 Thread Marc Poulhiès
From: Gary Dismukes The compiler reports a spurious error about an assignment to a limited object on an aggregate of a array type with limited components that has an association with a "for of" iterator. This is fixed by arranging to have the Assignment_OK flag set on the indexed_names generated

[COMMITTED 32/40] ada: Exception-raising loop incorrectly eliminated

2025-06-05 Thread Marc Poulhiès
From: Steve Baird If the body of a loop includes a raise statement then the loop should not be considered to be free of side-effects and therefore eligible for elimination by the compiler. gcc/ada/ChangeLog: * sem_util.adb (Side_Effect_Free_Statements): Return False if the state

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:09 PM Luc Grosheintz wrote: > 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/

[COMMITTED 36/40] ada: Tweak wording of documentation comments in Atree

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch removes an outdated reference to the concept of node extensions in comments. It also slightly clarifies the documentation of Atree.Relocate_Node. gcc/ada/ChangeLog: * atree.ads (New_Copy, Relocate_Node): Tweak documentation comments. Tested on x86_64-

[COMMITTED 16/40] ada: Implement use implies with experimental extension

2025-06-05 Thread Marc Poulhiès
From: squirek The patch implements the experimental feature to allow use package clauses within the context area to imply with. gcc/ada/ChangeLog: * sem_ch8.adb (Analyze_Package_Name): Add code to expand use clauses such that they have an implicit with associated with them

[COMMITTED 12/40] ada: Fix couple of remaining incompatibilities with CHERI architecture

2025-06-05 Thread Marc Poulhiès
From: Eric Botcazou These are the usual problematic patterns in the expanded code. gcc/ada/ChangeLog: * exp_ch9.adb (Build_Dispatching_Requeue): Take 'Tag of the concurrent object instead of doing an unchecked conversion. * exp_pakd.adb (Expand_Packed_Address_Reference):

Re: [Patch] gcn: Update --with-arch= for newer archs

2025-06-05 Thread Andrew Stubbs
On 05/06/2025 08:48, Tobias Burnus wrote: As a user reported, --with=arch= did not support the newer devices, as we forgot to update the list. While we still have lists to update, this one can be replaced by checking directly against the .def file. There was another list that we didn't update -

[COMMITTED 13/40] ada: Mark the types of operator arguments as used

2025-06-05 Thread Marc Poulhiès
From: Viljar Indus When a use type clause is used then it makes the type and all of its operators use visible in the context. When analyzing whether a use type clause is effective we should additionally mark the types of an overloaded operator as cases where the use type clause is effective. gcc

[COMMITTED 18/40] ada: Fix various issues in the SARIF report

2025-06-05 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * diagnostics-sarif_emitter.adb (Print_Invocations): fix commandLine and executionSuccessful nodes. Fix typo in the name for startLine. * osint.adb (Modified Get_Current_Dir) Fix generation of the current directory.

[COMMITTED 25/40] ada: Mitigate issue with tracebacks

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques The way we fetch the path to shared objects for traceback generation is not perfectly precise. This patch adds a sanity check to mitigate the consequences of incorrect shared object paths. It's motivated by a real world failure in a GNATSAS test. gcc/ada/ChangeLog:

[COMMITTED 26/40] ada: Add missing Ghost aspect to Lemma_Not_In_Range_Big2xx64 in s-aridou.adb

2025-06-05 Thread Marc Poulhiès
From: Aleksandra Pasek gcc/ada/ChangeLog: * libgnat/s-aridou.adb: Add missing Ghost aspect to Lemma_Not_In_Range_Big2xx64. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-aridou.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/libgnat/s

[COMMITTED 29/40] ada: Fix crash on access to protected return

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques The generation of the check mandated by Ada issue AI05-0073 was not done handled properly for protected types when used through subtypes. This patch fixes the issue. gcc/ada/ChangeLog: * exp_ch4.adb (Tagged_Membership): Fix for protected types. Tested on x86_64-

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:15 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/ChangeLog: > > * testsuite/23_cont

[COMMITTED 27/40] ada: Tweak caching of streaming subprograms

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * exp_attr.adb (Interunit_Ref_OK): Tweak categorization of compilation units. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_attr.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada

[COMMITTED 34/40] ada: Spurious compilation error with repeated loop index

2025-06-05 Thread Marc Poulhiès
From: Javier Miranda When multiple for-loop statements in the same scope use the same index name to iterate through container elements, the compiler reports a spurious error indicating a conflict between index names. gcc/ada/ChangeLog: * exp_ch7.adb (Process_Object_Declaration): Avoid g

[COMMITTED 35/40] ada: Activate SPARK_Mode in Ada.Numerics.*_Random specs

2025-06-05 Thread Marc Poulhiès
From: Andres Toom gcc/ada/ChangeLog: * libgnat/a-nudira.ads: Activate SPARK mode and add missing basic contracts. Mark the unit as always terminating. * libgnat/a-nuflra.ads: Idem. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-nudira.ads | 4

[COMMITTED 39/40] ada: Add explicit null pointer check in C.Strings.Update

2025-06-05 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * libgnat/i-cstrin.adb: null pointer check in Update Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/i-cstrin.adb | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ada/libgnat/i-cstrin.adb b/gcc/ada/libgnat/i-cstrin

[COMMITTED 11/40] ada: Fix buffer overflow for function call returning discriminated limited record

2025-06-05 Thread Marc Poulhiès
From: Eric Botcazou This occurs when the discriminated limited record type is declared with default values for its discriminants, is not controlled, and the context of the call is anonymous, i.e. the result of the call is not assigned to an object. In this case, a temporary is created to hold th

[COMMITTED 30/40] ada: Add Ghost aspect to Lo in s-arit32.adb

2025-06-05 Thread Marc Poulhiès
From: Aleksandra Pasek gcc/ada/ChangeLog: * libgnat/s-arit32.adb: Add Ghost aspect to Lo. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-arit32.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/libgnat/s-arit32.adb b/gcc/ada/l

[COMMITTED 33/40] ada: Remove useless global variable

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch removes a global variable that was made useless by a previous change and mistakenly hadn't been removed then. gcc/ada/ChangeLog: * opt.ads: Remove useless variable. * sem_ch9.adb (Analyze_Abort_Statement, Analyze_Accept_Alternative, Ana

Re: [PUSHED] GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794]

2025-06-05 Thread Jan-Benedict Glaw
Hi Thomas, On Tue, 2025-04-15 00:22:26 +0200, Thomas Schwinge wrote: > diff --git a/gcc/except.cc b/gcc/except.cc > index d5eb9274a62..205811c6567 100644 > --- a/gcc/except.cc > +++ b/gcc/except.cc > @@ -970,12 +970,26 @@ expand_dw2_landing_pad_for_region (eh_region region) > { /* Nothing *

[COMMITTED 01/40] ada: Compiler crash on array aggregate association iterating over function result

2025-06-05 Thread Marc Poulhiès
From: Gary Dismukes The compiler triggers a bug box when compiling an array aggregate with an iterated_component_association that iterates over another array object, failing when trying to retrieve a Choices field, which isn't an allowed field for N_Iterated_Component_Association nodes. This occu

[COMMITTED 04/40] ada: Spurious accessibility error with -gnatc

2025-06-05 Thread Marc Poulhiès
From: squirek The patch fixes an issue in the compiler whereby a spurious accessibility error gets generated in semantic checking mode (-gnatc) when an explicitly aliased formal gets used as an actual for an access disriminant in a return object. gcc/ada/ChangeLog: * accessibility.adb

[COMMITTED 08/40] ada: Fix Generate_Minimal_Reproducer on instantiations

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the code that creates a copy of the semantic closure with the default naming convention was incorrect when the compiler was processing a library unit that was an instantiation of a generic with a body. This patch adds code to detect that situation and ad

[COMMITTED 24/40] ada: Implement built-in-place expansion of two-pass array aggregates

2025-06-05 Thread Marc Poulhiès
From: Eric Botcazou These are array aggregates containing only component associations that are iterated with iterator specifications, as per RM 4.3.3(20.2/5-20.4/5). It is implemented for the array aggregates that are used to initialize an object, as specified by RM 7.6(17.2/3-17.3/3) for immuta

[COMMITTED 02/40] ada: Avoid calling Resolve with Stand.Any_Fixed as the expected type

2025-06-05 Thread Marc Poulhiès
From: Steve Baird When we call Resolve for an expression, we pass in the expected type for that expression. In the absence of semantic errors, that expected type should never be any of the "Any_xxx" types declared in stand.ads (e.g., Any_Array, Any_Numeric, Any_Real). In particular, it should nev

[COMMITTED 10/40] ada: Fix New_Char_Array with empty arrays

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes an integer underflow issue on calls of the form New_Char_Array (X) with X'Last < X'First - 2. That integer underflow caused attempts at allocating impossibly large amount of memory in some cases. gcc/ada/ChangeLog: * libgnat/i-cstrin.adb (Positio

[COMMITTED 07/40] ada: Fix compile-time failure due to duplicated attribute subprograms.

2025-06-05 Thread Marc Poulhiès
From: Steve Baird For a given type, and for certain attributes (the 4 streaming attributes and, for Ada2022, the Put_Image attribute), the compiler needs to keep track of whether a subprogram has already been generated for the given type/attribute pair. In some cases this was being done incorrect

[COMMITTED 21/40] ada: Reject Valid_Value arguments originating from Standard

2025-06-05 Thread Marc Poulhiès
From: Viljar Indus The constraint for Valid_Value not applying to types from Standard should also apply to all types derived from those types. gcc/ada/ChangeLog: * doc/gnat_rm/implementation_defined_attributes.rst: Update the documentation for Valid_Value. * sem_attr.adb

[COMMITTED 05/40] ada: Cleanup preanalysis of static expressions (part 6)

2025-06-05 Thread Marc Poulhiès
From: Javier Miranda Rename Preanalyze_Spec_Expression as Preanalyze_And_Resolve_Spec_Expression, Preanalyze_Assert_Expression as Preanalyze_And_Resolve_Assert_Expression, and Preanalyze_Default_Expression as Preanalyze_And_Resolve_Default_Expression; cleanup the version of Preanalyze_Assert_Expr

[COMMITTED 03/40] ada: Use absolute paths in SARIF reports

2025-06-05 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * diagnostics-json_utils.adb: Add new method To_File_Uri to convert any path to the URI standard. * diagnostics-json_utils.ads: Likewise. * diagnostics-sarif_emitter.adb: Converted Artifact_Change types to use the Sour

[COMMITTED 14/40] ada: Spurious accessibility error with -gnatc

2025-06-05 Thread Marc Poulhiès
From: squirek The patch fixes an issue in the compiler whereby a spurious accessibility error gets generated in semantic checking mode (-gnatc) when an explicitly aliased formal gets used as an actual for an access disriminant in a return object. gcc/ada/ChangeLog: * accessibility.adb (

[COMMITTED 17/40] ada: Fix unnecessarily large allocation in New_String

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patches fixes an issue where Interfaces.C.Strings.New_String allocates more memory than necessary when passed a string that contains a NUL character. gcc/ada/ChangeLog: * libgnat/i-cstrin.adb (New_String): Fix size of allocation. Tested on x86_64-pc-linux-g

Re: [PATCH] tree-sra: Use MOVE_MAX for sra size limit [PR112824]

2025-06-05 Thread Richard Biener
On Thu, 5 Jun 2025, Hongyu Wang wrote: > Hi, > > Current sra use UNITS_PER_WORD to define max scalarization size, but > for targets like x86 it allows operations on larger size, so the > components like vector variables in an aggregate can be larger than > just UNITS_PER_WORD. Use MOVE_MAX instea

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:01 PM Luc Grosheintz wrote: > 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 > fr

Re: [committed] libstdc++: Skip time zone format testing for COW std::string

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 11:04 PM Jonathan Wakely wrote: > This is needed when testing with -D_GLIBCXX_USE_CXX11_ABI=0 to fix: > FAIL: std/time/format/empty_spec.cc -std=gnu++20 (test for excess errors) > > libstdc++-v3/ChangeLog: > > * testsuite/std/time/format/empty_spec.cc: Only test ti

[COMMITTED 23/40] ada: Add missing Ghost aspect to Lemma_Not_In_Range_Big2xx32 in s-arit32.adb

2025-06-05 Thread Marc Poulhiès
From: Johannes Kliemann gcc/ada/ChangeLog: * libgnat/s-arit32.adb (Lemma_Not_In_Range_Big2xx32): Add missing Ghost aspect. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-arit32.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/libgnat/s

[COMMITTED 28/40] ada: Improve efficiency of very large shift counts

2025-06-05 Thread Marc Poulhiès
From: Bob Duff For a call to an intrinsic shift function with a large Amount, for example Shift_Right(..., Amount => Natural'Last), and a compile-time-known value, the compiler would take an absurdly long time to compute the value. This patch fixes that by special-casing shift counts that are lar

[COMMITTED 40/40] ada: Confusing "modified by call, but value overwritten" warning

2025-06-05 Thread Marc Poulhiès
From: squirek The patch fixes an issue in the compiler whereby not referencing a local variable used in multiple procedure calls as an "out" actual in between calls would lead to a warning despite "-gnatw.o" not being present. Additionally, this meant that using pragma Unreferenced on such variab

[COMMITTED 19/40] ada: Add error message for a declared-too-late abstract state constituent

2025-06-05 Thread Marc Poulhiès
From: Steve Baird In the error case of an undefined abstract state constituent, we want to help users distinguish between the case where the constituent is "really" undefined versus being defined "too late" (i.e., after a body). So in the latter case we generate an additional message. gcc/ada/Ch

[COMMITTED 15/40] ada: Extend and clarify documentation of stack size settings for Windows

2025-06-05 Thread Marc Poulhiès
From: Piotr Trojanek The original documentation for more recent versions of Windows didn't specify whether the specified stack size acts as a "reserved" or "committed" stack size. Also, clarify the wording for older versions of Windows. gcc/ada/ChangeLog: * doc/gnat_ugn/platform_specif

[COMMITTED 22/40] ada: Fix reproducer generation

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes reproducer generation in the case of crashes in the back end in the presence of preprocessing dependencies. gcc/ada/ChangeLog: * generate_minimal_reproducer.adb (Generate_Minimal_Reproducer): Fix handling of preprocessing dependencies. T

[COMMITTED 31/40] ada: Missing error on expression function returning incomplete type

2025-06-05 Thread Marc Poulhiès
From: Javier Miranda When the type of the expression of an expression function is an incomplete type, the frontend does not report the expected error. gcc/ada/ChangeLog: * sem_ch6.adb (Analyze_Expression_Function): Add missing check on premature use of incomplete type. Tested o

[COMMITTED 37/40] ada: Fix SFN_Patterns documentation comment

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques The documentation comment under SFN_Patterns was misleading. This patch fixes it and also fixes Get_Default_File_Name which assumed the comment was correct. gcc/ada/ChangeLog: * fname-uf.adb: Fix documentation comment. (Get_Default_File_Name): Fix indices

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

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 8:15 AM Daniel Krügler wrote: > Am Mi., 4. Juni 2025 um 17:18 Uhr schrieb Luc Grosheintz < > luc.groshei...@gmail.com>: > >> Implements the remaining parts of layout_left and layout_right; and all >> of layout_stride. >> >> The implementation of layout_stride::mapping::is_e

Re: [PATCH] RISC-V:Add the MIPS P8700 conditional move extension instruction support.

2025-06-05 Thread Umesh Kalappa
Thank you @Jeff Law for the initial comments ,yes will update the ChangeLog accordingly and typo fix and >>My biggest concern is overall structure of riscv_expand_conditional_move. I kind of get the sense >>that we need to refactor operand canonicalization into its own routine, >>then have two

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

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:16 PM Luc Grosheintz wrote: > 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. >

Re: [PATCH 02/14] aarch64: Add support for unpacked SVE FP conversions

2025-06-05 Thread Richard Sandiford
Spencer Abson writes: > @@ -9487,21 +9489,39 @@ > ;; - FCVTZU > ;; - > > -;; Unpredicated conversion of floats to integers of the same size (HF to HI, > -;; SF to SI or DF to DI). > -(define_expand "2" > - [(set (match_op

[PATCH 3/4] tree-optimization/120032 - matching of table based CLZ

2025-06-05 Thread Richard Biener
The following adds the ability to match a table based CLZ implementation similar as to how we can do for CTZ. I'm re-using the workers for matching up array and string tables by using a lambda and templates and kept the transform step for CLZ/CTZ inter-mangled. Bootstrapped and tested on x86_64-u

[PATCH v1] libstdc++: Implement default_accessor from mdspan.

2025-06-05 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * include/std/mdspan (default_accessor): New class. * src/c++23/std.cc.in: Register default_accessor. * testsuite/23_containers/mdspan/default_accessor.cc: New test. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan |

[PATCH v2] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kamiński
We do not test with wchar_t currently, as operator<< (and format) are ill-formed in such case, because we do not widen abbrev member of local_info. Adding a tests for behavior of the ostream operator and the formatting with empty chrono-spec for the chrono types. The coverage is now complete: * s

[PATCH v6 9/8] libstdc++: Uglify __mapping_alike template parameter and fix test and typo in comment.

2025-06-05 Thread Tomasz Kamiński
When the static assert was generated from instantiations of default member initializer of class B, the error was not generated for B<1, std::layout_left, std::layout_left> case, only when -D_GLIBCXX_DEBUG was set. Changing B calls to functions fixes that. libstdc++-v3/ChangeLog: * include

Re: [PATCH] aarch64: Add testcase for vld2 which was fixed by r16-1113 [PR89606]

2025-06-05 Thread Richard Sandiford
Andrew Pinski writes: > This aarch64 specific vld2 intrinsics testcase was fixed by > r16-1113-g069caa5cea91f > (simple copy propagation for aggregates). I didn't include it in the original > patch as I was testing on x86_64 but I got around to testing this > and now we don't have any more extra

Re: c++: Fix greater-than operator in braced-init-lists [PR123456]

2025-06-05 Thread Eczbek
typo in subject - should be [PR116928] On June 5, 2025 2:34:23 PM EDT, Eczbek wrote: >From 0210a1a410cfafd79521e15cd96682ed3d5b4943 Mon Sep 17 00:00:00 2001 >From: Eczbek >Date: Thu, 5 Jun 2025 14:27:48 -0400 >Subject: [PATCH] c++: [PR116928] > > PR c++/116928 > >gcc/cp/ChangeLog: > >

Re: [PATCH 03/14] aarch64: Relaxed SEL combiner patterns for unpacked SVE FP conversions

2025-06-05 Thread Richard Sandiford
Spencer Abson writes: > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_cvtf_1.c > b/gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_cvtf_1.c > new file mode 100644 > index 000..8f69232f2cf > --- /dev/null > +++ b/gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_cvtf_

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > Coming back to a project I first attempted here: > > but this time following steps as outlined by Joseph here: > . > > This patch

Re: [PATCH] doc: update links to c99status.html

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > Once we rename and move c99status.html, we also have to > update the links in the manual. > > -- >8 -- > gcc/ChangeLog: > > * doc/invoke.texi: Update a link to c99status.html. > * doc/standards.texi: Likewise. OK. -- Joseph S. Myers josmy

Re: [PATCH] RISC-V: Add 'bclr+binv' peephole2 optimization.

2025-06-05 Thread Jiawei
在 2025/5/30 1:46, Jeff Law 写道: On 5/28/25 9:05 PM, Jiawei wrote: This seems like it would be much better as a combine pattern.   In fact, I'm a bit surprised that combine didn't simplify this series of operations into a IOR. So I'd really like to see the .combine dump with and without thi

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Takayuki 'January June' Suwa
On 2025/06/05 5:09, Max Filippov wrote: Hi Suwa-san, Hi Max, (thanks for every regtesting) On Tue, Jun 3, 2025 at 7:44 AM Takayuki 'January June' Suwa wrote: By using the previously unused CEIL|FLOOR|ROUND.S floating-point coprocessor instructions. In addition, two instruction operand fo

Re: [to-be-committed][RISC-V] Improve sequences to generate -1, 1 in some cases.

2025-06-05 Thread Jeff Law
On 6/4/25 7:11 PM, Jeff Law wrote: On 6/4/25 6:37 PM, Palmer Dabbelt wrote: On Wed, 04 Jun 2025 17:25:20 PDT (-0700), Jeff Law wrote: This patch has a minor improvement to if-converted sequences based on observations I found while evaluating another patch from Shreya to handle more cases with z

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-05 Thread Richard Biener
On Thu, Jun 5, 2025 at 2:34 PM Robin Dapp wrote: > > > So I do wonder how this interacts with vector_vector_composition_type, > > in fact the difference is that for strided_load we know the composition > > happens as part of a load, so how about instead extending > > this function, pass it VLS_LOA

  1   2   >