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

[PATCH 1/2] LoongArch: Set default alignment for functions jumps loops and labels.

2025-03-27 Thread Lulu Cheng
Based on r15-7624, a set of align combinations with better performance was tested through spec2006. LA464: -falign-loops=8 -falign-functions=32 -falign-jumps=32 -falign-labels=8 LA664: -falign-loops=16 -falign-functions=16 -falign-jumps=32 -falign-labels=8 gcc/ChangeLog: * config/loongar

[PATCH 2/2] LoongArch: doc: Add same-address constraint to the description of '-mld-seq-sa'.

2025-03-27 Thread Lulu Cheng
gcc/ChangeLog: * doc/invoke.texi: Modify the description of '-mld-seq-sa'. --- gcc/doc/invoke.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b3f7f0479cc..4cdef8938dd 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/d

Re: [PATCH 1/2] libstdc++: add constexpr inplace_merge

2025-03-27 Thread Jonathan Wakely
On Sat, 15 Mar 2025 at 20:11, Giuseppe D'Angelo wrote: > > Hello, > > These two patches complete the implementation of P2562R1 for C++26 (the > paper is called "constexpr Stable Sorting", but these other permutation > algorithms are also included). > > You can also find them on Forgejo here: > > h

Re: [PATCH 04/12] testsuite, aarch64: fix broken dg directives

2025-03-27 Thread Richard Earnshaw (lists)
On 26/03/2025 18:34, David Malcolm wrote: > Found by dg-lint. > > gcc/testsuite/ChangeLog: > * gcc.target/aarch64/atomic-inst-ldlogic.c: Add missing trailing > " }" for 2 dg-final directives. > * gcc.target/aarch64/saturating_arithmetic_1.c: Fix dg-do compile. > * gcc.targe

Re: [PATCH 2/2] c++/modules: Handle conflicting ABI tags [PR118920]

2025-03-27 Thread Nathaniel Shead
On Thu, Mar 27, 2025 at 08:02:20AM -0400, Jason Merrill wrote: > On 3/26/25 9:24 AM, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > -- >8 -- > > > > The ICE in the linked PR is caused because out_ptr_t inherits an ABI tag > > in a module that i

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

2025-03-27 Thread Jonathan Wakely
On Mon, 17 Mar 2025 at 10:24, Giuseppe D'Angelo wrote: > > Hello, > > On 17/03/2025 10:03, Tomasz Kaminski wrote: > > It seems that the patch is causing *first to be moved twice into the > > same position. > > Good catch. I think I need to move it *back*, at least that's what > __uninitialized_con

Re: [PATCH v2] RISC-V: Fix wrong LMUL when only implict zve32f.

2025-03-27 Thread Robin Dapp
This does not only happen on ELEN=32 and VLEN=32, it happened on all ELEN=32 arch, and one of our internal configurations hit this... Wait, is there something I keep missing? There must be I guess. Disregarding the SEW=8 case because that one is clear, but take for example: ENTRY (RVVMF4HI,

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

2025-03-27 Thread Jonathan Wakely
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. Tested x86-64-linux with this file installed via RPM to /usr/share/zoneinfo/ so that the te

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

2025-03-27 Thread Giuseppe D'Angelo
Hello, Thank you for the review! On 27/03/2025 11:38, Jonathan Wakely wrote: With the inplace_merge and stable_partition patches approved, can you bump it again now? That would presumably resolve PR 119488. Sure thing; is the attached patch OK (on top of the other two)? Thank you, -- Giusep

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

2025-03-27 Thread Jonathan Wakely
On Thu, 27 Mar 2025 at 12:20, Giuseppe D'Angelo wrote: > > Hello, > > Thank you for the review! > > On 27/03/2025 11:38, Jonathan Wakely wrote: > > With the inplace_merge and stable_partition patches approved, can you > > bump it again now? > > > > That would presumably resolve PR 119488. > > Sure

[gcc-14 PATCH] Reuse scratch registers generated by LRA

2025-03-27 Thread Xi Ruoyao
From: Denis Chertykov Test file: udivmoddi.c problem insn: 484 Before LRA pass we have: (insn 484 483 485 72 (parallel [ (set (reg/v:SI 143 [ __q1 ]) (plus:SI (reg/v:SI 143 [ __q1 ]) (const_int -2 [0xfffe]))) (clobber (scrat

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 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 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 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

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

[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: [libstdc++] Optimize string constructors

2025-03-27 Thread Jonathan Wakely
On Wed, 15 Jan 2025 at 12:10, Jonathan Wakely wrote: > > On Fri, 13 Dec 2024 at 14:01, Jan Hubicka wrote: > > > > Hi, > > this patch improves code generation on string constructors. We currently > > have > > _M_construct which takes as a parameter two iterators (begin/end pointers to > > other

[Patch] OpenMP: Fix C++ template handling with append_args' prefer_type modifier

2025-03-27 Thread Tobias Burnus
When Sandra implemented the GOMP_interop call in gimplify.cc for declare_variant's append_args, she run into an ICE because the C++ template substitution for prefer_type did not work. Her solution was to add a sorry to defer the implementation, which now the attached patch does. Actually, the hea

Re: [libstdc++] Optimize string constructors

2025-03-27 Thread Jan Hubicka
> > Newline between functions please. > > > > OK with those two changes. > > Looking back through my inbox, this one doesn't seem to have been > pushed. Was it superseded by something else, or is it just waiting for > stage 1 now? Seems I missed the approval, sorry. I will push it - I think it w

[PATCH,wwwdocs] Mention Incremental LTO in GCC15

2025-03-27 Thread Michal Jires
This patch adds mention of my new Incremental LTO in gcc-15/changes.html General Improvements. Ok? --- htdocs/gcc-15/changes.html | 6 ++ 1 file changed, 6 insertions(+) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index dbc82be2..8a050aed 100644 --- a/htdocs/gcc-15/

Re: [PATCH 2/2] c++/modules: Handle conflicting ABI tags [PR118920]

2025-03-27 Thread Jason Merrill
On 3/26/25 9:24 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- The ICE in the linked PR is caused because out_ptr_t inherits an ABI tag in a module that it does not in the importing module. When we try to build a qualified 'const out_ptr_t'

Re: [PATCH 2/2] c++/modules: Handle conflicting ABI tags [PR118920]

2025-03-27 Thread Jason Merrill
On 3/27/25 8:05 AM, Nathaniel Shead wrote: On Thu, Mar 27, 2025 at 08:02:20AM -0400, Jason Merrill wrote: On 3/26/25 9:24 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- The ICE in the linked PR is caused because out_ptr_t inherits an ABI t

[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 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

[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

COBOL constant compile-time expressions and numeric literals (was: [PATCH][RFC] [cobol] change cbl_field_data_t::etc_t::value from _Float128 to tree)

2025-03-27 Thread Simon Sobisch
> Section 8.3.3.3 of the ISO spec defines both fixed- and floating-point > numeric literals. > > "A fixed-point numeric literal is a character-string whose > characters are selected from the digits '0' through '9', the plus > sign, the minus sign, and the decimal point. The implementor shall > all

Re: [PATCH 06/12] testsuite, arm: fix broken dg directives

2025-03-27 Thread Richard Earnshaw (lists)
On 26/03/2025 18:34, David Malcolm wrote: > Found by dg-lint. > > gcc/testsuite/ChangeLog: > * gcc.target/arm/cmse/cmse-17.c: Fix missing space before trailing > "}" in dg-options. > * gcc.target/arm/short-vfp-1.c: Likewise for dg-final; also after > leading "{", in 5 place

[COMMITTED 087/146] gccrs: lang-items: Collect trait functions that are lang items

2025-03-27 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-collect-lang-items.cc (CollectLangItems::visit): Add visitor for collecting functions that might be lang items. * ast/rust-collect-lang-items.h: Likewise. --- gcc/rust/ast/rust-collect-lang-items.cc | 8 gcc/rus

Re: [PATCH] target/119474 - more DFmode handling in zn4zn5 reservations

2025-03-27 Thread Jan Hubicka
> The following adds DFmode where V1DFmode and SFmode were handled. > This resolves missing reservations for adds, subs [with memory] > and for FMAs for the testcase I'm looking at. Resolved cases are > > -;; 16--> b 0: i 237 xmm3=xmm3+[r9*0x8+si] :nothing > -;; 29-->

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 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

[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 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

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 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

[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

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

[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

[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

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

[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

[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

[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

[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/

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

[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

[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

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.

[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/

[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

[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

[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 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

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 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 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 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

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] 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 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) > *

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: [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 } >> > +// {

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

[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

[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

Re: [PATCH] libstdc++: Fix std::ranges::iter_move for function references [PR119469]

2025-03-27 Thread Tomasz Kaminski
On Wed, Mar 26, 2025 at 12:29 PM Jonathan Wakely wrote: > The result of std::move (or a cast to an rvalue reference) on a function > reference is always an lvalue. Because std::ranges::iter_move was using > the type std::remove_reference_t&& as the result of std::move, it was > giving the wrong t

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

2025-03-27 Thread Iain Sandoe
this (or an alternate implementation) is needed for the cobol FE to build on darwin, > On 21 Mar 2025, at 10:00, 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 Li

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

2025-03-27 Thread Iain Sandoe
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 --- 8< --- Several of enumerators in parse.y conflict with ones declared in at least some versions of .. e.g. "OVERFLOW". The

[PATCH] target/119010 - add missing DF load/store reservations for znver4 and znver5

2025-03-27 Thread Richard Biener
The following resolves missing reservations for DFmode *movdf_internal loads and stores, visible as 'nothing' in -fsched-verbose=2 dumps. Bootstrap and regtest running on x86_64-unknown-linux-gnu. PR target/119010 * config/i386/zn4zn5.md (znver4_sse_mov_fp, znver4_sse_mov_fp_load,

[PATCH] target/119474 - more DFmode handling in zn4zn5 reservations

2025-03-27 Thread Richard Biener
The following adds DFmode where V1DFmode and SFmode were handled. This resolves missing reservations for adds, subs [with memory] and for FMAs for the testcase I'm looking at. Resolved cases are -;; 16--> b 0: i 237 xmm3=xmm3+[r9*0x8+si] :nothing -;; 29--> b 0: i 246

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

2025-03-27 Thread Richard Biener
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, OK? P

Re: [PATCH, V3] PR target/118541 - Do not generate unordered fp cmoves for IEEE compares on PowerPC

2025-03-27 Thread Florian Weimer
* Michael Meissner: > On Mon, Mar 24, 2025 at 09:15:26PM +0100, Florian Weimer wrote: >> * Michael Meissner: >> >> > +enum reverse_cond_t { >> > + REVERSE_COND_ORDERED_OK, >> > + REVERSE_COND_NO_ORDERED >> > +}; >> >> This should probably be something >> like >> >> enum reverse_cond_t { >>

[PATCH] 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

Re:[pushed] [PATCH] LoongArch: Support Q suffix for __float128.

2025-03-27 Thread Lulu Cheng
Pushed to r15-8962. 在 2025/3/22 下午4:35, Lulu Cheng 写道: In r14-3635 supports `__float128`, but does not support the 'q/Q' suffix. PR target/119408 gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_c_mode_for_suffix): New. (TARGET_C_MODE_FOR_SUFFIX): Defi

Re: [PATCH 1/2] c++/modules: Fix tsubst of global module friend classes [PR118920]

2025-03-27 Thread Nathaniel Shead
On Wed, Mar 26, 2025 at 11:40:16PM -0400, Jason Merrill wrote: > On 3/26/25 9:23 AM, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > -- >8 -- > > > > When doing tsubst_friend_class, we need to first check if any imported > > module has already c

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

2025-03-27 Thread Nathaniel Shead
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 calling build_cdtor_clones in trees_in::decl_

COBOL: why not getting UAT/NIST "temporarily" to trunk (was: [PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE [PR119242])

2025-03-27 Thread Simon Sobisch
> > Implicit criticism about tests accepted. I have 679 UAT tests, and > > now I've got the bit in my teeth, and I am creating a process that > > will convert as many as I can to DejaGnu. However: the autom4te and > > DejaGnu principles, practices, and philosophies are almost, but not > > quite,

Re: [PATCH] libstdc++: Fix std::ranges::iter_move for function references [PR119469]

2025-03-27 Thread Jonathan Wakely
On Thu, 27 Mar 2025 at 08:38, Tomasz Kaminski wrote: > > > > On Wed, Mar 26, 2025 at 12:29 PM Jonathan Wakely wrote: >> >> The result of std::move (or a cast to an rvalue reference) on a function >> reference is always an lvalue. Because std::ranges::iter_move was using >> the type std::remove_re

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

[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

[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

[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 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 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 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

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

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

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 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 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] 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

[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

[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

[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

[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

  1   2   >