[COMMITTED] Doc: Fix description of -Wno-aggressive-loop-optimizations [PR78874]

2025-04-05 Thread Sandra Loosemore
gcc/ChangeLog PR middle-end/78874 * doc/invoke.texi (Warning Options): Fix description of -Wno-aggressive-loop-optimizations to reflect that this turns off the warning, and the default is for it to be enabled. --- gcc/doc/invoke.texi | 5 +++-- 1 file changed, 3 ins

Re: combine: Re-enable 2->2 combinations, with limits [PR116398]

2025-04-05 Thread Sam James
Richard Sandiford writes: > This series is an update of: > > https://gcc.gnu.org/pipermail/gcc-patches/2025-April/679924.html > > As discussed in that thread, the changes since last time are to make > distribute_links start from the last use, where easy, and to avoid > an unnecessary insn walk

[Committed] Doc: make regenerate-opt-urls

2025-04-05 Thread Sandra Loosemore
I keep forgetting to do this :-( gcc/c-family/ChangeLog * c.opt.urls: Regenerate. gcc/d/ChangeLog * lang.opt.urls: Regenerate. --- gcc/c-family/c.opt.urls | 3 +++ gcc/d/lang.opt.urls | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gcc/c-family/c.opt.urls b/gcc/c

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

2025-04-05 Thread Bill Wendling
On Fri, Apr 4, 2025, 12:23 PM Qing Zhao wrote: > > > > On Apr 4, 2025, at 13:09, Martin Uecker wrote: > > > > Am Freitag, dem 04.04.2025 um 18:51 +0200 schrieb Michael Matz: > >> Hello, > >> > >> On Fri, 4 Apr 2025, Qing Zhao wrote: > >> > >>> So, a different attribute name “counted_by_exp” migh

[COMMITTED] Doc: Document -Wpsabi [PR81831]

2025-04-05 Thread Sandra Loosemore
Per the issue, there were a couple places in the manual where -Wno-psabi was mentioned, but the option itself was not documented. gcc/c-family/ChangeLog PR c/81831 * c.opt (Wpsabi): Remove "Undocumented" modifier and add a documentation string. gcc/ChangeLog PR c/8

Re: [pushed] c++: lambda in requires outside template [PR99546]

2025-04-05 Thread Patrick Palka
On Fri, 4 Apr 2025, Patrick Palka wrote: > On Fri, 4 Apr 2025, Jason Merrill wrote: > > > On 4/4/25 4:35 PM, Patrick Palka wrote: > > > On Fri, 4 Apr 2025, Jason Merrill wrote: > > > > > > > Tested x86_64-pc-linux-gnu, applying to trunk. > > > > > > > > -- 8< -- > > > > > > > > Since r10-7441

[pushed] c++: constexpr ref template arg [PR119194]

2025-04-05 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk/14. -- 8< -- Here we were assuming that a constant variable appearing in a template argument is used for its value. We also need to handle seeing its address taken. PR c++/119194 gcc/cp/ChangeLog: * decl2.cc (min_vis_expr_r) [ADDR_

[PATCH v2 0/4] Libsanitizer improvements

2025-04-05 Thread Aleksandar Rakic
From: Aleksandar Rakic Chao-ying Fu (2): Fix libsanitizer linkage options for cross toolchains Enable LSAN and TSAN for mips with the 64-bit abi Faraz Shahbazker (1): Add shadow-map for n32 ABI Jean Lee (1): Add uclibc support gcc/gcc.cc| 20 ---

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-05 Thread Jakub Jelinek
On Sat, Mar 29, 2025 at 04:03:07PM +, Iain Sandoe wrote: > > > > On 29 Mar 2025, at 15:56, Jakub Jelinek wrote: > > > > On Sat, Mar 29, 2025 at 03:50:54PM +, Iain Sandoe wrote: > >>> I'm not sure if sed -E is portable enough (sure, I know it is in POSIX, > >>> but > >>> that is not eno

Re: [PATCH] cobol: Do not overload int64_t, overload long and long long.

2025-04-05 Thread Iain Sandoe
> On 20 Mar 2025, at 19:28, Robert Dubner wrote: > > Although I am confused about how _int64_t can be anything but a 64-bit > signed integer, and because it is my understanding that long and long long > really *do* change from platform to platform, 32b Darwin/macOS had 64b integers as “long l

[COMMITTED 090/146] gccrs: Fix NR2.0 compiler ICE caused by Generics in Enums

2025-04-05 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc: Change the late name resolver to enter proper lexical scope during typechecking * resolve/rust-late-name-resolver-2.0.h: Add needed prototype to header * resolve/rust-toplevel

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

2025-04-05 Thread Robert Dubner
I am enclosing a patch to be applied on top of yours. (Your patch got us down to zero errors in the "Coughlan" tests, 2 UAT errors, and 4 errors in the NIST tests. Well done!) This one passes all of my tests, in both ASCII and EBCDIC forms. It also passes "make check-cobol". That's on my x_86_

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

2025-04-05 Thread Tobias Burnus
Paul-Antoine Arras wrote: Thanks Sandra and Jakub for your comments. Likewise thanks to them and to you for the patch. Minor comments: include/ChangeLog: * gomp-constants.h (GOMP_DEVICE_DEFAULT_OMP_61): Define. (GOMP_INTEROP_FLAG_TARGET): Define. (GOMP_INTEROP_FLAG_TA

[COMMITTED 106/141] gccrs: expansion: Expand generic args in generic type path segments

2025-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Correctly visit the generic args of a generic type path segment. gcc/testsuite/ChangeLog: * rust/compile/issue-2015.rs: New test. --- gcc/rust/expand/rust-expand-visitor.cc

Re: [PATCH] [testsuite] [riscv] xfail ssa-dom-cse-2 on riscv64

2025-04-05 Thread Jeff Law
On 3/31/25 12:59 PM, Alexandre Oliva wrote: For the same reasons that affect alpha and other targets, gcc.dg/tree-ssa/ssa-dom-cse-2.c fails to be optimized to the expected return statement: the array initializer is vectorized into pairs, and DOM cannot see through that. Add riscv*-*-* to the

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-05 Thread Iain Sandoe
Hi Jakub Thanks for doing this... > On 28 Mar 2025, at 14:39, Jakub Jelinek wrote: > > +cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc > + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|charmaps'; \ > + l=$$l'\|valconv\|exceptl'; \ > + sed -e '/^#include/

Re: [PATCH] cobol/119302 - transform gcobol.3 name during install

2025-04-05 Thread Richard Biener
On Sat, 15 Mar 2025, Richard Biener wrote: > > I do wonder, since gcobol.3 documents parts of the libgcobol API(?), > whether it should be named libgcobol.3 instead though? Ping? > OK? > > Thanks, > Richard. > > PR cobol/119302 > gcc/cobol/ > * Make-lang.in: Use $(GCOBOL_INSTALL_

Re: [PATCH] LoongArch: Make gen-evolution.awk compatible with FreeBSD awk

2025-04-05 Thread Lulu Cheng
在 2025/4/2 上午11:19, Xi Ruoyao 写道: Avoid using gensub that FreeBSD awk lacks, use gsub and split those each of gawk, mawk, and FreeBSD awk provides. Reported-by: mp...@vip.163.com Link: https://man.freebsd.org/cgi/man.cgi?query=awk gcc/ChangeLog: * config/loongarch/genopts/gen-evoluti

[committed] cobol: Change some dubious sprintf() calls to xasprintf in genapi.cc

2025-04-05 Thread Robert Dubner
>From 59665ed295feeea4647f3c9473b338b1c0b48ec7 Mon Sep 17 00:00:00 2001 From: Bob Dubner mailto:rdub...@symas.com Date: Tue, 1 Apr 2025 17:01:59 -0400 Subject: [PATCH] cobol: Change some dubious sprintf() calls to xasprintf in genapi.cc These calls were into fixed-length arrays that might be too

[PATCH v3] Don't instrument exit edges after musttail

2025-04-05 Thread Andi Kleen
When -fprofile-generate is used musttail often fails because the compiler adds instrumentation after the tail calls. This patch prevents adding exit extra edges after musttail because for a tail call the execution leaves the function and can never come back even on a unwind or exception. This is

[COMMITTED 010/146] rust: Desugar IfLet* into MatchExpr

2025-04-05 Thread arthur . cohen
From: Marc Poulhiès Replace the "regular" AST->HIR lowering for IfLet* with a desugaring into a MatchExpr. Desugar a simple if let: if let Some(y) = some_value { bar(); } into: match some_value { Some(y) => {bar();}, _ => () } Same applies for IfLetExprConseqElse (

Re: [PATCH] gimple: sccopy: Prune removed statements from SCCs [PR117919]

2025-04-05 Thread Filip Kastl
On Mon 2025-03-17 21:31:13, Mikael Morin wrote: > Le 28/02/2025 à 17:01, Filip Kastl a écrit : > > diff --git a/gcc/gimple-ssa-sccopy.cc b/gcc/gimple-ssa-sccopy.cc > > index 9f25fbaff36..7ffb5718ab6 100644 > > --- a/gcc/gimple-ssa-sccopy.cc > > +++ b/gcc/gimple-ssa-sccopy.cc > > @@ -568,6 +568,19 @

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

2025-04-05 Thread Martin Uecker
Am Montag, dem 31.03.2025 um 13:59 -0700 schrieb Bill Wendling: > > I'd like to offer up this to solve the issues we're facing. This is a > > combination of everything that's been discussed here (or at least that > > I've been able to read in the centi-thread :-). Thanks! I think this proposal

[COMMITTED 046/141] gccrs: ast-builder: Add new methods for functions, traits and tuples.

2025-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc: New methods. * ast/rust-ast-builder.h: Declare them. --- gcc/rust/ast/rust-ast-builder.cc | 62 gcc/rust/ast/rust-ast-builder.h | 36 +-- 2 files changed, 96 inser

Re: [PATCH] c++: Rename -fmodules-ts to -fmodules in diagnostics

2025-04-05 Thread Jason Merrill
On 4/1/25 7:49 AM, Nathaniel Shead wrote: Tested on x86_64-pc-linux-gnu, OK for trunk if full bootstrap + regtest succeeds? OK. -- >8 -- This replaces some usages of the old -fmodules-ts flag with the new -fmodules flag made in r15-5112-gd9c3c3c85665b2. gcc/cp/ChangeLog: * parser.c

[COMMITTED 104/144] gccrs: Mark virtual function override in default resolver

2025-04-05 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those function prototype were not marked as override and throwing warning. gcc/rust/ChangeLog: * resolve/rust-default-resolver.h: Make most visit function override. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-default-resolver.h | 178 +++

[COMMITTED 101/146] gccrs: fix ICE in borrows to invalid expressions

2025-04-05 Thread arthur . cohen
From: Philip Herron We need to check if the borrowed value is valid before creating the reference type. Otherwise this will lead to an ICE. Fixes Rust-GCC#3140 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): check for error * typecheck/rust-

[PATCH] i386: Add PTA_AVX10_1_256 to PTA_DIAMONDRAPIDS

2025-04-05 Thread Haochen Jiang
Hi all, For -march= handling, PTA_AVX10_1 will not imply PTA_AVX10_1_256, resulting in TARGET_AVX10_1 becoming true while TARGET_AVX10_1_256 false. Since we will check TARGET_AVX10_1_256 in GCC 15 for AVX512 feature enabling for AVX10, -march=diamondrapids will not enable 512 bit register and x/ym

[COMMITTED] Docs: make regenerate-opt-urls

2025-04-05 Thread Sandra Loosemore
gcc/c-family/ChangeLog * c.opt.urls: Regenerate. gcc/d/ChangeLog * lang.opt.urls: Regenerate. gcc/m2/ChangeLog * lang.opt.urls: Regenerate. --- gcc/c-family/c.opt.urls | 4 ++-- gcc/d/lang.opt.urls | 2 +- gcc/m2/lang.opt.urls| 2 +- 3 files changed, 4 insertions(

[COMMITTED 055/146] gccrs: lang-items: Move comment about arithmetic lang items

2025-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-lang-item.h: Fix comment location to align with other comments. --- gcc/rust/util/rust-lang-item.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h inde

[PATCH] libstdc++: Do not use compiler built-in in requires-clause

2025-04-05 Thread Jonathan Wakely
This is a partial backport of r14-6064-gc3f281a0c1ca50 which replaced a use of __is_trivially_copyable in the requires-clause for std::bit_cast. The change isn't actually necessary on the gcc-13 and gcc-12 branches, but in gcc-14 using the built-in directly because ill-formed because we started to

Re: [PATCH] toplevel, Makefile: Add missing CXX_FOR_TARGET export [PR88319].

2025-04-05 Thread Jeff Law
On 3/23/25 8:28 AM, Iain Sandoe wrote: Hi Jeff, On 23 Mar 2025, at 14:25, Jeff Law wrote: On 3/23/25 8:03 AM, Iain Sandoe wrote: Tested on x86_64-Linux, Darwin, OK for trunk? backports? thanks Iain --- 8< --- Actually, the issue is not local to the libitm case, it currently affects any 'cx

[committed] testsuite: xfail __tcf_ZL1b assembler check on hppa*-*-hpux* in g++.dg/modules/pr98893_b.C

2025-04-05 Thread John David Anglin
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- xfail __tcf_ZL1b assembler check on hppa*-*-hpux* in g++.dg/modules/pr98893_b.C 2025-04-02 John David Anglin gcc/testsuite/ChangeLog: * g++.dg/modules/pr98893_b.C: xfail __tcf_ZL1b assembler check on hppa*-*-hpux*.

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

2025-04-05 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 __min helper that determines the common type and uses that with std::min. libstdc++-v3/ChangeLog:

Contents of PO file 'cpplib-15.1-b20250316.fr.po'

2025-04-05 Thread Translation Project Robot
cpplib-15.1-b20250316.fr.po.gz Description: Binary data The Translation Project robot, in the name of your translation coordinator.

Re: [PATCH] avoid-store-forwarding: Fix reg init on load-elimination [PR119160]

2025-04-05 Thread Philipp Tomsich
Jeff, On Sun, 30 Mar 2025 at 01:48, Jeff Law wrote: > > > > On 3/28/25 5:12 AM, Konstantinos Eleftheriou wrote: > > In the case that we are eliminating the load instruction, we use zero_extend > > for the initialization of the base register for the zero-offset store. > > This causes issues when

Re: [PATCH 02/10] testsuite: aarch64: arm: move saturating_arithmetic_autovect tests to simd/

2025-04-05 Thread Richard Earnshaw (lists)
On 20/03/2025 16:15, Christophe Lyon wrote: > These tests force dg-options because they rely on -ftree-vectorize and > do not make use of torture options, so move them to simd/ where they > belong. > > gcc/testsuite/ > * > gcc.target/aarch64/advsimd-intrinsics/saturating_arithmetic_au

[COMMITTED 107/146] gccrs: match arms are a LUB

2025-04-05 Thread arthur . cohen
From: Philip Herron Unify rules are not the same as coercion rules. The coercion of ! is allowed to any type but not for a unify site which is different. Match arms are another least upper bound coercion. gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): implemen

[PATCH][gcc-14] libstdc++: Avoid bogus -Walloc-size-larger-than warning in test [PR116212]

2025-04-05 Thread Jonathan Wakely
The compiler can't tell that the vector size fits in int, so it thinks it might overflow to a negative value, which would then be a huge positive size_t. In reality, the vector size never exceeds five. There's no warning on trunk, so just change the local variable to use type unsigned so that we

RE: [PATCH] cobol: Replace quadratic loop removing std::set elements

2025-04-05 Thread Robert Dubner
> -Original Message- > From: Jonathan Wakely > Sent: Thursday, March 20, 2025 18:01 > To: James K. Lowden > Cc: gcc-patches@gcc.gnu.org; Robert Dubner > Subject: Re: [PATCH] cobol: Replace quadratic loop removing std::set > elements > > On Thu, 20 Mar 2025 at 21:27, James K. Lowden >

Re: [PATCH] c++: ICE w/ dependently scoped template friend [PR119378]

2025-04-05 Thread Jason Merrill
On 3/21/25 3:46 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for 14/13/12 (since it was reported against GCC 12)? This old regression is already fixed on trunk by r15-123 which contains this change. OK. -- >8 -- Here we ICE during instantiati

RE: [PATCH][RFC] [cobol] change cbl_field_data_t::etc_t::value from _Float128 to tree

2025-04-05 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Friday, March 21, 2025 03:48 > To: Robert Dubner > Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH][RFC] [cobol] change cbl_field_data_t::etc_t::value > from _Float128 to tree > > On Thu, 20 Mar 2025, Robert Dubner

Re: [PATCH] ranger: Improve nonnull_if_nonzero attribute [PR117023]

2025-04-05 Thread Jeff Law
On 3/4/25 2:10 AM, Jakub Jelinek wrote: Hi! On Fri, Nov 22, 2024 at 07:25:23PM -0500, Andrew MacLeod wrote:  I will shortly be submitting , and presumable committing, this patch as part of a series to improve VRP time for 117467.. So it may be in place by the time you need it On 11/18/2

[PATCH 17/27] Revert "AVX10.2 ymm rounding: Support vcvttph2{, u}{dq, qq, w} intrins"

2025-04-05 Thread Haochen Jiang
This reverts commit 493c5096050523ebc05e5fa21612683a996b97a7. --- gcc/config/i386/avx10_2roundingintrin.h | 335 -- gcc/config/i386/i386-builtin.def | 6 - gcc/config/i386/sse.md| 10 +- gcc/config/i386/subst.md |

[committed] libquadmath: Avoid old-style function definition warnings

2025-04-05 Thread Jakub Jelinek
Hi! I've noticed ../../../libquadmath/printf/gmp-impl.h:104:18: warning: old-style function definition [-Wold-style-definition] ../../../libquadmath/printf/gmp-impl.h:104:18: warning: old-style function definition [-Wold-style-definition] ../../../libquadmath/printf/gmp-impl.h:104:18: warning: o

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

2025-04-05 Thread Sam James
Jakub Jelinek writes: > 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-

[PATCH] libstdc++: Replace use of __mindist in ranges::uninitialized_xxx algos [PR101587]

2025-04-05 Thread Jonathan Wakely
In r15-8980-gf4b6acfc36fb1f I introduced a new function object for finding the smaller of two distances. In bugzilla Hewill Kang pointed out that we still need to explicitly convert the result back to the right difference type, because the result might be an integer-like class type that doesn't con

Re: [PATCH] testsuite: i386: Fix c-c++-common/gomp/metadirective-device.c etc. with i?86 compiler

2025-04-05 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 02:24:04PM +0100, Rainer Orth wrote: > 2025-03-25 Rainer Orth > > gcc/testsuite: > * c-c++-common/gomp/metadirective-device.c > (dg-additional-options): Use on all x86 targets. Restrict to lp64. > * c-c++-common/gomp/metadirective-target-device-1

Re: [PATCH 1/2] Make function_decl_type a scoped enum

2025-04-05 Thread Jakub Jelinek
On Wed, Mar 19, 2025 at 03:23:30PM +0100, Richard Biener wrote: > The enum currently has a member named NONE which pollutes the global > namespace unnecessarily. Use a scoped enum instead. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > OK if that succeeds? > > gcc/ > *

[COMMITTED 013/146] gccrs: add test case to show method resolution is working

2025-04-05 Thread arthur . cohen
From: Philip Herron The issue here was that the impl block for Cell defines that T must have the bound of Copy implemented. But simultaneously if you do an deref you get direct access to the unsafe cell which also defines a get method so these are two valid ways of accessing the method in questio

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

2025-04-05 Thread Martin Uecker
Am Dienstag, dem 01.04.2025 um 17:13 -0700 schrieb Bill Wendling: > On Tue, Apr 1, 2025 at 8:29 AM Martin Uecker wrote: > > Am Dienstag, dem 01.04.2025 um 15:01 + schrieb Qing Zhao: > > > > On Apr 1, 2025, at 10:04, Martin Uecker wrote: > > > > Am Montag, dem 31.03.2025 um 13:59 -0700 schrieb

[committed] gcc/testsuite/g++.dg/gomp/append-args-8.C: Fix scan-dump-tree (was: [Linaro-TCWG-CI] gcc-15-8972-g7e286b56545: 3 regressions on aarch64)

2025-04-05 Thread Tobias Burnus
The tree dump had bogus tailing numbers: interop.[0-9]+3, interop.[0-9]+2 This happened to work with x86-64 (-m32, -m64) but not with aarch64. I committed inr15-9033-ge0886d8ad4c519 the obvious fix: remove the 3 and 2 after the '+' Tobias ci_not...@linaro.org wrote: In gcc_check master-aarc

[PATCH v2 3/4] rust: use range for inside rust-gcc.cc [PR119341]

2025-04-05 Thread Andrew Pinski
There are some places inside rust-gcc.cc which are candidates to use range for instead of iterators directly. This changes the locations I saw and makes the code slightly more readable. gcc/rust/ChangeLog: PR rust/119341 * rust-gcc.cc (function_type): Use range fors. (func

Re: [PATCH] i386: Add "s_" as Saturation for AVX10.2 Converting Intrinsics.

2025-04-05 Thread Jakub Jelinek
On Tue, Mar 25, 2025 at 03:44:51PM +0800, Hu, Lin1 wrote: > Hi, all > > This patch aims to add "s_" after 'cvt' represent saturation. > > Bootstrapped and regtested on x86_64-linux-gnu-{-m32,-m64}, OK for trunk? > > BRs, > Lin > > gcc/ChangeLog: > > * config/i386/avx10_2-512convertintrin

[PATCH] Fortran: check type-spec in ALLOCATE of dummy with assumed length [PR119338]

2025-04-05 Thread Harald Anlauf
Dear all, F2003:C626 was only partly implemented: we missed the case of ALLOCATE of character dummy arguments with assumed length, where the type-spec must use asterisk, i.e. (*). Regtesting found one testcase that had a previously undetected error and needed adjustment, which I chose such that

[COMMITTED 016/146] gccrs: Remove usage of Resolver::get_builtin_types

2025-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-context.cc (Context::setup_builtins): Use TypeCheckContext::get_builtins instead of Resolver::get_builtin_types, TypeCheckContext::lookup_type_by_node_id, and TypeCheckContext::lookup_type.

Re: [PATCH] RISC-V: Fixbug for slli + addw + zext.w into sh[123]add + zext.w

2025-04-05 Thread Jin Ma
On Tue, 1 Apr 2025 22:57:33 -0600, Jeff Law wrote: > > > On 4/1/25 12:20 AM, Jin Ma wrote: > > Assuming we have the following variables: > > > > unsigned long long a0, a1; > > unsigned int a2; > > > > For the expression: > > > > a0 = (a0 << 50) >> 49; // slli a0, a0, 50 + srli a0, a0, 49 > >

RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-04-05 Thread Robert Dubner
> -Original Message- > From: Iain Sandoe > Sent: Wednesday, April 2, 2025 15:34 > To: Robert Dubner > Cc: Jakub Jelinek ; James K. Lowden > ; Richard Biener ; GCC Patches > > Subject: Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules > > > > > On 30 Mar 2025, at 15:07, Rober

Re: [PATCH] libstdc++: Optimize std::vector construction from input iterators [PR108487]

2025-04-05 Thread Tomasz Kaminski
On Tue, Mar 25, 2025 at 5:30 PM Jonathan Wakely wrote: > LWG 3291 make std::ranges::iota_view's iterator have input_iterator_tag > as its iterator_category, even though it satisfies the C++20 > std::forward_iterator concept. This means that the traditional > std::vector::vector(InputIterator, Inp

Re: [PATCH] gcc, cobol: Check for get_current_dir_name [PR119301]

2025-04-05 Thread Jose E. Marchesi
>> On 18 Mar 2025, at 12:08, Richard Biener wrote: >> >> On Tue, Mar 18, 2025 at 1:07 PM Iain Sandoe wrote: >>> >>> >>> On 18 Mar 2025, at 12:01, Richard Biener wrote: On Tue, Mar 18, 2025 at 12:13 PM Iain Sandoe wrote: > > tested on x86_64/aarch64 Linux and

RE: [PATCH] APX: add nf counterparts for rotl split pattern [PR 119539]

2025-04-05 Thread Liu, Hongtao
> -Original Message- > From: Uros Bizjak > Sent: Tuesday, April 1, 2025 5:24 PM > To: Hongtao Liu > Cc: Wang, Hongyu ; gcc-patches@gcc.gnu.org; Liu, > Hongtao > Subject: Re: [PATCH] APX: add nf counterparts for rotl split pattern [PR > 119539] > > On Tue, Apr 1, 2025 at 10:55 AM Hongt

[PUSHED] Add 'gcc.target/nvptx/alias-unsupported-1.c'

2025-04-05 Thread Thomas Schwinge
... testing for the GCC/nvptx "alias definitions not supported" error diagnostic. gcc/testsuite/ * gcc.target/nvptx/alias-unsupported-1.c: New. --- gcc/testsuite/gcc.target/nvptx/alias-unsupported-1.c | 9 + 1 file changed, 9 insertions(+) create mode 100644 gcc/testsuite

Re: [PATCH] inline: Add a call to unreachable to the return block for noreturn calls [PR119599]

2025-04-05 Thread Andrew Pinski
On Wed, Apr 2, 2025 at 11:52 PM Richard Biener wrote: > > On Thu, Apr 3, 2025 at 7:10 AM Andrew Pinski wrote: > > > > builtin_unreachable_bb_p exacts empty basic blocks to have only one > > successor edge but > > in the case after inliing a noreturn function that actually returns, we end > > up

[PATCH 2/2] libgomp: Add AArch64 SVE target tests to libgomp.

2025-04-05 Thread Tejas Belagod
Add AArch64 SVE target exectute tests to test various workshare constructs and clauses with SVE types. libgomp/ChangeLog: * testsuite/libgomp.c-target/aarch64/aarch64.exp: Test driver. * testsuite/libgomp.c-target/aarch64/firstprivate.c: New test. * testsuite/libgomp.c-tar

[COMMITTED 132/144] gccrs: Allow identifiers and paths to reference types during nr2.0

2025-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Allow IdentifierExpr and PathInExpression to reference types as well as values, remove ability for IdentifierExpr to reference labels. gcc/testsuite/ChangeLog: *

[PATCH 2/2] GCN: Don't emit weak undefined symbols [PR119369]

2025-04-05 Thread Thomas Schwinge
This resolves all instances of PR119369 "GCN: weak undefined symbols -> execution test FAIL, 'HSA_STATUS_ERROR_VARIABLE_UNDEFINED'"; for all affected test cases, the execution test status progresses FAIL -> PASS. This however also causes a small number of (expected) regressions, very similar to G

[COMMITTED 067/146] gccrs: attributes: Add class for sharing methods on attributes.

2025-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-attributes.h (class Attributes): New. * util/rust-attributes.cc: Implement Attributes::is_known(). * ast/rust-collect-lang-items.cc (is_known_attribute): Remove. (get_lang_item_attr): Call Attributes::is_known() i

[COMMITTED 113/146] gccrs: gcc/rust/ChangeLog:

2025-04-05 Thread arthur . cohen
From: Om Swaroop Nayak <96killera...@gmail.com> * ast/rust-collect-lang-items.cc (get_lang_item_attr): "removed checker fn" * util/rust-attributes.cc (Attributes::is_lang_item): "added fn" * util/rust-attributes.h: "added fn" Signed-off-by: Om Swaroop Nayak <96killera...@

[COMMITTED 029/146] gccrs: Fix bad handling for recursive type query

2025-04-05 Thread arthur . cohen
From: Philip Herron When resolving a type like this which is generic it causes the argument substitution to go through bounds checking which is expected. But this can call a type bounds probe which again calls a type query which will be on the Impl Type on an impl block which can result in a recu

[COMMITTED 081/146] gccrs: typecheck-path: Fix typo (reciever -> receiver)

2025-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-hir-path-probe.cc: Fix typos. * typecheck/rust-hir-path-probe.h: Likewise. * typecheck/rust-hir-type-check-path.cc: Likewise. --- gcc/rust/typecheck/rust-hir-path-probe.cc | 4 ++-- gcc/rust/typecheck/rust-hir

[PATCH] libstdc++: Fix up string _M_constructor exports [PR103827]

2025-04-05 Thread Jakub Jelinek
On Thu, Mar 27, 2025 at 02:04:24PM +0100, Jan Hubicka wrote: > > > 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

[PATCH] sra: Avoid creating TBAA hazards (PR118924)

2025-04-05 Thread Martin Jambor
Hi, the testcase in PR 118924, when compiled on Aarch64, contains an gimple aggregate assignment statement in between different types which are types_compatible_p but behave differently for the purposes of alias analysis. SRA replaces the statement with a series of scalar assignments which howeve

[COMMITTED 012/146] gccrs: Resolve SelfParam in name resolution 2.0

2025-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Handle SelfParam. * resolve/rust-late-name-resolver-2.0.h (Late::visit): Likewise. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-o

[pushed] libstdc++: Restored accidentally removed test case.

2025-04-05 Thread Tomasz Kamiński
It was removed by accident r15-9178-g5c7f6272f43f42. libstdc++-v3/ChangeLog: * testsuite/std/format/functions/format.cc: Restored line. --- libstdc++-v3/testsuite/std/format/functions/format.cc | 1 + 1 file changed, 1 insertion(+) Pushed for both trunk and release/14 branches. diff --

Re: [PATCH] gimple: sccopy: Don't increment i after vec::unordered_remove()

2025-04-05 Thread Richard Biener
On Thu, 20 Mar 2025, Filip Kastl wrote: > Hi, > > Ok to push if bootstrap and regtest (on x86_64 linux) succeeds? OK. > Thanks, > Filip Kastl > > > -- 8< -- > > > I increment the index variable in a loop even when I do > vec::unordered_remove() which causes the vector traversal to miss some

[committed] libstdc++: Make test use instead of

2025-04-05 Thread Jonathan Wakely
Our ensures that LLONG_MIN, LLONG_MAX, and ULLONG_MAX are defined even if the C library's doesn't define them. Our then includes , which should mean that and always define the same macros. However, we only install our own version of for --enable-cheaders=c and not for the default --enable-che

Re: [PATCH] nvptx: In offloading compilation, special-case certain host-setup symbol aliases [PR101544]

2025-04-05 Thread Jason Merrill
On 3/20/25 11:35 AM, Thomas Schwinge wrote: Hi! Appears that I'm too dumb to implement : | We "simply" need to transform any symbol aliases into thunks calling the aliasee (or duplicate the bodies, if we must). ..., and implementing pro

[COMMITTED 045/146] gccrs: Use nr2.0 in typechecker

2025-04-05 Thread arthur . cohen
From: Owen Avery I probably missed a few spots, but this should cover most of the type checker. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc: Add includes. (TypeCheckExpr::visit): Use name resolver 2.0. (TypeCheckExpr::resolve_operator_overload): Likewise.

[COMMITTED 022/146] gccrs: fix ICE for placeholder which is not setup

2025-04-05 Thread arthur . cohen
From: Philip Herron We can have a case where the placeholder is not configred and the can_resolve check is not detecting this case which can lead to ICE. gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (PlaceholderType::can_resolve): check for empty mappings Signed-off-by: Philip Herron

[COMMITTED] Doc: Improve wording of -Werror documentation [PR58973]

2025-04-05 Thread Sandra Loosemore
gcc/ChangeLog PR driver/58973 * common.opt (Werror, Werror=): Use less awkward wording in description. (pedantic-errors): Likewise. * doc/invoke.texi (Warning Options): Likewise for -Werror and -Werror= here. Co-Authored-By: GUO Yixuan --- gcc/comm

[PATCH v2 3/7] MIPSR6: Fix ICE occurred in R6 target

2025-04-05 Thread Aleksandar Rakic
From: Jaydeep Patil Fix ICE occurred in R6 target due to a clobber-list introduced in MADD/MSUB during combine pass. gcc/ * config/mips/mips.md: Define new splitters for MADD/MSUB on the r6 target. Cherry-picked 180f74c8ebdf13ddac806695d0333af7b924c402 from https://github.com/MI

[COMMITTED 102/146] gccrs: add support for lang_item eq and PartialEq trait

2025-04-05 Thread arthur . cohen
From: Philip Herron The Eq and Partial Ord are very similar to the operator overloads we support for add/sub/etc... but they differ in that usually the function call name matches the name of the lang item. This time we need to have support to send in a new path for the method call on the lang ite

[COMMITTED 24/35] gccrs: Add new test to highlight namespace for self import

2025-04-05 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/self_import_namespace.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- .../rust/compile/self_import_namespace.rs | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 gcc/testsuite/r

[COMMITTED 121/144] rust: Add support for Clone and Copy derive on generic types

2025-04-05 Thread arthur . cohen
From: Philip Herron When we generate derivations for Copy and Clone we need to make sure the associated impl block sets up the generic parameters and arguments correctly. This patch introduces the framework to copy chunks of the AST because we need to make sure these new AST nodes have their own

Re: [PATCH] Further use of mod_scope in modified_type_die

2025-04-05 Thread Eric Botcazou
> Let's involve Eric here, I have no idea what was intended here. We discussed it with Tom internally and he makes the final decisions here. -- Eric Botcazou

[COMMITTED 110/146] gccrs: add two more tests to test try-catch (unwind) code generation

2025-04-05 Thread arthur . cohen
From: liushuyu gcc/testsuite/ChangeLog: * rust/compile/try-catch-unwind-old.rs: add a test to test the older try intrinsics from plain old Rust to v1.78.0 * rust/compile/try-catch-unwind-new.rs: add a test to test the newer catch_unwind instrinsics since Rust v1.78

Re: [PATCH v3] libstdc++: Provide formatter for vector::reference [PR109162]

2025-04-05 Thread Jonathan Wakely
On 04/04/25 11:20 +0200, Tomasz Kamiński wrote: This patch implement formatter for vector::reference which is part of P2286R8. To indicate partial support we define __glibcxx_format_ranges macro value 1, without defining __cpp_lib_format_ranges. To avoid including the whole content of the head

[PATCH] libstdc++: Make debug iterator pointer sequence const [PR116369]

2025-04-05 Thread François Dumont
Hi Following this previous patch https://gcc.gnu.org/pipermail/libstdc++/2024-August/059418.html I've completed it for the _Safe_unordered_container_base type and implemented the rest of the change to store the safe iterator sequence as a pointer-to-const.     libstdc++: Make debug iterator

Re: [PATCH] rtlanal, i386: Adjust pattern_cost and x86 constant cost [PR115910]

2025-04-05 Thread Richard Sandiford
Richard Biener writes: >> Am 02.04.2025 um 18:31 schrieb Jakub Jelinek : >> >> Hi! >> >> Below is an attempt to fix up RTX costing P1 caused by r15-775 >> https://gcc.gnu.org/pipermail/gcc-patches/2024-May/thread.html#652446 >> @@ -21562,7 +21562,8 @@ ix86_rtx_costs (rtx x, machine_mode mode, i

Re: [PATCH] target/119549 - fixup handling of -mno-sse4

2025-04-05 Thread Jakub Jelinek
On Mon, Mar 31, 2025 at 03:12:56PM +0200, Richard Biener wrote: > The following fixes ix86_handle_option to properly handle -mno-sse4 > which is always handled as -msse4 with value unset. I've verified > no other OPT_mno_* is left around. > > Bootstrap and regtest running on x86_64-unknown-linux-

Re: [PATCH] sra: Clear grp_same_access_path of acesses created by total scalarization (PR118924)

2025-04-05 Thread Richard Biener
On Mon, 31 Mar 2025, Martin Jambor wrote: > Hi, > > during analysis of PR 118924 it was discussed that total scalarization > invents access paths (strings of COMPONENT_REFs and possibly even > ARRAY_REFs) which did not exist in the program before which can have > unintended effects on subsequent

Re: [PATCH 2/3] libstdc++: Fix localized D_T_FMT %c formatting for [PR117214]

2025-04-05 Thread Tomasz Kaminski
On Thu, Mar 20, 2025 at 10:31 AM Jonathan Wakely wrote: > From: XU Kailiang > > Formatting a time point with %c was implemented by calling > std::vprint_to with format string constructed from locale's D_T_FMT > string, but in some locales this string contains strftime specifiers > which are not

[PATCH 1/3] libstdc++: Use formatting locale for std::time_put formats

2025-04-05 Thread Jonathan Wakely
When using std::time_put to format a chrono value, we should imbue the formatting locale into the stream. This ensures that when std::time_put::do_put uses a ctype or __timepunct facet from the locale, it gets the correct facets. libstdc++-v3/ChangeLog: * include/bits/chrono_io.h (__forma

[PATCH v4] libstdc++: Add P1206R7 range operations to std::deque [PR111055]

2025-04-05 Thread Tomasz Kamiński
This is another piece of P1206R7, adding from_range constructor, append_range, prepend_range, insert_range, and assign_range members to std::deque. For append_front of input non-sized range, we are emplacing element at the front and then reverse inserted elements. This does not existing elements,

[COMMITTED 007/146] gccrs: Use name resolver 2.0 in CompileTraitItem

2025-04-05 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-implitem.cc (CompileTraitItem::visit): Use name resolver 2.0 (when enabled) to obtain canonical paths for instances of TraitItemConst and TraitItemFunc. Signed-off-by: Owen Avery --- gcc/rust/backend/r

[COMMITTED 091/141] gccrs: expand: Allow built-in derives to generate multiple items

2025-04-05 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive.cc (DeriveVisitor::derive): Return a vector of items. * expand/rust-derive.h: Change return type. * expand/rust-expand-visitor.cc: Insert all generated items into the AST. --- gcc/rust/expand/rust-derive.cc

[PATCH] aarch64: change another CRC test

2025-04-05 Thread Sam James
Fixed the iteration number in crc-crc32-data16.c test from 8 to 16 to match the test name, just like in r15-9038-gdf55a933cfc675. gcc/testsuite/ChangeLog: * gcc.target/aarch64/crc-crc32-data16.c: Fix iteration count to match testname. --- Do we need this as well? Untested so far.

[COMMITTED 053/146] gccrs: allow casts from numeric types to floats

2025-04-05 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3261 gcc/rust/ChangeLog: * typecheck/rust-casts.cc (TypeCastRules::cast_rules): allow casts to float gcc/testsuite/ChangeLog: * rust/compile/issue-3261.rs: New test. Signed-off-by: Philip Herron --- gcc/rust/typecheck/rust-casts.cc

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

2025-04-05 Thread Michael Meissner
This is version 5 of the patch. In version 5 of the patch, I added the 'class' keyword in declaring the enumeration. In versions 4 of the patch, I changed the use of enums to match current C++. In version 3, I made the following changes: 1: The new argument to rs6000_reverse_condition that

Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533]

2025-04-05 Thread Vineet Gupta
On 4/1/25 17:44, Jeff Law wrote: > On 4/1/25 12:15 PM, Vineet Gupta wrote: >> On 3/31/25 23:48, Heinrich Schuchardt wrote: >>> On 3/30/25 01:49, Vineet Gupta wrote: changes since v2 - dump log sanfu --- vsetvl phase4 uses LCM guided info to insert VSETVL insns. It h

  1   2   3   >