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

[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

[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

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

[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

[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

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

[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

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

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

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

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

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

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

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

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

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

[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

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

[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

[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

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

  1   2   >