[COMMITTED 043/141] gccrs: lang-items: Add structural_{peq, teq}

2025-03-24 Thread arthur . cohen
From: Arthur Cohen These lang items are used when deriving Eq and PartialEq, and will be checked when compiling pattern matching. gcc/rust/ChangeLog: * util/rust-lang-item.cc: New items. * util/rust-lang-item.h: Likewise. gcc/testsuite/ChangeLog: * rust/compile/struct

[COMMITTED 109/141] gccrs: ast: Add base for desugaring try expressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * Make-lang.in: Compile it. * ast/rust-desugar-question-mark.cc: New file. * ast/rust-desugar-question-mark.h: New file. gcc/testsuite/ChangeLog: * rust/compile/try-expr1.rs: New test. --- gcc/rust/Make-lang.in

[COMMITTED 041/141] gccrs: Fix an issue with ForeverStack::dfs_rib

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::dfs_rib): Fix const implementation. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-forever-stack.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/rust/reso

[COMMITTED 074/141] gccrs: add diagnostic for E0229 no associated type arguments allowed here

2025-03-24 Thread arthur . cohen
From: Philip Herron It seems bounds in qualified paths are not allowed to specify associated type bindings because its going to be associated with the impl block anyway. Fixes Rust-GCC#2369 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-base.h: add flag * typecheck/rust-hi

[COMMITTED 042/141] gccrs: nr2.0: late: Add proper handling for lang item PathInExpressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Special case lang item paths. --- gcc/rust/resolve/rust-late-name-resolver-2.0.cc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/rust/resolve/rust-late-name-re

[COMMITTED 087/141] gccrs: ast-builder: Improve function generation.

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::block): Change return type. (Builder::loop): Use new APIs. * ast/rust-ast-builder.h: Change return type of block functions. --- gcc/rust/ast/rust-ast-builder.cc | 22 +++--- gcc/ru

[COMMITTED 096/141] gccrs: Fix expansion of macros inside modules

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Override DefaultASTVisitor in order to expand a module's items, rather than directly visit them. * expand/rust-expand-visitor.h (ExpandVisitor::visit): Add overrid

[COMMITTED 037/141] gccrs: lang-items: Add From::from

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-lang-item.h: Declare it. * util/rust-lang-item.cc: Use it. --- gcc/rust/util/rust-lang-item.cc | 2 ++ gcc/rust/util/rust-lang-item.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/gcc/rust/util/rust-lang-item.cc b/gcc

[COMMITTED 095/141] gccrs: Remove PathInExpression::get_pattern_node_id

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-path.h (PathInExpression::get_pattern_node_id): Remove. Signed-off-by: Owen Avery --- gcc/rust/ast/rust-path.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index c253703

[COMMITTED 099/141] gccrs: derive(Debug): Use builder's ptrify function instead

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-debug.cc (ptrify): Remove function. --- gcc/rust/expand/rust-derive-debug.cc | 8 1 file changed, 8 deletions(-) diff --git a/gcc/rust/expand/rust-derive-debug.cc b/gcc/rust/expand/rust-derive-debug.cc index f3754745

[COMMITTED 078/141] gccrs: improve error diagnostic for bad type-resolution in CallExpr

2025-03-24 Thread arthur . cohen
From: Philip Herron We have the type information for the resolved call lets tell the user about it in the diagnostic and apply the correct error code. Fixes Rust-GCC#2035 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): improve error diag gcc/testsu

[COMMITTED 131/141] gccrs: Remove mangling tests from exclusion list

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those tests are now passing. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove two mangling tests from exclusion file. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 2 -- 1 file changed, 2 deletions(-)

[COMMITTED 081/141] gccrs: nr2.0: Resolve paths which start with Self

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::find_starting_point): Be more careful about applying ForeverStack::find_closest_module. (ForeverStack::resolve_segments): Allow traversal into parent nodes when not in a m

[COMMITTED 086/141] gccrs: derive(Eq): Add implementation.

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive.cc (DeriveVisitor::derive): Call into DeriveEq. * expand/rust-derive-eq.cc: New file. * expand/rust-derive-eq.h: New file. * Make-lang.in: Compile them. gcc/testsuite/ChangeLog: * rust/compile/d

[COMMITTED 125/141] gccrs: Move import mapping resolution to in tree visit

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Import mapping was relying on resolve_path which in turn relies on the cursor function. This means the mapping resolver should be called from the correct scope instead of being called from the crate scope. gcc/rust/ChangeLog: * resolve/rust-early-name-resolve

Re: [PATCH] libgcobol: C++-ify the configuration steps.

2025-03-24 Thread Iain Sandoe
Hi > On 24 Mar 2025, at 14:50, Robert Dubner wrote: > > No I am not sure what to do. > > I tried to apply this patch, both the the master branch and to one of my > working copies. My apologies, some of what I am doing depends on the work that you, Richi and Jakub have been doing, and so I ha

[PATCH 2/2] [COBOL] Remove unused _Float128 using helpers

2025-03-24 Thread Richard Biener
Tested on x86_64-unknown-linux-gnu. The only remaining _Float128 use is now via the strtof128 inline which is used in two places to commpute the end of a numeric literal and verify against the parsed end(?) to do diagnostics. I'm not sure why or whether this is necessary - I'd have expected lexi

[COMMITTED 136/141] gccrs: Prevent multiple resolution insertion

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * expand/rust-derive-clone.cc (DeriveClone::clone_impl): Avoid using the same node id multiple times. (DeriveClone::clone_enum_identifier): Likewise. (DeriveClone::clone_enum_tuple): Likewise. * expand/rust-deri

[pushed] c++: pack indexing and if consteval

2025-03-24 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The pack index is manifestly constant-evaluated, and the call to maybe_constant_value needs to reflect that or we wrongly complain about non-constant index if the evaluation uses if consteval. gcc/cp/ChangeLog: * semantics.cc (fini

Re: [PATCH] libstdc++: Fix handling of common cpp20-only ranges for flat sets [PR119415]

2025-03-24 Thread Patrick Palka
On Mon, 24 Mar 2025, Tomasz Kamiński wrote: > These patch add check to verify if common range iterators satisfies > Cpp17LegacyIterator requirements (__detail::__cpp17_input_iterator), > before invoking overloads of insert that accepts two iterators. > As such overloads existed before c++20 iterat

Re: [PATCH] Fix up some further cases of missing or extraneous spaces in diagnostics

2025-03-24 Thread Joseph Myers
On Sat, 22 Mar 2025, Jakub Jelinek wrote: > On Sat, Mar 22, 2025 at 08:18:27AM +0100, Andreas Schwab wrote: > > On Mär 22 2025, Jakub Jelinek wrote: > > > > > I think just the c.opt change needs an explanation, the "" in the > > > description is simply eaten up somewhere during the option process

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

2025-03-24 Thread Kito Cheng
On Mon, Mar 24, 2025 at 11:35 PM Robin Dapp wrote: > > > 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 be

[COMMITTED 039/141] gccrs: ast: Add new Expr::Kinds

2025-03-24 Thread arthur . cohen
From: Arthur Cohen Collapses all of the OperatorExprs into Expr instead of first having to check for OperatorExpr and then check for each OperatorExpr::Kind. gcc/rust/ChangeLog: * ast/rust-ast.h: Add new Expr::Kinds. * ast/rust-expr.h: Implement missing get_expr_kind(), Add ge

[COMMITTED 033/141] gccrs: Resolved item type shall be differentiated later

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry We need to query all namespaces and error out at a later stage if the retrieved item is wrong. gcc/rust/ChangeLog: * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_path_to_trait): Query all namespaces. Signed-off-by: Pierre-Emmanuel Pat

[COMMITTED 113/141] gccrs: nr2.0: Make sure PathInExpression is default resolved

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Call DefaultResolver::visit earlier, in order to ensure it is called even if Late::visit returns early. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entri

[COMMITTED 050/141] gccrs: ast: builder: Add Return expression builder

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.h: Declare it. * ast/rust-ast-builder.cc (Builder::return_expr): Define it. --- gcc/rust/ast/rust-ast-builder.cc | 7 +++ gcc/rust/ast/rust-ast-builder.h | 4 2 files changed, 11 insertions(+) diff --git a/

[COMMITTED 067/141] gccrs: session manager: Call into DesugarForLoops

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * rust-session-manager.cc (Session::compile_crate): Call the visitor. --- gcc/rust/rust-session-manager.cc | 4 1 file changed, 4 insertions(+) diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 3adde297a4e

[PATCH] PR middle-end/119442: expr.cc: Fix vec_duplicate into vector boolean modes

2025-03-24 Thread Kyrylo Tkachov
Hi all, In this testcase GCC tries to expand a VNx4BI vector: vector(4) _40; _39 = () _24; _40 = {_39, _39, _39, _39}; This ends up in a scalarised sequence of bitfield insert operations. This is despite the fact that AArch64 provides a vec_duplicate pattern specifically for vec_duplicate into V

[COMMITTED 065/141] gccrs: ast: builder: Fix arguments of Builder::let

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.h: Mark all arguments as &&. * ast/rust-ast-builder.cc (Builder::let): Likewise. --- gcc/rust/ast/rust-ast-builder.cc | 4 ++-- gcc/rust/ast/rust-ast-builder.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletion

[COMMITTED 038/141] gccrs: add support for ref literal patterns

2025-03-24 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3174 gcc/rust/ChangeLog: * backend/rust-compile-pattern.cc (CompilePatternBindings::visit): make recursive * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): handle ref flag gcc/testsuite/ChangeLog: * rust/compile

[COMMITTED 052/141] gccrs: Fix bug in type resolution of paths

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_glob_import): Use NameResolutionContext::resolve_path instead of ForeverStack::resolve_path. (Early::visit): Likewise. (Early::visit_attributes): Likewis

[COMMITTED 053/141] gccrs: Fix ICE when fn_once and fn_once_output lang item is not defined

2025-03-24 Thread arthur . cohen
From: Philip Herron We needed to check for the optional has a value here or not it leads to an ICE. gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (ClosureType::setup_fn_once_output): add checks for lang items Signed-off-by: Philip Herron --- gcc/rust/typecheck/rust-tyty.cc | 22 +

[COMMITTED 021/141] gccrs: hir: Add LangItem paths to PathPattern class

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * hir/tree/rust-hir-path.h: Adapt PathPattern to accept lang-item paths. * hir/tree/rust-hir-path.cc: Assert we are dealing with a segmented path, create lang-item constructors. * hir/tree/rust-hir.cc (PathPattern::convert_t

[COMMITTED 027/141] gccrs: Add debug dump to old name resolver

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry It might be necessary to compare both name resolution' internal states during the transition. This new debug representation could help with that. gcc/rust/ChangeLog: * resolve/rust-name-resolver.h: Add new degug dump for old name resolver. Signed-off

[COMMITTED 029/141] gccrs: Remove query mode on CompileItem

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Query mode was a hack to catch up some compile errors early, it was deemed to be removed at some time. Recent changes to NR1 highlighted an incompatibility with it hence it's removal. gcc/rust/ChangeLog: * backend/rust-compile-item.h: Remove query mode.

[COMMITTED 056/141] gccrs: Fix crash in privay reporter for placeholder types

2025-03-24 Thread arthur . cohen
From: Philip Herron This guards against a crash but i think this should actually be treated as if its a generic type like below. But for now this addresses a crash which can occur. gcc/rust/ChangeLog: * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_base_type_p

[COMMITTED 057/141] gccrs: Fix bad generic substitution error on fn/adt types

2025-03-24 Thread arthur . cohen
From: Philip Herron When passing generics around we try to adjust them because there are cases where the names are adjusted from other generics this can fail for traits because of the implicit Self and we just need to continue on without adjustment. Fxies Rust-GCC#3382 gcc/rust/ChangeLog:

[COMMITTED 059/141] gccrs: ast-builder: Add methods for QualifiedPathInExpressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::qualified_path_in_expression): New. (Builder::function): Change the return type. * ast/rust-ast-builder.h: Declare qualified_path_in_expression functions. * expand/rust-derive-debug.cc (De

[COMMITTED 026/141] gccrs: Labels shall be pushed within label namespace

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Labels were using the wrong namespace. gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Change label push function from type rib to label rib. * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): L

[COMMITTED 019/141] gccrs: lang-items: Add LangItem::IsEnumVariant

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-lang-item.cc (LangItem::IsEnumVariant): New function. * util/rust-lang-item.h: Declare it. --- gcc/rust/util/rust-lang-item.cc | 9 + gcc/rust/util/rust-lang-item.h | 5 - 2 files changed, 13 insertions(+), 1 deleti

[COMMITTED 060/141] gccrs: derive(Default): Add implementation

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive.cc (DeriveVisitor::derive): Call DeriveDefault. * expand/rust-derive-default.cc: New file. * expand/rust-derive-default.h: New file. * Make-lang.in: Compile them. gcc/testsuite/ChangeLog: * rust

[COMMITTED 072/141] gccrs: enum type layout needs to respect the enum repr type

2025-03-24 Thread arthur . cohen
From: Philip Herron Addresses Rust-GCC#3352 gcc/rust/ChangeLog: * backend/rust-compile-type.cc (TyTyResolveCompile::get_implicit_enumeral_node_type): use repr (TyTyResolveCompile::visit): update prototype * backend/rust-compile-type.h: likewise Signed-off-by: P

[COMMITTED 082/141] gccrs: Add type check on if-expr

2025-03-24 Thread arthur . cohen
From: Benjamin Thos Check if an if-expr returns void type or a coercible type like an early return. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Add check on if-expr. gcc/testsuite/ChangeLog: * rust/compile/implicit_returns_err3.r

Re: [PATCH 06/10] testsuite: aarch64: arm: Add -mfpu=auto to arm_v8_2a_bf16_neon_ok

2025-03-24 Thread Christophe Lyon
On Mon, 24 Mar 2025 at 15:13, Richard Earnshaw (lists) wrote: > > On 21/03/2025 17:30, Christophe Lyon wrote: > > On Fri, 21 Mar 2025 at 16:51, Richard Earnshaw (lists) > > wrote: > >> > >> On 21/03/2025 15:15, Christophe Lyon wrote: > >>> On Fri, 21 Mar 2025 at 15:25, Richard Earnshaw (lists) >

Re: [Patch, Fortran] C prototypes for functions returning C function pointers

2025-03-24 Thread Harald Anlauf
Hi Thomas, Am 24.03.25 um 22:28 schrieb Thomas Koenig: Hi Harald, the attached patch contains a chunk changing resolve.cc that is neither described in the suggested commit message, and it fails to compile here: ../../gcc-trunk/gcc/fortran/resolve.cc: In function 'void check_c_funptr_assign_in

[committed] libstdc++: Add testcases for resolved bug [PR101527]

2025-03-24 Thread Jonathan Wakely
These tests were fixed by a front-end change r13-465-g4df735e01e3199 so this just adds them to the testsuite to be sure we don't regress. libstdc++-v3/ChangeLog: PR libstdc++/101527 * testsuite/24_iterators/common_iterator/101527.cc: New test. * testsuite/24_iterators/coun

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

2025-03-24 Thread James K. Lowden
On Thu, 20 Mar 2025 13:30:27 +0100 (CET) Richard Biener wrote: > @@ -4126,7 +4137,11 @@ count: %empty { $$ = 0; } > if( e ) { // verify not floating point with nonzero fraction > auto field = cbl_field_of(e); > assert(is_liter

Re: [PATCH] vect: Add assert to expand_vector_conversion [PR118616]

2025-03-24 Thread Andrew Pinski
On Mon, Mar 24, 2025 at 2:00 AM Richard Biener wrote: > > On Sun, Mar 23, 2025 at 9:46 PM Andrew Pinski > wrote: > > > > In some cases (after inliing due to LTO and -O3), GCC cannot > > figure out that the length of the converts vect is not empty > > when supportable_indirect_convert_operation r

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

2025-03-24 Thread Florian Weimer
* Michael Meissner: > +enum reverse_cond_t { > + REVERSE_COND_ORDERED_OK, > + REVERSE_COND_NO_ORDERED > +}; This should probably be something like enum reverse_cond_t { ordered_ok, no_ordered, }; to inhibit implicit conversion to integer types and bool. (Completely untested.) > + > ex

[committed] libgomp: Save OpenMP device number when initializing the interop object (was: [Patch] libgomp/plugin/plugin-nvptx.c: Fix device used for stream creation)

2025-03-24 Thread Tobias Burnus
Hi Thomas, Short answer: both are about devices, but otherwise completely separate. And: Thanks for testing and the report, which shows that having at least one system with multiple GPUs makes sense! * * * Attached patch fixes the here reported issue by setting the device number - which featur

RE: [PATCH 2/2] [COBOL] Remove unused _Float128 using helpers

2025-03-24 Thread Robert Dubner
Jim will be ready with some additional changes Tuesday morning. Those will be on top of the entire Pile O'Patches that were mostly authored by you and Jakub. I'll prepare the commit for the whole shebang when he's done. > -Original Message- > From: Richard Biener > Sent: Monday, Mar

[wwwdocs] Add Ada's GCC 15 changelog entry

2025-03-24 Thread Fernando Oleo Blanco
Dear GCC maintainers, I have written the GCC 15 changelog for Ada. I am attaching the patch to the email. It has already had an initial review by Marc, but feel free to comment on it and request any changes. Best regards, Fernando Oleo BlancoFrom 733eeb430068eb59982c28c43c321db5866685d0 Mon Sep

[PATCH] i386: Fix AVX10.2 sat cvt intrinsic.

2025-03-24 Thread Hu, Lin1
Hi, all The patch aims to modify the missed fixed for vcvttph2iubs's testcase. Bootstrapped and tested on x86_64-linux-gnu{-m32,-m64}. Commited as obvious change like the previous approved fix patch. BRs, Lin gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c: Mod

RE: [PATCH] cobol: Move includes before system.h

2025-03-24 Thread Robert Dubner
I'm going to take your word on this one. LGTM > -Original Message- > From: Iain Sandoe > Sent: Monday, March 24, 2025 06:21 > To: jklow...@cobolworx.com; rdub...@symas.com; gcc-patches@gcc.gnu.org > Subject: [PATCH] cobol: Move includes before system.h > > A trivial patch that ensures h

[COMMITTED 117/141] gccrs: Keep definition provenance to skip enum variants

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Enum variants shouldn't be accessed directly even from within an enum. This commit keeps the provenance for enum variants definition so we can skip them when resolving a value within an enum definition. gcc/rust/ChangeLog: * resolve/rust-forever-stack.h: Add

[COMMITTED 073/141] gccrs: remove name resolution inserts from type-path

2025-03-24 Thread arthur . cohen
From: Philip Herron We resolve path segments and inserted their resolution into the name resolution space which was an old hack to use this as information in code-gen/check-passes in order to help things move forward but this is not nessecary gcc/rust/ChangeLog: * typecheck/rust-hir-typ

[COMMITTED 123/141] gccrs: track DefId on ADT Types this could be useful information

2025-03-24 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): track DefId of origin * typecheck/rust-tyty.cc (BaseType::monomorphized_clone): likewise (ADTType::ADTType): likewise (ADTType::get_id): likewise (ADTT

[COMMITTED 102/141] gccrs: Adjust type path resolution error message

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Adjust error message to match the 2.0 name resolver. gcc/testsuite/ChangeLog: * rust/compile/additional-trait-bounds2.rs: Adjust expected errors.

Re: [PATCH v2] libstdc++: Fix std::vector::append_range for overlapping ranges

2025-03-24 Thread Patrick Palka
On Mon, 24 Mar 2025, Jonathan Wakely wrote: > Unlike insert_range and assign_range, the append_range function does not > have a precondition that the range doesn't overlap *this. That means we > need to avoid relocating the existing elements until after copying from > the range. This means I need

[COMMITTED 077/141] gccrs: self paths are patterns but we dont have mappings for it

2025-03-24 Thread arthur . cohen
From: Philip Herron With simple patterns we dont introduce any more inference varaibles as they are already declared in a specific way. This would only lead to more unconstrained inference varaibles than is required. Fixes Rust-GCC#3022 gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc

[COMMITTED 114/141] gccrs: expansion: Correctly expand $crate metavar

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.cc: Use new SubstituteCtx API. * expand/rust-macro-expand.h: Likewise. * expand/rust-macro-substitute-ctx.cc: Implement proper expansion of $crate. * expand/rust-macro-substitute-ctx.h: Adapt APIs

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

2025-03-24 Thread Jakub Jelinek
On Mon, Mar 24, 2025 at 02:36:31PM +0100, Paul-Antoine Arras wrote: > Hi Thomas, > > On 24/03/2025 13:47, Thomas Schwinge wrote: > > On 2025-03-21T18:35:57+0100, Paul-Antoine Arras wrote: > > > --- /dev/null > > > +++ b/gcc/testsuite/gfortran.dg/gomp/interop-5.f90 > > > @@ -0,0 +1,21 @@ > > > +!

RE: [PATCH] libgcobol: use standard f128 suffix instead of Q for _Float128 literals

2025-03-24 Thread Robert Dubner
You and Iain Sandoe should coordinate on this one, given the work he's doing on libquadmath. > -Original Message- > From: Andreas Schwab > Sent: Monday, March 24, 2025 06:42 > To: gcc-patches@gcc.gnu.org > Cc: jklow...@cobolworx.com; rdub...@symas.com > Subject: [PATCH] libgcobol: use sta

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

2025-03-24 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Monday, March 24, 2025 05:04 > To: Robert Dubner > Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] change cbl_field_data_t::etc_t::value from _Float128 > to tree > > On Sun, 23 Mar 2025, Robert Dubner wrote: > > >

RE: [PATCH] libgcobol: Ensure that config.h is included.

2025-03-24 Thread Robert Dubner
I am taking your word for it on testing. LGTM > -Original Message- > From: Iain Sandoe > Sent: Monday, March 24, 2025 05:01 > To: jklow...@cobolworx.com; rdub...@symas.com; gcc-patches@gcc.gnu.org > Subject: [PATCH] libgcobol: Ensure that config.h is included. > > This one is quite simp

[PATCH 2/2] testsuite, cobol: If libgcobol has a .spec file use it.

2025-03-24 Thread Iain Sandoe
This conditionally adds a path for libgcobol when that contains libgcobol.spec. gcc/testsuite/ChangeLog: * lib/cobol.exp: Conditionally add a path for libgcobol.spec. Signed-off-by: Iain Sandoe --- gcc/testsuite/lib/cobol.exp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) d

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

2025-03-24 Thread Paul-Antoine Arras
On 21/03/2025 20:17, Sandra Loosemore wrote: On 3/21/25 11:35, Paul-Antoine Arras wrote: Thanks Sandra and Jakub for your comments. Here is attached an updated version of the patch: * Removed special case for n==1, now use an array even when only one interop object is passed. * Updated scan

RE: [PATCH] libgcobol: Only use random_r if it is available [PR119295]

2025-03-24 Thread Robert Dubner
Taking your word on testing, LGTM > -Original Message- > From: Iain Sandoe > Sent: Sunday, March 23, 2025 20:59 > To: jklow...@schemamania.org; rdub...@symas.com; gcc-patches@gcc.gnu.org > Subject: [PATCH] libgcobol: Only use random_r if it is available > [PR119295] > > Tested on x86_64

[committed] testsuite: d: Break up Wbuiltin_declaration_mismatch2.d into smaller tests

2025-03-24 Thread Iain Buclaw
Hi, This patch splits Wbuiltin_declaration_mismatch2.d into multiple tests. When looking at failures on ARM64, this aided in understanding which specific tests weren't passing. Regression tested on x86_64-linux-gnu, committed to mainline. Regards, Iain. --- gcc/testsuite/ChangeLog: * g

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

2025-03-24 Thread Kito Cheng
On Mon, Mar 24, 2025 at 6:53 PM Robin Dapp wrote: > > Hi Kito, > > > So valid range fractional LMUL for SEW=8, 16 32 are: > > > > mf8 = [8, (1/8)*32] = [8, 4] = [], no SEW is valid with mf8 for ELEN = 32 > > mf4 = [8, (1/4)*32] = [8, 8] = only SEW 8 with mf4 is valid > > mf2 = [8, (1/2)*32] = [8,

[PATCH 0/2] cobol: Add a library spec (lingcobol.spec).

2025-03-24 Thread Iain Sandoe
This adds support for target-configured specs for library-specific specs. Initially, we will use this for the libm (but it's then required by other pending patches). The first patch adds to the driver and the library, the second makes the spec available to in-tree testing. tested on x86_64-linux

Re: [PATCH v2] libstdc++: Fix std::vector::append_range for overlapping ranges

2025-03-24 Thread Jonathan Wakely
On Mon, 24 Mar 2025 at 14:18, Patrick Palka wrote: > > On Mon, 24 Mar 2025, Jonathan Wakely wrote: > > > Unlike insert_range and assign_range, the append_range function does not > > have a precondition that the range doesn't overlap *this. That means we > > need to avoid relocating the existing el

[COMMITTED 127/141] gccrs: Remove finalize import visitor

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry This visitor is not used anymore. gcc/rust/ChangeLog: * resolve/rust-finalize-imports-2.0.cc (FinalizeImports::FinalizeImports): Remove constructor. (FinalizeImports::go): Remove function. (FinalizeImports::visit): Likewise. *

[COMMITTED 023/141] gccrs: marklive: Fix handling for lang item PathInExpressions.

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * checks/lints/rust-lint-marklive.cc (MarkLive::visit): Adapt to lang items. --- gcc/rust/checks/lints/rust-lint-marklive.cc | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/rust/checks/lints/rust-lint-mark

[COMMITTED 018/141] gccrs: mappings: Improve error message for get_lang_item_node

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-hir-map.cc (Mappings::get_lang_item_node): Better formatting when a lang item does not exist when it should. --- gcc/rust/util/rust-hir-map.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/rust/uti

[COMMITTED 002/141] gccrs: typecheck: Add basic handling for applying auto trait bounds

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Register auto traits in mappings. * util/rust-hir-map.cc (Mappings::insert_auto_trait): New. (Mappings::get_auto_traits): New. * util/rust-hir-map.h: Declare them.

[COMMITTED 034/141] gccrs: Compile unit struct with constructor

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): Do not use query system for unit struct but compile it's constructor instead. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/backend/rust-compile-resolv

[COMMITTED 028/141] gccrs: Add unit struct to name namespace in old resolver

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry We missed the name namespace for unit struct in the old resolver. gcc/rust/ChangeLog: * resolve/rust-ast-resolve-toplevel.h: Add struct to name namespace. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-ast-resolve-toplevel.h | 23 ++

[COMMITTED 112/141] gccrs: Reduce usage of rust-session-manager.h

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * util/rust-edition.cc: New file. * util/rust-edition.h: New file. * Make-lang.in: Add rust-edition.o to the object list. * ast/rust-pattern.cc: Remove inclusion of rust-session-manager.h. * expand/rust-macro-e

[COMMITTED 115/141] gccrs: nr2.0: Set the node id of the root node

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack::ForeverStack): Set the node id of the root node to that of the current crate. * resolve/rust-forever-stack.hxx (ForeverStack::find_starting_point): Use the node id of the ro

[COMMITTED 090/141] gccrs: derive(PartialEq): Add partial implementation

2025-03-24 Thread arthur . cohen
From: Arthur Cohen We are still missing some deriving for enums, as part of our codegen and nameres for rebinding struct field patterns is missing. gcc/rust/ChangeLog: * expand/rust-derive-partial-eq.cc: New file. * expand/rust-derive-partial-eq.h: New file. * expand/ru

[COMMITTED 129/141] gccrs: Insert crate name in canonical path

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx: Insert a new segment with the crate's name as canonical's path prefix. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-forever-stack.hxx | 7 ++- 1 file changed, 6 insertions(+

[COMMITTED 120/141] gccrs: Add a test for enum variant name resolution

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Highlight the fact that a value inside an enum definition refers to a struct outside of the enum and not to the enum variant's name directly. gcc/testsuite/ChangeLog: * rust/compile/enum_variant_name.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- g

[COMMITTED 132/141] gccrs: nr2.0: Check compile/torture/*.rs tests

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/nr2/compile.exp: Adjust to cover tests in the torture subdirectory. * rust/compile/nr2/exclude: Add entries. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/nr2/compile.exp | 6 ++ gcc/testsuite/rus

[COMMITTED 088/141] gccrs: ast-builder: Add new methods for creating operator expressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::literal_bool): New method. (Builder::comparison_expr): Likewise. (Builder::boolean_operation): Likewise. * ast/rust-ast-builder.h: Declare them. --- gcc/rust/ast/rust-ast-builder.cc | 46 +

[COMMITTED 124/141] gccrs: check for recursion trait cycle with bounds checks

2025-03-24 Thread arthur . cohen
From: Philip Herron We need to be careful when doing bounds check as to not create a recusive trait resolution. This patch checks for that case and fixes a bad type is equal check on ADT Types which was caught with a regression here. Fixes Rust-GCC#3126 gcc/rust/ChangeLog: * typecheck/

[COMMITTED 078/146] gccrs: implement the TuplePattern and use it for function patterns

2025-03-24 Thread arthur . cohen
From: Philip Herron In order to handle the tuple pattern of: fn test ((x _) : (i32, i32)) -> i32 { x } we need to recognize that ABI wise this function still takes a tuple as the parameter to this function its just how we can address the "pattern" of the tuple changes. So reall if this was C i

[COMMITTED 122/144] rust: fix ICE during name resolution for impls on unit-types

2025-03-24 Thread arthur . cohen
From: Philip Herron The canonical paths need to support unit-types which are technically a TupleType with no fields. This handles this case and adds an unreachable. Fixes #3036 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit): add unit-type ca

[COMMITTED 133/141] gccrs: Fix modules with same name as builtins causing ICE (#3315)

2025-03-24 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack): Add a dedicated prelude node for the Language prelude * resolve/rust-forever-stack.hxx (ForeverStack): Add support code for the prelude node * resolve/rust-late-name-re

[PATCH v2] libstdc++: Fix std::vector::append_range for overlapping ranges

2025-03-24 Thread Jonathan Wakely
Unlike insert_range and assign_range, the append_range function does not have a precondition that the range doesn't overlap *this. That means we need to avoid relocating the existing elements until after copying from the range. This means I need to revert r15-8488-g3e1d760bf49d0e which made the fro

[COMMITTED 110/141] gccrs: lower: Error out when lowering ErrorPropagationExpr

2025-03-24 Thread arthur . cohen
From: Arthur Cohen Adapt functions for lowering nodes that should never reach the lowering phase to cause an unreachable, and mark them as final so as it not possible to override them in other visitors. gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc: Adapt functions for ErrorPropaga

Re: [PATCH 06/10] testsuite: aarch64: arm: Add -mfpu=auto to arm_v8_2a_bf16_neon_ok

2025-03-24 Thread Richard Earnshaw (lists)
On 24/03/2025 14:52, Christophe Lyon wrote: > On Mon, 24 Mar 2025 at 15:13, Richard Earnshaw (lists) > wrote: >> >> On 21/03/2025 17:30, Christophe Lyon wrote: >>> On Fri, 21 Mar 2025 at 16:51, Richard Earnshaw (lists) >>> wrote: On 21/03/2025 15:15, Christophe Lyon wrote: > On Fri,

[COMMITTED 134/141] gccrs: emit an error for type or const parameters on foreign items

2025-03-24 Thread arthur . cohen
From: Ryutaro Okada <1015ry...@gmail.com> gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit): emit an error for type or const parameters on foreign items gcc/testsuite/ChangeLog: * rust/compile/extern_generics.rs

[COMMITTED 116/141] gccrs: Add rib kind debug representation

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Rib kind had no string representation, and thus were not used in the debug string representation. gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx: Output rib kind. * resolve/rust-rib.h: Add function to get string representation from a rib

[COMMITTED 097/141] gccrs: Remove some member functions from SingleASTNode

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast.h (SingleASTNode::take_trait_item): Remove. (SingleASTNode::take_impl_item): Remove. (SingleASTNode::take_trait_impl_item): Remove. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Replace

[COMMITTED 092/141] gccrs: derive(PartialEq): Also derive StructuralPartialEq

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-partial-eq.cc: Adapt signatures to generate two impls. * expand/rust-derive-partial-eq.h: Likewise. * expand/rust-derive.cc (DeriveVisitor::derive): Adapt to multiple item generation. gcc/testsuite/ChangeLog:

[COMMITTED 101/141] gccrs: hir-dump: Fix more segfaults in the HIR dump

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * hir/rust-hir-dump.cc: Check unique_ptr members are present before visiting them. * hir/tree/rust-hir-path.h: Add `has_{type, trait}` methods to QualifiedPathInType. --- gcc/rust/hir/rust-hir-dump.cc | 19 ++

[COMMITTED 108/141] gccrs: Adjust unknown macro error message

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::visit): Adjust error produced when macro resolution fails. * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise. gcc/testsuite/ChangeLog:

[COMMITTED 135/141] gccrs: nr2.0: Fix test self-path2.rs

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Adjust the error message for a lower self segment in the middle of a path. * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise. gcc

[COMMITTED 140/141] gccrs: nr2.0: Fix StructExprFieldIdentifier handling

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add visitor for StructExprFieldIdentifier. * resolve/rust-late-name-resolver-2.0.h (Late::visit): Likewise. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude:

  1   2   3   >