RE: [PATCH] i386: Add attr_isa for vaes patterns to sync with attr gpr16. [pr119473]

2025-03-27 Thread Hu, Lin1
Bootstrapped and Regtested on x86_64-linux-gnu{-m32,-m64}, OK for trunk? BRs, Lin > -Original Message- > From: Hu, Lin1 > Sent: Friday, March 28, 2025 1:55 PM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com; Wang, Hongyu > > Subject: [PATCH] i386: Add attr_isa for v

[PATCH] i386: Add attr_isa for vaes patterns to sync with attr gpr16. [pr119473]

2025-03-27 Thread Hu, Lin1
For vaes patterns with jm constraint and gpr16 attr, it requires "isa" attr to distinct avx/avx512 alternatives in ix86_memory_address_reg_class. Also adds missing type and mode attributes for those vaes patterns. gcc/ChangeLog: PR target/119473 * config/i386/sse.md (vaesd

Re: [PATCH] testsuite: Fix up strub-internal-pr112938.C test for C++2{0,3,6}

2025-03-27 Thread Alexandre Oliva
On Mar 27, 2025, Jakub Jelinek wrote: > Here is a fix, tested on x86_64-linux, ok for trunk? > 2025-03-27 Jakub Jelinek > * g++.dg/strub-internal-pr112938.C: Add dg-warning for c++20. LGTM, thanks -- Alexandre Oliva, happy hackerhttps://blog.lx.oliva.nom.br/ Free Softwar

[COMMITTED 082/146] gccrs: parser: Add testcases for multiline strings

2025-03-27 Thread arthur . cohen
From: Arthur Cohen Regression checks for Rust-GCC#1399 gcc/testsuite/ChangeLog: * rust/compile/multiline-string.rs: New test. * rust/execute/torture/multiline-string.rs: New test. --- gcc/testsuite/rust/compile/multiline-string.rs| 14 ++ .../rust/execute/tortur

[COMMITTED 135/146] gccrs: derive(Clone): Mark PhantomData as a lang item

2025-03-27 Thread arthur . cohen
From: Arthur Cohen gcc/testsuite/ChangeLog: * rust/compile/derive_macro4.rs: Make PhantomData a lang item. --- gcc/testsuite/rust/compile/derive_macro4.rs | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/testsuite/rust/compile/derive_macro4.rs b/gcc/testsuite

Re: [PATCH] change cbl_field_data_t::etc_t::value from _Float128 to tree

2025-03-27 Thread Jakub Jelinek
On Fri, Mar 21, 2025 at 08:25:10PM +0100, Richard Biener wrote: > > --- gcc/cobol/parse.y.jj2025-03-21 17:49:43.571440176 +0100 > > +++ gcc/cobol/parse.y 2025-03-21 20:15:24.852414777 +0100 > > @@ -4331,7 +4331,8 @@ value_clause: VALUE all LITERAL[lit] { > >cbl_field

Re: [libstdc++] Optimize string constructors

2025-03-27 Thread Bernhard Reutner-Fischer
>> > diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr80331.C >> > b/gcc/testsuite/g++.dg/tree-ssa/pr80331.C >> > new file mode 100644 >> > index 000..85034504f2f >> > --- /dev/null >> > +++ b/gcc/testsuite/g++.dg/tree-ssa/pr80331.C >> > @@ -0,0 +1,8 @@ >> > +// { dg-do compile } >> > +// {

[pushed: r15-8994-g1ee9caf2f84832] libstdc++-v3 testsuite: fix malformed dg-require-static-libstdcxx directives

2025-03-27 Thread David Malcolm
I believe these don't get detected by DejaGnu's regexp. Found by dg-lint. Pushed to trunk as r15-8994-g1ee9caf2f84832. libstdc++-v3/ChangeLog: * testsuite/17_intro/shared_with_static_deps.cc: Fix malformed dg-require-static-libstdcxx directive. * testsuite/17_intro/static

[pushed: r15-8993] testsuite: fix some malformed dg-require-* directives

2025-03-27 Thread David Malcolm
Pushed to trunk as r15-8993-gc88abca94a6abb. gcc/testsuite/ChangeLog: * g++.dg/abi/pure-virtual1.C: Fix dg-require-weak directive. * g++.target/i386/mangling-alias1.C: Fix dg-require-ifunc directive. --- gcc/testsuite/g++.dg/abi/pure-virtual1.C| 2 +- gcc/testsuite

Re: [Fortran, Patch, PR119349, v1] Fix regression of polymorphic dummy sourced from array constructors.

2025-03-27 Thread Jerry D
On 3/20/25 9:20 AM, Andre Vehreschild wrote: Hi all, attached patch fixes a 15-regression where an element of an actual temporary array, i.e., elemental([ e1, e2...]) passed to the formal polymorphic dummy leads to a double free of the derived types components. This patch prevents this by preven

[COMMITTED 071/146] gccrs: derive(Copy): Use new LangItemPath

2025-03-27 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-copy.cc: Use new LangItemPath for derive(Copy). --- gcc/rust/expand/rust-derive-copy.cc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/rust/expand/rust-derive-copy.cc b/gcc/rust/expand/rust-deriv

[COMMITTED 077/146] gccrs: fix bad not expression in rust

2025-03-27 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3229 gcc/rust/ChangeLog: * rust-gcc.cc (operator_to_tree_code): ! expressions are BIT_NOT_EXPR Signed-off-by: Philip Herron --- gcc/rust/rust-gcc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/

[COMMITTED 131/144] gccrs: Improve handling of InlineAsm in DefaultASTVisitor

2025-03-27 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit fields of InlineAsm. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove inline_asm_parse_output_operand.rs. Signed-off-by: Owen Avery --- gcc/rust/ast/ru

[pushed: r15-8992] v2: contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-27 Thread David Malcolm
Given that this is all below "contrib", I've taken the liberty of pushing this updated version to trunk, as r15-8992-g8d6de758cca6d1. Changed in v2: - eliminated COMMON_MISSPELLINGS in favor of retesting with a regexp that adds underscores - add a list of KNOWN_DIRECTIVES, and complain if we see

[PATCH] PR tree-optimization/119471 - If the LHS does not contain zero, neither do multiply operands.

2025-03-27 Thread Andrew MacLeod
This patch fixes both 119471 and the remainder of 110992. At issue is we do not recognize that if   "a * b != 0" , then neither "a" nor "b" can be zero. This is fairly trivial with range-ops.   op1_range and op2_range for operator_mult are taught that if the LHS does not contain zero, than ne

[wwwdocs] cxx-dr-status: Update from C++ Core Language Issue TOC, Revision 116

2025-03-27 Thread Marek Polacek
~90 new DRs. More updates tomorrow. Pushed. -- >8 -- commit eabbf82b95871f4cc1561b9d5bd9ba88a849a61f Author: Marek Polacek Date: Thu Mar 27 19:08:35 2025 -0400 cxx-dr-status: Update from C++ Core Language Issue TOC, Revision 116 diff --git a/htdocs/projects/cxx-dr-status.html b/htdocs/

Re: [PATCH] libcpp: Add missing configure check for setlocale.

2025-03-27 Thread Roland McGrath
I've spent more than my fair share of my life fiddling with autoconf installations, so I just hand-editted the patches to elide the unwanted changes. Now committed on both trunk and releases/14. Thanks, Roland

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

2025-03-27 Thread Robin Dapp
Hi Paul-Antoine, This pattern enables the combine pass to merge a vec_duplicate into a plus-mult or minus-mult RTL instruction. Before this patch, we have two instructions, e.g.: vfmv.v.fv6,fa0 vfmadd.vv v9,v6,v7 After, we get only one: vfmadd.vf v9,fa0,v7 On SPEC201

[committed] cobol: Incorporate new testcases from the cobolworx UAT tests.

2025-03-27 Thread Robert Dubner
This is the initial group of testcases programmatically converted from the autom4te UAT tests in the cobolworx repository. These tests behave as intended on an x86_64-linux platform. >From c8d32f79a27e034979f838e7f611cb4ea049639f Mon Sep 17 00:00:00 2001 From: Bob Dubner Date: Thu, 27 Mar 2025 1

Re: [committed] i386: Fix offset calculation in ix86_redzone_clobber

2025-03-27 Thread Jakub Jelinek
On Thu, Mar 27, 2025 at 09:28:31PM +0100, Uros Bizjak wrote: > plus_constant expects integer as its third argument, not rtx. > > gcc/ChangeLog: > > * config/i386/i386.cc (ix86_redzone_clobber): Use integer, not rtx > as the third argument of plus_constant. Oops, thanks for catching this.

Re: [PATCH] testsuite: Replace the cray_pointers_2.f90 no cycling hack with dg-skip-if

2025-03-27 Thread Harald Anlauf
Hi Jakub, all, Am 27.03.25 um 20:04 schrieb Jakub Jelinek: On Thu, Mar 27, 2025 at 07:34:14PM +0100, Jakub Jelinek wrote: The following patch runs the test only in the -O3 -g case (just using -O3 there would run it twice, once with -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -

Re: [PATCH] cobol: Do not include (no longer needed).

2025-03-27 Thread James K. Lowden
On Thu, 27 Mar 2025 09:33:40 + Iain Sandoe wrote: > As noted in the commit log, the macOS version of cmath (at least) has > conflicts with parse.y. Tested on x86_64,aarch64 linux, > x86_64-darwin. OK for trunk? > thanks, > Iain LGTM, Iain. Any header file that isn't needed, isn't needed.

[PATCH v2] c++: fix reporting routines re-entered [PR119303]

2025-03-27 Thread Marek Polacek
On Wed, Mar 19, 2025 at 12:00:00PM -0400, Jason Merrill wrote: > On 3/17/25 6:55 PM, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > We crash while we call warning_at ("inline function used but never defined") > > since it invokes dump_tem

[committed] i386: Fix offset calculation in ix86_redzone_clobber

2025-03-27 Thread Uros Bizjak
plus_constant expects integer as its third argument, not rtx. gcc/ChangeLog: * config/i386/i386.cc (ix86_redzone_clobber): Use integer, not rtx as the third argument of plus_constant. Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}. Uros. diff --git a/gcc/config/i386/i

Re: [PATCH] testsuite: Fix up strub-internal-pr112938.C test for C++2{0,3,6}

2025-03-27 Thread Mike Stump
On Mar 27, 2025, at 12:29 PM, Jakub Jelinek wrote: > > On Thu, Mar 27, 2025 at 12:05:21AM +, Sam James wrote: >> The test was being ignored because dg.exp looks for .C in g++.dg/. >> >> gcc/testsuite/ChangeLog: >> PR middle-end/112938 >> >> * g++.dg/strub-internal-pr112938.cc: Mov

[PATCH] testsuite: Fix up strub-internal-pr112938.C test for C++2{0,3,6}

2025-03-27 Thread Jakub Jelinek
On Thu, Mar 27, 2025 at 12:05:21AM +, Sam James wrote: > The test was being ignored because dg.exp looks for .C in g++.dg/. > > gcc/testsuite/ChangeLog: > PR middle-end/112938 > > * g++.dg/strub-internal-pr112938.cc: Move to... > * g++.dg/strub-internal-pr112938.C: ...here.

Fix too late initialization of tasking runtime with standalone library

2025-03-27 Thread Eric Botcazou
The Tasking_Runtime_Initialize routine installs the tasking version of the RTS_Lock manipulation routines and thus needs to be called very early before the elaboration of all the Ada units of the program, including those of the runtime itself. This is guaranteed by the binder when the tasking r

Re: [PATCH 00/12] Implement a new dg-lint tool and use on our testsuite

2025-03-27 Thread Mike Stump
On Mar 26, 2025, at 11:34 AM, David Malcolm wrote: > > This patch kit: > * adds minimal Python bindings for libgdiagnostics.so (below contrib) > * implements a new dg-lint tool (below contrib) to detect for >common mistakes in our testsuite, using Python 3 (and the above >bindings) > *

[PATCH] tailc: Handle musttail noreturn calls [PR119483]

2025-03-27 Thread Jakub Jelinek
Hi! The following (first) testcase is accepted by clang (if clang::musttail) and rejected by gcc, because we discover the call is noreturn and then bail out because we don't want noreturn tailcalls. The general reason not to support noreturn tail calls is for cases like abort where we want nicer b

Re: [PATCH][PUSHED] hwasan: support new dg-output format.

2025-03-27 Thread Mike Stump
On Mar 20, 2025, at 8:11 AM, Alex Coplan wrote: > On 09/02/2024 15:32, Alex Coplan wrote: >> On 04/05/2022 09:59, Martin Liška wrote: >>> Supports change in libsanitizer where it newly reports: >>> READ of size 4 at 0xc3d4 tags: 02/01(00) (ptr/mem) in thread T0 >>> >>> So the 'tags' conta

[PATCH] ipa-sra: Don't change return type to void if there are musttail calls [PR119484]

2025-03-27 Thread Jakub Jelinek
Hi! The following testcase is rejected, because IPA-SRA decides to turn bar.constprop call into bar.constprop.isra which returns void. While there is no explicit lhs on the call, as it is a musttail call the tailc pass checks if IPA-VRP returns singleton from that function and the function returns

[PATCH][gcc13] PR tree-optimization/117287 - Backport new assume implementation

2025-03-27 Thread Andrew MacLeod
This patch backports the ASSUME support that was rewritten in GCC 15. Its slightly more complicated than the port to GCC 14 was in that a few classes have been rewritten. I've isolated them all to tree-assume.cc which contains the pass. It has to also bring in the ssa_cache and lazy_ssa_cache

Re: [PATCH] testsuite: Replace the cray_pointers_2.f90 no cycling hack with dg-skip-if

2025-03-27 Thread Jakub Jelinek
On Thu, Mar 27, 2025 at 07:34:14PM +0100, Jakub Jelinek wrote: > The following patch runs the test only in the -O3 -g case (just using -O3 > there would run it twice, once with > -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer > -finline-functions > and once with > -O3 -g > > The -O

[pushed] testsuite: fix g++.dg/template/explicit-args6.C

2025-03-27 Thread Marek Polacek
Tested x86_64-pc-linux-gnu, applying to trunk. -- >8 -- gcc/testsuite/ChangeLog: * g++.dg/template/explicit-args6.C: Remove an extra set of {} in a dg-message. --- gcc/testsuite/g++.dg/template/explicit-args6.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g

[PATCH] testsuite: Replace the cray_pointers_2.f90 no cycling hack with dg-skip-if

2025-03-27 Thread Jakub Jelinek
On Thu, Mar 27, 2025 at 06:11:25PM +, Sam James wrote: > >> diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 > >> b/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 > >> index 4351874825ed..a7e15bad850a 100644 > >> --- a/gcc/testsuite/gfortran.dg/cray_pointers_2.f90 > >> +++ b/gcc/tests

[COMMITTED 131/146] gccrs: ast-collector: Fix tuple struct pattern collection

2025-03-27 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Visit tuple pattern items as separated by commas. --- gcc/rust/ast/rust-ast-collector.cc | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/rust/ast/rust-ast-col

[committed] testsuite: Require effective target sigsetjmp for gcov-31/32

2025-03-27 Thread Dimitar Dimitrov
The tests call sigsetjmp and use sigjmp_buf type. Thus the tests cannot be compiled on baremetal newlib targets which do not have sigsetjmp. Pushed to trunk as obvious. gcc/testsuite/ChangeLog: * gcc.misc-tests/gcov-31.c: Require effective target sigsetjmp. * gcc.misc-tests/gcov

Re: [PATCH] libcpp: Add missing configure check for setlocale.

2025-03-27 Thread Joseph Myers
On Wed, 26 Mar 2025, Roland McGrath wrote: > The libcpp code uses `#ifdef HAVE_SETLOCALE` but its configure doesn't > have the corresponding check. > > Ok for trunk and 14 branch? OK, but watch out for what look like spurious changes in the generated configure (maybe resulting from a patched au

Re: [PATCH v2] c++: Fix FAIL: g++.dg/tree-ssa/initlist-opt1.C

2025-03-27 Thread Marek Polacek
On Wed, Mar 26, 2025 at 05:57:51PM +, Jonathan Wakely wrote: > On Wed, 26 Mar 2025 at 17:42, Jason Merrill wrote: > > > > On 3/26/25 6:14 AM, Jonathan Wakely wrote: > > > My r15-8904-ge200f53a555651 changed the std::vector initializer-list > > > constructor so that it calls a new _M_range_init

Re: [PATCH 1/3] testsuite: harmless dg-* whitespace fixes

2025-03-27 Thread Sam James
Harald Anlauf writes: > Sam, > > who approved the fortran testsuite changes? We've been doing them as obvious by consensus since last year. I'm sorry for the error. > > Am 27.03.25 um 14:28 schrieb Sam James: >> These just fix inconsistent/unusual style to avoid noise when grepping >> and also

Re: [PATCH 5/6] testsuite: fix more dg-* whitespace issues

2025-03-27 Thread Sam James
Marek Polacek writes: > On Thu, Mar 27, 2025 at 12:38:55AM +, Sam James wrote: >> A handful of cosmetic ones in here but most meant the directive wasn't >> doing anything. > > This patch breaks g++.dg/template/explicit-args6.C for me. See PR119490. I can XFAIL it, but I think it may be a rea

Re: [PATCH 5/6] testsuite: fix more dg-* whitespace issues

2025-03-27 Thread Marek Polacek
On Thu, Mar 27, 2025 at 12:38:55AM +, Sam James wrote: > A handful of cosmetic ones in here but most meant the directive wasn't > doing anything. This patch breaks g++.dg/template/explicit-args6.C for me. > gcc/testsuite/ChangeLog: > > * g++.dg/cpp0x/udlit-namespace-ambiguous.C: Fix w

[Committed] RISC-V: testsuite: fix syntax error for assembler scan

2025-03-27 Thread Edwin Lu
When the dg brackets were added, they forgot to add the brackets for the scan-assembler-times directive. Committed as obvious. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/merge-4.c: Fix typo Signed-off-by: Edwin Lu --- gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/mer

[PATCH] testsuite: revert Fortran change

2025-03-27 Thread Sam James
Revert part of my change from r15-8973-g1307de1b4e7d5e; as Harald points out, the comment explains why this is there. It's a hack but it needs to stay for now. (I did have this marked as a TODO in my branch and didn't leave a proper note as to why, so it's my fault.) gcc/testsuite/ChangeLog:

Re: [PATCH 1/3] testsuite: harmless dg-* whitespace fixes

2025-03-27 Thread Harald Anlauf
Sam, who approved the fortran testsuite changes? Am 27.03.25 um 14:28 schrieb Sam James: These just fix inconsistent/unusual style to avoid noise when grepping and also people picking up bad habits when they see it (as similar mistakes can be harmful). This one should be reverted. The reason

[COMMITTED 045/144] gccrs: Successfully produce pseudo-nop

2025-03-27 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::add_stmt): Deleted (CompileAsm::CompileAsm): Successfully produce pseudo-nop (CompileAsm::visit): Likewise (CompileAsm::asm_build_asm_stmt): Likewise (CompileA

[Fortran, Patch, PR119380, v1] Fix freeing procedure pointers in components

2025-03-27 Thread Andre Vehreschild
Hi all, attached patch fixes freeing of procedure pointers that are stored in a derived type's component. GFortran did that already for polymorphic types but missed out on the others. Regtested ok on x86_64-pc-linux-gnu / F41. Ok for mainline? Regards, Andre -- Andre Vehreschild * Email:

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

2025-03-27 Thread Paul-Antoine Arras
This pattern enables the combine pass to merge a vec_duplicate into a plus-mult or minus-mult RTL instruction. Before this patch, we have two instructions, e.g.: vfmv.v.fv6,fa0 vfmadd.vv v9,v6,v7 After, we get only one: vfmadd.vf v9,fa0,v7 On SPEC2017's 503.bwaves_r, de

Re: [PATCH] OpenMP: 'interop' construct - add ME support + target-independent libgomp

2025-03-27 Thread Sandra Loosemore
On 3/27/25 10:11, Paul-Antoine Arras wrote: I updated the patch (see attachment) with that in mind. Let me know what you think. I know that very long "BT_FN_VOID_INT_INT_PTRCONSTPTRPTR_CONSTPTR_PTRCONSTSTRING..." identifier follows the conventions used elsewhere, but it's not very readable,

[PATCH v3 14/19] Add reject_target_clone hook and filter target_clone versions.

2025-03-27 Thread Alfie Richards
This patch introduces the TARGET_REJECT_FUNCTION_CLONE_VERSION hook which is used to determine if a target_clones version string parses. If true is returned, a warning is emitted and from then on the version is ignored. This is as specified in the Arm C Language Extension. The purpose of this is

Re: [PATCH] Further use of mod_scope in modified_type_die

2025-03-27 Thread Tom Tromey
> "Richard" == Richard Biener writes: Sorry about the delay on this. >> - mod_type_die = subrange_type_die (type, low, high, bias, context_die); >> + mod_type_die = subrange_type_die (type, low, high, bias, mod_scope); Richard> that looks good. But why not for the ARRAY_TYPE case

Re: [PATCH] libstdc++: Update tzdata to 2025b

2025-03-27 Thread Tomasz Kaminski
On Thu, Mar 27, 2025 at 12:20 PM Jonathan Wakely wrote: > Import the new 2025b tzdata.zi file. > > libstdc++-v3/ChangeLog: > > * src/c++20/tzdata.zi: Import new file from 2025b release. > --- > > A much smaller change for 2025b, and no update to the leapseconds file. > LGTM > > Tested x8

[PATCH v3 12/19] Refactor FMV name mangling.

2025-03-27 Thread Alfie Richards
This patch is an overhaul of how FMV name mangling works. Previously mangling logic was duplicated in several places across both target specific and independent code. This patch changes this such that all mangling is done in targetm.mangle_decl_assembler_name (including for the dispatched symbol a

[COMMITTED 085/144] rust: negative polarity removes restrictions on validation of impl blocks

2025-03-27 Thread arthur . cohen
From: Philip Herron Negative polarity means we can just ignore if any trait items are not implemented. Fxies #3030 gcc/rust/ChangeLog: * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): the polarity was reversed * typecheck/rust-hir-type-check-item.cc: check the polarity

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

2025-03-27 Thread Qing Zhao
Yeoul, Thanks for the writeup. So, basically, This writeup insisted on introducing a new “structure scope” (similar as the instance scope in C++) into C language ONLY for counted_by attribute: 1. Inside counted_by attribute, the name lookup starts: A. Inside the current structure first (t

[PATCH v3 06/19] Change function versions to be implicitly ordered.

2025-03-27 Thread Alfie Richards
This changes function version structures to maintain the default version as the first declaration in the linked data structures by giving priority to the set containing the default when constructing the structure. This allows for removing logic for moving the default to the first position which w

[PATCH v3 07/19] Change make_attribute to take string_slice.

2025-03-27 Thread Alfie Richards
gcc/ChangeLog: * attribs.cc (make_attribute): Change arguments. * attribs.h (make_attribute): Change arguments. --- gcc/attribs.cc | 18 ++ gcc/attribs.h | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/gcc/attribs.cc b/gcc/attribs.cc inde

Re: [PATCH] OpenMP: 'interop' construct - add ME support + target-independent libgomp

2025-03-27 Thread Paul-Antoine Arras
On 25/03/2025 18:55, Sandra Loosemore wrote: On 3/25/25 09:25, Paul-Antoine Arras wrote: On 24/03/2025 21:17, Sandra Loosemore wrote: [snip] Besides, I am not sure how to encode complex types like (**const *). Does that require creating new definitions in gcc/builtin-types.def and gcc/fortran/

[PATCH v3 02/19] Add x86 FMV symbol tests

2025-03-27 Thread Alfie Richards
This is for testing the x86 mangling of FMV versioned function assembly names. gcc/testsuite/ChangeLog: * g++.target/i386/mv-symbols1.C: New test. * g++.target/i386/mv-symbols2.C: New test. * g++.target/i386/mv-symbols3.C: New test. * g++.target/i386/mv-symbols4.C

[PATCH v3 16/19] Refactor FMV frontend hooks and logic.

2025-03-27 Thread Alfie Richards
This change refactors FMV handling in the frontend to allows greater reasoning about versions in shared code. This is needed for target_version semantics and allowing target_clones and target_versions to both be used for the declaration there are now two questions that need to be answered for the

[PATCH v3 08/19] Add get_clone_versions and get_version functions.

2025-03-27 Thread Alfie Richards
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. This also adds get_version which is a helper function to get the version string from a decl. gcc/c-family/ChangeLog: * c-a

Re: [COMMITTED,wwwdocs] Mention Incremental LTO in GCC15

2025-03-27 Thread Michal Jires
(already Ok-ed off-list, since I forgot to Cc: ) On Thu, 2025-03-27 at 14:40:57 +0100, Gerald Pfeifer wrote: > On Thu, 27 Mar 2025, Michal Jires wrote: > > + Introduced incremental Link-Time Optimizations to significantly > > reduce > > +average recompilation time with small code changes whi

[PATCH v3 09/19] Add assembler_name to cgraph_function_version_info.

2025-03-27 Thread Alfie Richards
This adds the assembler_name member to cgraph_function_version_info to store the base assembler name for the function to be mangled. This is used in later patches for refactoring FMV mangling. gcc/ChangeLog: * cgraph.cc (cgraph_node::insert_new_function_version): Record assembler

[PATCH v3 18/19] Add error cases and tests for Aarch64 FMV.

2025-03-27 Thread Alfie Richards
This changes the ambiguation error for C++ to cover cases of differently annotated FMV function sets whose signatures only differ by their return type. It also adds tests covering many FMV errors for Aarch64, including redeclaration, and mixing target_clones and target_versions. gcc/cp/ChangeLog

[PATCH v3 15/19] Change target_version semantics to follow ACLE specification.

2025-03-27 Thread Alfie Richards
This changes behavior of target_clones and target_version attributes to be inline with what is specified in the Arm C Language Extension. Notably this changes the scope and signature of multiversioned functions to that of the default version, and changes the resolver to be created at the implemen

[PATCH v3 19/19] Remove FMV beta warning.

2025-03-27 Thread Alfie Richards
This patch removes the warning for target_version and target_clones in aarch64 as it is now spec compliant. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_process_target_version_attr): Remove warning. * config/aarch64/aarch64.opt: Mark -Wno-experimental-fmv-target

[PATCH v3 05/19] Update is_function_default_version to work with target_version.

2025-03-27 Thread Alfie Richards
Notably this respects target_version semantics where an unannotated function can be the default version. gcc/ChangeLog: * attribs.cc (is_function_default_version): Add target_version logic. --- gcc/attribs.cc | 27 --- 1 file changed, 20 insertions(+), 7 deletion

[PATCH v3 14/19] Add reject_target_clone hook in order to filter target_clone versions.

2025-03-27 Thread Alfie Richards
This patch introduces the TARGET_REJECT_FUNCTION_CLONE_VERSION hook which is used to determine if a target_clones version string parses. If true is returned, a warning is emitted and from then on the version is ignored. This is as specified in the Arm C Language Extension. The purpose of this is

[PATCH v3 17/19] Support mixing of target_clones and target_version.

2025-03-27 Thread Alfie Richards
This patch adds support for the combination of target_clones and target_version in the definition of a versioned function. This patch changes is_function_default_version to consider a function declaration annotated with target_clones containing default to be a default version. This takes advanta

[PATCH v3 10/19] Add dispatcher_resolver_function and is_target_clone to cgraph_node.

2025-03-27 Thread Alfie Richards
These flags are used to make sure mangling is done correctly. gcc/ChangeLog: * cgraph.h (struct cgraph_node): Add dispatcher_resolver_function and is_target_clone. --- gcc/cgraph.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/cgraph.h b/gcc/cgr

[PATCH v3 01/19] Add PowerPC FMV symbol tests.

2025-03-27 Thread Alfie Richards
This tests the mangling of function assembly names when annotated with target_clones attributes. gcc/testsuite/ChangeLog: * g++.target/powerpc/mvc-symbols1.C: New test. * g++.target/powerpc/mvc-symbols2.C: New test. * g++.target/powerpc/mvc-symbols3.C: New test. *

[PATCH v3 13/19] Refactor riscv target parsing to take string_slice.

2025-03-27 Thread Alfie Richards
This is a quick refactor of the riscv target processing code to take a string_slice rather than a decl. The reason for this is to enable it to work with target_clones where merging logic requires reasoning about each version string individually in the front end. This refactor primarily serves ju

[PATCH v3 11/19] Add clone_identifier function.

2025-03-27 Thread Alfie Richards
This is similar to clone_function_name and its siblings but takes an identifier tree node rather than a function declaration. This is to be used in conjunction with the identifier node stored in cgraph_function_version_info::assembler_name to mangle FMV functions in later patches. gcc/ChangeLog:

[PATCH v3 04/19] Remove unnecessary `record` argument from maybe_version_functions.

2025-03-27 Thread Alfie Richards
Previously, the `record` argument in maybe_version_function allowed the call to cgraph_node::record_function_versions to be skipped. However, this was only skipped when both decls were already marked as versioned, in which case we trigger the early exit in record_function_versions instead. Theref

[PATCH v3 03/19] Add string_slice class.

2025-03-27 Thread Alfie Richards
The string_slice inherits from array_slice and is used to refer to a substring of an array that is memory managed elsewhere without modifying the underlying array. For example, this is useful in cases such as when needing to refer to a substring of an attribute in the syntax tree. This commit al

[PATCH v3 00/19] FMV refactor and ACLE compliance.

2025-03-27 Thread Alfie Richards
Hi All, This is an update on the patch series enabling ACLE compliant FMV behaviour for targets supporting target_version and a refactor of FMV in the front end. This patch series leaves much of the logic that enables FMV for x86 in place, often gated behind TARGET_HAS_FMV_TARGET_ATTRIBUTE. I wou

[PATCH] testsuite: aarch64: fix another unbalanced }

2025-03-27 Thread Sam James
In r15-8956-ge90d6c2639c392, I missed one, so while it did fix a problem, it also exposed another because the braces were now unbalanced. There's IMO more to do here with ideally whitespace before the } when using scan-assembler-times but let's do that later. gcc/testsuite/ChangeLog: * g

Re: [PATCH] doc: document incremental LTO flags

2025-03-27 Thread Sam James
Michal Jires writes: > This adds missing documentation for LTO flags. > > Ok? > > gcc/ChangeLog: > > * doc/invoke.texi: (Optimize Options): > Add incremental LTO flags. > --- > gcc/doc/invoke.texi | 26 +++--- > 1 file changed, 23 insertions(+), 3 deletions(-) > >

[committed v2] libstdc++: Replace use of std::min in ranges::uninitialized_xxx algos [PR101587]

2025-03-27 Thread Jonathan Wakely
Because ranges can have any signed integer-like type as difference_type, it's not valid to use std::min(diff1, diff2). Instead of calling std::min with an explicit template argument, this adds a new __mindist helper that determines the common type and uses that with std::min. libstdc++-v3/ChangeLo

Re: [PATCH] c++: fix missing lifetime extension [PR119383]

2025-03-27 Thread Jason Merrill
On 3/25/25 3:37 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- Since r15-8011 cp_build_indirect_ref_1 won't do the *&TARGET_EXPR -> TARGET_EXPR folding not to change its value category. That fix is correct but it made us stop extending the life

[PATCH] testsuite: Add options for float16 for test [PR119133]

2025-03-27 Thread Christophe Lyon
Some targets (like arm) need some flags to enable _Float16 support. gcc/testsuite/ChangeLog: PR target/119133 * gcc.dg/torture/pr119133.c: Add options for float16. --- gcc/testsuite/gcc.dg/torture/pr119133.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg

Re: [PATCH] c++/modules: Fix modules and LTO with header units [PR118961]

2025-03-27 Thread Jason Merrill
On 3/27/25 3:35 AM, Nathaniel Shead wrote: Bootstrapped and regtested (so far just dg.exp and modules.exp) on x86_64-pc-linux-gnu, OK for trunk if full regtest succeeds? Rather than updating copy_fndecl_with_name, we could also just fix modules specifically by overwriting DECL_ABSTRACT_P before

[COMMITTED 108/144] gccrs: Add default resolver parent functions by default

2025-03-27 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-finalize-imports-2.0.h: Add parent member functions from default resolver. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-finalize-imports-2.0.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a

Re: [PATCH] target/119010 - add znver{4,5}_insn_both to resolve missing reservations

2025-03-27 Thread Jan Hubicka
> I still was seeing > > ;;0--> b 0: i 101 {[sp-0x3c]=[sp-0x3c]+0x1;clobber flags;}:nothing > > so the following adds a standard alu insn reservation mimicing that > from the znver.md description allowing both load and store. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu

[PATCH 7/8] target/119010 - Zen4/Zen5 reservations for movlhps loads

2025-03-27 Thread Richard Biener
The following fixes up the ssemov2 type introduction, amending the znver4_sse_mov_fp_load reservation. This fixes ;; 14--> b 0: i1436 xmm6=vec_concat(xmm6,[ax+0x8]) :nothing Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? PR target/119010 * config/i386/zn

Re: [PATCH] libiberty, gcc: Add memrchr to libiberty and use it [PR119283].

2025-03-27 Thread Richard Biener
On Fri, Mar 21, 2025 at 11:01 AM Iain Sandoe wrote: > > It seems that libiberty already has replacements for most of the > mem* functions, but they are not published via include/libiberty.h. > > Tested on x86_64 Linux, Darwin aarch64 Linux, OK for trunk? OK. Richard. > thanks, > Iain > > --- 8<

[PATCH 8/8] target/119010 - add mode attribute to *vmovv16si_constm1_pternlog_false_dep

2025-03-27 Thread Richard Biener
Like the other instances. This avoids ;; 1--> b 0: i6540 {xmm2=const_vector;unspec[xmm2] 38;}:nothing Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? PR target/119010 * config/i386/sse.md (*vmov_constm1_pternlog_false_dep): Add mode attribute. --- gc

[PATCH 4/8] target/119010 - handle DFmode in SSE divide reservations for Zen4/Zen5

2025-03-27 Thread Richard Biener
Like the other DFmode cases. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? PR target/119010 * config/i386/zn4zn5.md (znver4_sse_div_pd, znver4_sse_div_pd_load, znver5_sse_div_pd_load): Handle DFmode. --- gcc/config/i386/zn4zn5.md | 6 +++--- 1 file changed, 3 i

[PATCH 3/3] testsuite: fix dg-* typos

2025-03-27 Thread Sam James
I have a handful more of these left but those introduce FAILs, while these all introduce new PASSes. libstdc++-v3/ChangeLog: * testsuite/std/format/string_neg.cc: Add missing brace for dg-error. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-datagram-socket.c: Fix 'dg-message' sp

Re: [PATCH,wwwdocs] Mention Incremental LTO in GCC15

2025-03-27 Thread Gerald Pfeifer
On Thu, 27 Mar 2025, Michal Jires wrote: > + Introduced incremental Link-Time Optimizations to significantly reduce > +average recompilation time with small code changes while using LTO. How about rephrasing this to "Incremental Link-Time Optimizations significantly reduce average recompilat

[PATCH 2/3] testsuite: fix typos in comments

2025-03-27 Thread Sam James
This fixes some 'scan-tree-dump-times' (vs '-time') typos and one or two others I noticed in passing. gcc/testsuite/ChangeLog: * g++.dg/warn/Winvalid-memory-model.C: Fix typo in comment. * gcc.dg/builtin-dynamic-object-size-19.c: Ditto. * gcc.dg/builtin-object-size-19.c: D

Re: [PATCH 2/2] libstdc++: add constexpr stable_partition

2025-03-27 Thread Giuseppe D'Angelo
On 27/03/2025 13:24, Jonathan Wakely wrote: Sure thing; is the attached patch OK (on top of the other two)? Yes, looks good, thanks! Thank you, the 3 patches have now been committed to trunk. -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH 09/12] testsuite, ia64: fix broken dg directives

2025-03-27 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 02:34:51PM -0400, David Malcolm wrote: > Found by dg-lint. > > gcc/testsuite/ChangeLog: > * gcc.target/ia64/mfused-madd-vect.c: Fix missing trailing " }" in > dg-do directive. > * gcc.target/ia64/mfused-madd.c: Likewise. > * gcc.target/ia64/mno-fused

[PATCH 3/8] target/119010 - add reservations for integer vector compares to zen4/zen5

2025-03-27 Thread Richard Biener
The following handles TI, OI and XI mode in the respective EVEX compare reservations that do not use memory (I've not yet run into ones with). The znver automata has separate reservations for integer compares (but only for zen1, for zen2 and zen3 there are no compare reservations at all), but I do

[PATCH 5/8] target/119010 - fixup Zen4/Zen5 fp<->int convert reservations

2025-03-27 Thread Richard Biener
They were using ssecvt instead of sseicvt, I've also added handling for sseicvt2 which was introduced without fixing up automata, and the relevant instruction uses DFmode. IMO this is a quite messy area that could need TLC in the machine description itself. Bootstrapped and tested on x86_64-unkno

[PATCH 2/8] target/119010 - missing reservations for Zen4/5 and SSE compares

2025-03-27 Thread Richard Biener
There's the znver4_sse_test reservation which matches the memory-less SSE compares but currently requires prefix_extra == 1. The old znver automata in this case sometimes uses znver1-double instead of znver1-direct, but it's quite a maze. The following simply drops the prefix_extra requirement, b

[PATCH 6/8] target/119010 - reservations for Zen4/Zen5 movhlps to memory

2025-03-27 Thread Richard Biener
The following adds missing reservations for the store variant of sselog reservations covering ;; 112--> b 0: i1499 [dx-0x10]=vec_select(xmm10,parallel):nothing Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? PR target/119010 * config/i386/zn4zn5.md (znver4_sse_l

[PATCH 1/3] testsuite: harmless dg-* whitespace fixes

2025-03-27 Thread Sam James
These just fix inconsistent/unusual style to avoid noise when grepping and also people picking up bad habits when they see it (as similar mistakes can be harmful). gcc/testsuite/ChangeLog: * c-c++-common/goacc/pr69916.c: Fix unusual whitespace in dg-*. * g++.old-deja/g++.abi/vtabl

[PATCH 0/3] testsuite: more typo/directive fixes

2025-03-27 Thread Sam James
Pushed. Sam James (3): testsuite: harmless dg-* whitespace fixes testsuite: fix typos in comments testsuite: fix dg-* typos gcc/testsuite/c-c++-common/goacc/pr69916.c| 2 +- gcc/testsuite/g++.dg/warn/Winvalid-memory-model.C | 2 +- gcc/testsuite/g++.old-deja/g++.abi/vtable2

[PATCH 1/8] target/119010 - fixup zn4zn5 reservation for move from const_vector

2025-03-27 Thread Richard Biener
movv8si_internal uses sselog1 and V4SFmode for an instruction like (insn 363 2437 371 97 (set (reg:V8SI 46 xmm10 [1125]) (const_vector:V8SI [ (const_int 0 [0]) repeated x8 ])) "ComputeNonbondedUtil.C":185:21 2402 {movv8si_internal} this wasn't catched by the ex

  1   2   >