[COMMITTED 089/141] gccrs: derive(Clone): chore: Cleanup

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc: Cleanup implementation, avoid repetitions. * expand/rust-derive-clone.h: Likewise. --- gcc/rust/expand/rust-derive-clone.cc | 34 ++-- gcc/rust/expand/rust-derive-clone.h | 8 ---

[COMMITTED 098/141] gccrs: ast: builder: Add new builder methods

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::statementify): New. (Builder::function): Add generic params optional argument. (Builder::path_in_expression): Add opening_scope_resolution optional argument. (Builder::block): Add function

[COMMITTED 121/141] gccrs: Fix some small issues

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-intrinsic.cc (assume_handler): Fix copy/paste error. * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Fix spelling mistake. Signed-off-by: Owen Avery --- gcc/rust/backend/rust-comp

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

2025-03-24 Thread Jonathan Wakely
On Mon, 24 Mar 2025 at 12:40, Tomasz Kaminski wrote: > As a note reserving for empty vector: > + // If there are no existing elements it's safe to allocate now. > + if (__sz == 0) > + reserve(__n); > Will invalidate v.begin(), v.end(), so if the incoming range

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

2025-03-24 Thread Robert Dubner
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, I am loathe to stand in the way of your MacOS progress. It passes my full set of tests, and "make check-co

[COMMITTED 024/146] gccrs: Improve handling of implicit Self parameter in AST

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-item.h (Trait::self_param): Add. (Trait::Trait): Initialize self_param. (Trait::operator=): Copy self_param. (Trait::insert_implicit_self): Remove. (Trait::get_implicit_self): Add. * hir/rust-

Re: [PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-24 Thread Andrew Pinski
On Thu, Mar 20, 2025 at 10:02 AM Andi Kleen wrote: > > On Thu, Mar 20, 2025 at 05:28:48PM +0100, Jakub Jelinek wrote: > > On Thu, Mar 20, 2025 at 09:19:02AM -0700, Andi Kleen wrote: > > > The inlining was just one of the issue, there are some related to > > > different semantics of escaped locals.

[PATCH 1/2] cobol, driver, libgcobol: Add support for libgcobol.spec.

2025-03-24 Thread Iain Sandoe
Ads support for using a library spec file (e.g. to include the target requirements for non-standard libraries - or even libm which we can now configure at the target side). gcc/cobol/ChangeLog: * gcobolspec.cc (SPEC_FILE): New. (lang_specific_driver): Make the 'need libgcobol' fla

[COMMITTED 138/141] gccrs: Modify multiple definition error

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Modify error message. * resolve/rust-ast-resolve-implitem.h (ResolveToplevelImplItem::visit): Likewise. (ResolveTopLevelTraitItems::visit): Likewise. (Res

[COMMITTED 141/141] gccrs: support generic super traits recursively

2025-03-24 Thread arthur . cohen
From: Philip Herron In order to handle generic super traits on any trait bound we need to ensure we track the TypeBoundPredicate as part of the TraitReference instead of just the raw TraitReferences because these will have any applied generics enplace. Then for any TypeBoundPredicate it takes a

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 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) >>> wrote: On 21/03/2025 14:05, Christophe Lyon wrote: > On Fri,

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

2025-03-24 Thread Robert Dubner
Thank you for all that. And, yes, I did a global replace on /t instead of \t, and I feel suitably stupid about that. I'll fix all that up. When we're ready to go with it. > -Original Message- > From: Jakub Jelinek > Sent: Monday, March 24, 2025 07:07 > To: Robert Dubner ; James K. Lowde

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-03-24 Thread Christoph Müllner
On Mon, Mar 24, 2025 at 3:44 AM Bohan Lei wrote: > > The combine pass can generate an index like (and:DI (mult:DI (reg:DI) > (const_int scale)) (const_int mask)) when XTheadMemIdx is available. > LRA may pull it out, and thus a splitter is needed when Zba is not > available. > > A similar splitter

[COMMITTED 003/141] gccrs: lang-item:Add LangItem::Kind::RECEIVER

2025-03-24 Thread arthur . cohen
From: lishin Add and implement a lang item (receiver) in source code. gcc/rust/ChangeLog: * util/rust-lang-item.cc: Add receiver to map. * util/rust-lang-item.h: Define LangItem::Kind::RECEIVER. gcc/testsuite/ChangeLog: * rust/compile/issue-2954.rs: New test. Signed-o

[COMMITTED 007/141] gccrs: derive(Clone): Use lang item bounds on AssertParamIsCopy

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc (DeriveClone::visit_union): Use lang items for Copy and Sized bounds. gcc/testsuite/ChangeLog: * rust/compile/derive_macro6.rs: Add lang item attribute to Copy trait. --- gcc/rust/expand/rust-derive-

[COMMITTED 006/141] gccrs: derive(Clone): Add Clone bound on generated impl blocks

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc: Add extra bound when deriving generic Clone --- gcc/rust/expand/rust-derive-clone.cc | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gcc/rust/expand/rust-derive-clone.cc b/gcc/

[COMMITTED 013/141] gccrs: Add environment capture to NR2

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry The compiler was still relying on NR1 for closure captures when using nr2 even though the resolver was not used and thus it's state empty. gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add environment collection.

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

2025-03-24 Thread Jakub Jelinek
On Sun, Mar 23, 2025 at 02:44:29PM -0500, Robert Dubner wrote: > 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

[COMMITTED 011/141] gccrs: backend: Allow anything as a match scrutinee

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (check_match_scrutinee): Allow anything to be used as a match scrutinee, not just ADTs. --- gcc/rust/backend/rust-compile-expr.cc | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gcc/r

[COMMITTED 024/141] gccrs: ast: Add Path::is_lang_item()

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-path.h: New function. --- gcc/rust/ast/rust-path.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index 2a76acc48c3..c2537034b61 100644 --- a/gcc/rust/ast/rust-path.h +++ b/gcc/r

[COMMITTED 020/141] gccrs: ast: More visitors to allow lang item paths in expressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Adapt visitor to lang item PathInExpressions. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise. * expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise.

[COMMITTED 004/141] gccrs: hir-dump: Improve handling of typepathsegments that are lang items.

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::do_typepathsegment): Add handling for lang items. --- gcc/rust/hir/rust-hir-dump.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc

[COMMITTED 005/141] gccrs: ast-builder: Add extra parameter for TypeParam builder

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::new_type_param): Add optional extra trait bounds. * ast/rust-ast-builder.h: Likewise. --- gcc/rust/ast/rust-ast-builder.cc | 6 +- gcc/rust/ast/rust-ast-builder.h | 4 +++- 2 files changed, 8 insert

[COMMITTED 008/141] gccrs: derive(Copy): Improve bounds when deriving Copy

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-copy.cc: Always add an extra Copy bound on generic Copy impls. --- gcc/rust/expand/rust-derive-copy.cc | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/rust/expand/rust-derive-copy.cc b/gcc/rus

[PATCHSET] Update Rust frontend 24/03/2024 4/4

2025-03-24 Thread arthur . cohen
Hi everyone! Here is the last batch of our split patchset which aimed at synchronizing upstream with our development repo. Both repositories are now the same, with the latest patch pushed today corresponding to the latest pull-request merged this weekend on our side. Moving forward, I will be upst

[COMMITTED 009/141] gccrs: Fix rust breakage with nr2

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Nr2 did not emit the correct error message for break identifier "rust". gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add "rust" identifier detection akin to nr1. (funny_ice_finalizer): Copy ICE finalizer from nr1

[COMMITTED 010/141] gccrs: lang-items: Add Result and Try lang items

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-lang-item.h: Add handling for Result::Ok, Result::Err, Try, Try::into_result, Try::from_ok, Try::from_err. * util/rust-lang-item.cc: Likewise. gcc/testsuite/ChangeLog: * rust/compile/try-trait.rs: New test. ---

[COMMITTED 001/141] gccrs: typecheck: Separate assemble_builtin_candidate in two

2025-03-24 Thread arthur . cohen
From: Arthur Cohen This paves the way for adding trait bounds that aren't necessarily Sized. gcc/rust/ChangeLog: * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::add_trait_bound): New function. * typecheck/rust-hir-type-bounds.h: Declare it. (TypeBoundsProbe::assemble_

[COMMITTED 022/141] gccrs: hir: Adapt visitors to lang item PathInExpressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (ResolvePathRef::visit): Adapt visitor to lang item HIR::PathInExpressions. * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): Likewise. --- gcc/rust/backend/rust-compile-resolve

[COMMITTED 017/141] gccrs: lang-items: Collect enum variants as lang items

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-collect-lang-items.h: Declare visitor. * ast/rust-collect-lang-items.cc (CollectLangItems::visit): New. --- gcc/rust/ast/rust-collect-lang-items.cc | 9 + gcc/rust/ast/rust-collect-lang-items.h | 1 + 2 files changed, 10

[COMMITTED 016/141] gccrs: catch missing guard for optional result

2025-03-24 Thread arthur . cohen
From: Philip Herron When we lookup here it returns an optional which can lead to a crash because it needs a guard if it has a value. gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): add guard gcc/testsuite/ChangeLog: * rust/compile/n

[COMMITTED 014/141] gccrs: Add captures for ClosureExprInnerTyped with nr2

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Captures were only processed for regular ClosureExprInner. gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add ClosureExprInnerTyped visit implementation. (add_captures): Add a function to avoid code duplication.

[COMMITTED 025/141] gccrs: backend: Improve handling of lang-item PathInExpressions

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (ResolvePathRef::visit): Call into resolve_path_like instead. (ResolvePathRef::resolve_path_like): New. (ResolvePathRef::resolve): Call into resolve_with_node_id. * backend/rust

[COMMITTED 070/141] gccrs: add discriminant value intrinsic

2025-03-24 Thread arthur . cohen
From: Philip Herron This is pretty nasty piece of rust in my opinion the return type of this intrinsic results into a lang item associated type: ::Discriminant This is a special case which needs to support mapping onto the repr type of the associated ADT that is passed in, but defaults to isz

[COMMITTED 085/141] gccrs: nr2.0: Run DefaultResolver::visit on PathInExpression

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): When visiting a PathInExpression instance, call into DefaultResolver::visit, ensuring generic arguments are visited. gcc/testsuite/ChangeLog: * rust/compile/nr2/

[COMMITTED 031/141] gccrs: Clone expr instead of taking it

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry We're reusing the value, it could therefore not be taken be should be cloned. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Clone expr instead of taking it. Signed-off-by: Pierre-Emmanuel Patry --- gcc/

[COMMITTED 080/141] gccrs: initial setup for new OpaqueType to represent Impl types

2025-03-24 Thread arthur . cohen
From: Philip Herron This completes the initial setup and boilerplate for the new type in the typesystem. This is not functional yet but its a big patch already. gcc/rust/ChangeLog: * backend/rust-compile-type.cc (TyTyResolveCompile::visit): new tyty::OpaqueType * backend/rust-c

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

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove issue-1786 and issue-3033 from exclusion list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/tests

[COMMITTED 054/141] gccrs: Fix ICE during path probe

2025-03-24 Thread arthur . cohen
From: Philip Herron It is valid for the query to fail here so its valid to not assert here. gcc/rust/ChangeLog: * typecheck/rust-hir-path-probe.cc (PathProbeType::visit): remove assertion Signed-off-by: Philip Herron --- gcc/rust/typecheck/rust-hir-path-probe.cc | 12 ++-- 1

[COMMITTED 035/141] gccrs: Remove some passing test from exclude file

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those tests are now passing. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove some tests. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/

[COMMITTED 076/141] gccrs: fix name resolution for generics where type param is declared later

2025-03-24 Thread arthur . cohen
From: Philip Herron Rust allows you to use generics within type bounds when they are declared later on. This changes the name resolution to walk the genric params in two passes to ensure the type parameters are setup before drilling down into the type parameters This issue has exposed another ty

[COMMITTED 032/141] gccrs: Make foreverstack debug string const

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those function should not change anything within the foreverstack, it can therefore be made const. gcc/rust/ChangeLog: * resolve/rust-forever-stack.h: Make debug functions const. * resolve/rust-forever-stack.hxx: Likewise. Signed-off-by: Pierre-Emman

[COMMITTED 012/141] gccrs: Check for type paths nr2.0 can't handle yet

2025-03-24 Thread arthur . cohen
From: Owen Avery Some of our tests only work with name resolution 2.0 because the latter misinterprets type paths. This change should cause the compiler to error out if it would otherwise misinterpret a type path. A fix for type path resolution isn't included in this comment, since doing so would

[COMMITTED 040/141] gccrs: Add option_env! support

2025-03-24 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * expand/rust-macro-builtins-utility.cc: Add macro expansion for option_env with eager expansion * expand/rust-macro-builtins.cc: Add option_env to builtin list * expand/rust-macro-builtins.h: Add option_env handler to header

[COMMITTED 061/141] gccrs: Add test case to show issue is fixed

2025-03-24 Thread arthur . cohen
From: Philip Herron This was fixed as part of: "gccrs: Fix compilation of trait-items which map to impl items" Fixes Rust-GCC#3402 gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 cant handle this * rust/compile/issue-3402-1.rs: New test. * rust/compile/issue-3

[COMMITTED 015/141] gccrs: Infer crate name after file opening

2025-03-24 Thread arthur . cohen
From: Dylan Gardner Fixes #3129. gcc/rust/ChangeLog: * rust-session-manager.cc (Session::handle_crate_name): Remove crate name inference (Session::compile_crate): Add crate name inference and error if inferred name is empty. Remove CompileOptions::get_instance ()

[COMMITTED 104/141] gccrs: lower: Always crash when lowering macro invocations

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Add base implementation for visitor. --- gcc/rust/hir/rust-ast-lower-base.cc | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/rust/hir/rust-ast-lower

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

2025-03-24 Thread Paul-Antoine Arras
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 @@ +! { dg-additional-options "-fdump-tree-omplower" } + +subroutine sub1 (a1, a2, a3, a4) + use omp_li

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: [WIP] C++: Adjust implicit '__cxa_bad_typeid' prototype to reality

2025-03-24 Thread Jason Merrill
On 3/24/25 7:02 AM, Thomas Schwinge wrote: Hi! On 2025-03-21T15:46:01+0100, I wrote: On 2025-03-19T14:25:49+, Jonathan Wakely wrote: On Wed, 19 Mar 2025 at 14:21, Marek Polacek wrote: On Wed, Mar 19, 2025 at 12:38:31PM +0100, Thomas Schwinge wrote: In 2001 Subversion r40924 (Git commit

[COMMITTED 093/141] gccrs: derive(Eq): Also derive StructuralEq

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-eq.cc: Adapt functions to return two generated impls. * expand/rust-derive-eq.h: Likewise. * expand/rust-derive.cc (DeriveVisitor::derive): Likewise. --- gcc/rust/expand/rust-derive-eq.cc | 68 +

[PATCH 1/2] [COBOL] Remove _Float128 use from numstr2i

2025-03-24 Thread Richard Biener
This removes the last real _Float128 as the return value of numstr2i. Following Jakubs changes I refrained from trying to refactor this in a way to avoid the int->_Float128->int round-trips we do in many places but replace _Float128 with REAL_VALUE_TYPE. Tested on x86_64-unknown-linux-gnu. OK?

[COMMITTED 094/141] gccrs: derive(Eq): Create copies of Eq typepath to avoid NodeId confusion

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-eq.cc: Copy `Eq` typepath. --- gcc/rust/expand/rust-derive-eq.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/rust/expand/rust-derive-eq.cc b/gcc/rust/expand/rust-derive-eq.cc index 47a8350d2ff.

[COMMITTED 100/141] gccrs: derive(Hash): Add implementation.

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

[COMMITTED 069/141] gccrs: Get rid of duplicate interface gccrs#3396

2025-03-24 Thread arthur . cohen
From: GS-GOAT <86884129+gs-g...@users.noreply.github.com> gcc/rust/ChangeLog: * typecheck/rust-autoderef.cc (insert_implicit_type): Update single-parameter call to pass explicit HirId. * typecheck/rust-hir-type-check-expr.cc: Same. * typecheck/rust-hir-type

[COMMITTED 111/141] gccrs: session-manager: Call into DesugarQuestionMark

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * rust-session-manager.cc (Session::compile_crate): Call DesugarQuestionMark::go(). --- gcc/rust/rust-session-manager.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc inde

[COMMITTED 107/141] gccrs: nr2.0: Handle lang item type path segments

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::find_starting_point): Stop when hitting a lang item segment. (ForeverStack::resolve_segments): Resolve lang item segments. (ForeverStacl::resolve_path): Handle single segm

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

2025-03-24 Thread Paul-Antoine Arras
Here is a patch that encompasses the modifications requested by Sandra and Thomas, as well as a fix for 32-bit pointers. OK for trunk? -- PAcommit b1b634d5d3c35682b65edacecf7a4749221f5728 Author: Paul-Antoine Arras Date: Mon Mar 24 15:53:36 2025 +0100 OpenMP: interop - make arrays const

[COMMITTED 044/141] gccrs: scan-deadcode: Do not warn unused fields if they start with '_'

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * checks/lints/rust-lint-scan-deadcode.h: Check if the field name starts with an underscore before warning. --- gcc/rust/checks/lints/rust-lint-scan-deadcode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/rust/

[COMMITTED 058/141] gccrs: Fix compilation of trait-items which map to impl items

2025-03-24 Thread arthur . cohen
From: Philip Herron When we have paths such as Try::from_error the Try references the Trait and then from_error references the from_error trait item. So this resolves directly to a trait implementation which has the type: fn (v: placeholder) -> Self Remember that a path such as: Try::from_er

[COMMITTED 122/141] gccrs: remove visitor which is not needed here

2025-03-24 Thread arthur . cohen
From: Philip Herron Just a small refactor to remove a visitor which is not needed. gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (ResolvePathRef::Compile): remove visitor (ResolvePathRef::ResolvePathRef): likewise (ResolvePathRef::visit): likewise *

[COMMITTED 118/141] gccrs: Add enum variant string information to definition

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry New enum variant status now appears in the string representation of the resolver's definition. gcc/rust/ChangeLog: * resolve/rust-rib.cc (Rib::Definition::to_string): Add enum variant status. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolv

[COMMITTED 071/141] gccrs: add variant_count intrinsic

2025-03-24 Thread arthur . cohen
From: Philip Herron Addresses Rust-GCC#3348 gcc/rust/ChangeLog: * backend/rust-compile-intrinsic.cc (variant_count_handler): new intrinsic gcc/testsuite/ChangeLog: * rust/execute/torture/enum_intrinsics2.rs: New test. Signed-off-by: Philip Herron --- gcc/rust/backend/rust-

[COMMITTED 103/141] gccrs: nr2.0: Implement macro_use for modules

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc: Include rust-attribute-values.h. (Early::visit): If a module has a macro_use attribute, avoid pushing a new textual macro scope. gcc/testsuite/ChangeLog: * rust/compile/nr2/e

[COMMITTED 068/141] gccrs: remove bad type checking diagnostic

2025-03-24 Thread arthur . cohen
From: Philip Herron This was a bad diagnostic added when I was working on slices and iterators also the name of the function is also bad. This is all about setting up associated types based on the current context of the bounds assocated with the associated trait bounds on this function. The tell

[COMMITTED 119/141] gccrs: Remove nr2 exhaustiveness test from exclusion list

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust

[COMMITTED 036/141] gccrs: add new -frust-overflow-checks flag to control overflow checks

2025-03-24 Thread arthur . cohen
From: Philip Herron This will be crucial for more complex gimple debugging to make it easier to follow the code vs the original rust code. gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): disable overflow checks * lang.opt: new flag Signed-off-by: Phili

[COMMITTED 055/141] gccrs: coercion sites allow for type inference as well.

2025-03-24 Thread arthur . cohen
From: Philip Herron Addresses Rust-GCC#3382 and Rust-GCC#3381 gcc/rust/ChangeLog: * typecheck/rust-type-util.cc (coercion_site): allow inference vars gcc/testsuite/ChangeLog: * rust/compile/reference1.rs: fix error message Signed-off-by: Philip Herron --- gcc/rust/typecheck

[COMMITTED 047/141] gccrs: derive-visitor: Add method for setting up derived impl generics

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive.cc (DeriveVisitor::setup_impl_generics): New method. * expand/rust-derive.h: Declare it, define DeriveVisitor::ImplGenerics struct. --- gcc/rust/expand/rust-derive.cc | 74 ++ gcc/rust/

[COMMITTED 045/141] gccrs: ast-builder: Add new functions to create type paths.

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::type_path): New functions. * ast/rust-ast-builder.h: Declare them. --- gcc/rust/ast/rust-ast-builder.cc | 21 - gcc/rust/ast/rust-ast-builder.h | 4 2 files changed, 24 insertio

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

2025-03-24 Thread Robert Dubner
How about you create the new patch and just edit out the regenerated configure before sending the e-mail? Typing "autoreconf" isn't hard. > -Original Message- > From: Iain Sandoe > Sent: Monday, March 24, 2025 11:06 > To: Robert Dubner > Cc: James K. Lowden ; GCC Patches patc...@gcc.gn

Re: [Patch] libgomp/plugin/plugin-nvptx.c: Fix device used for stream creation

2025-03-24 Thread Thomas Schwinge
Hi Tobias! Earlier today, I happened to be testing current OG14 branch. On a multi-Nvidia GPU system, I saw: +PASS: libgomp.c/interop-fr-1.c (test for excess errors) +FAIL: libgomp.c/interop-fr-1.c execution test spawn [open ...] Running on the nvptx device (-99) Running on

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

2025-03-24 Thread Tomasz Kamiński
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 iterators were introduced, they commonly assume existence o

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

2025-03-24 Thread Iain Sandoe
> On 24 Mar 2025, at 16:41, Iain Sandoe wrote: > > > >> On 24 Mar 2025, at 16:38, Robert Dubner wrote: >> >> How about you create the new patch and just edit out the regenerated >> configure before sending the e-mail? Typing "autoreconf" isn't hard. > > OK. I can do that (historically tha

[COMMITTED 066/141] gccrs: ast: Add DesugarForLoop class

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-desugar-for-loops.cc: New file. * ast/rust-desugar-for-loops.h: New file. * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Make lowering of for-loops an unreachable. * Make-lang.in: Compile it. gcc/

[COMMITTED 051/141] gccrs: nr2.0: Remove accidental copies of resolver

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::generate_closure_function): Take NameResolutionContext by reference instead of by value. * backend/rust-compile-item.cc (CompileItem::visit): Likewise. * backend/rust

[COMMITTED 105/141] gccrs: name-resolution: early: Remove overzealous overrides

2025-03-24 Thread arthur . cohen
From: Arthur Cohen Some empty overrides were incorrectly being set-up instead of using the correct behavior from DefaultASTVisitor. gcc/rust/ChangeLog: * resolve/rust-early-name-resolver.cc: Remove definitions. * resolve/rust-early-name-resolver.h: Remove declarations. --- gcc

[COMMITTED 048/141] gccrs: derive(Clone, Copy): Cleanup using new method from DeriveVisitor

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc: Cleanup using DeriveVisitor::setup_impl_generics. * expand/rust-derive-copy.cc: Likewise. --- gcc/rust/expand/rust-derive-clone.cc | 87 ++-- gcc/rust/expand/rust-derive-copy.cc | 87

[COMMITTED 063/141] gccrs: inline-asm: Fix some warnings

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (strip_double_quotes): Special case empty strings ("\"\""). (parse_reg_operand): Remove use of the `struct` keyword. (parse_reg_operand_in): Likewise. (parse_reg_operand_out): Like

[COMMITTED 083/141] gccrs: Add comments to resolve_segments

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::resolve_segments): Add comments explaining the behaviour of a while loop. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-forever-stack.hxx | 11 +++ 1 file changed, 11 ins

[COMMITTED 030/141] gccrs: Remove some tests from nr2 exclusion file

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those test are now passing. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove passing tests. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 11 --- 1 file changed, 11 deletions(-) diff --git a/gcc/tests

[COMMITTED 084/141] gccrs: nr2.0: Fix issue with external crates

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): When visiting an external crate declaration, handle failed crate name lookups. This can happen when Session::load_extern_crate fails to load a crate during the

[COMMITTED 137/141] gccrs: nr2.0: Adjust visitors for struct expressions

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Make sure to always visit the struct name. * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Avoid visiting the struct name twice. gcc/testsuite/ChangeLog:

[COMMITTED 139/141] gccrs: nr2.0: Adjust indentifier expression handling

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Make sure to return early after a resolution error, improve the resolution error message, fix a typo, handle ambiguous resolutions, and remove an old comment. gcc/testsui

[COMMITTED 062/141] gccrs: Add warning about default visitor usage

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry We already lost some time on this unusual pattern, a comment will hopefully prevent this from happening again. gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add warning about current code. Signed-off-by: Pierre-E

[COMMITTED 064/141] gccrs: nr2.0: Resolve instances of TypePath more accurately

2025-03-24 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * util/rust-unwrap-segment.cc: New file. * util/rust-unwrap-segment.h: New file. * Make-lang.in: Add rust-unwrap-segment.o to the object list. * resolve/rust-forever-stack.hxx: Include rust-unwrap-segment.h. (ForeverSta

[COMMITTED 049/141] gccrs: derive(Debug): Add stub implementation.

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

[COMMITTED 128/141] gccrs: Add a function to get the crate number from node id

2025-03-24 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * util/rust-hir-map.cc (Mappings::lookup_crate_num): Add function to retrieve crate number from it's node id. (Mappings::node_is_crate): change function with call to lookup_crate_num to avoid looping through all crat

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

2025-03-24 Thread Jonathan Wakely
On Mon, 24 Mar 2025 at 17:47, Patrick Palka wrote: > > 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

[COMMITTED 143/146] gccrs: derive(Clone): Implement clone for enum tuple variants

2025-03-24 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc (DeriveClone::variant_match_path): New function. (DeriveClone::clone_enum_identifier): Rename. (DeriveClone::clone_enum_tuple): New function. (DeriveClone::visit_enum): Visit tuple variants prop

Re: [PATCH 0/1] Cherry pick of patch for gcc-13 fixing PR119372

2025-03-24 Thread Matthew Malcomson
On 3/20/25 15:03, Alex Coplan wrote: External email: Use caution opening links or attachments On 20/03/2025 14:31, Alfie Richards wrote: Hello, This is a cherry pick of 20385cb92cbd4a1934661ab97a162c1e25935836 which didn't apply cleanly so needed a very minor edit to for it to apply for GCC

[committed 2/2] arm: testsuite: make unaligned-memcpy-*.c executable tests [PR91614]

2025-03-24 Thread Richard Earnshaw
These tests have been looking for a very specific instruction sequence which has the tendency to be fairly unstable as a result. But what is more interesting is that the the tests must not contain instructions that can't be used for unaligned data, and whether or not the copy is executed correctly

[PATCH] i386: Fix up combination of -2 r<<= (x & 7) into btr [PR119428]

2025-03-24 Thread Jakub Jelinek
Hi! The following patch is miscompiled from r15-8478 but latently already since my r11-5756 and r11-6631 changes. The r11-5756 change was https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561164.html which changed the splitters to immediately throw away the masking. And the r11-6631 change w

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

2025-03-24 Thread Thomas Koenig
Hello world, the attached patch handles dumping prototypes for C functions returning function pointers. For the test case MODULE test USE, INTRINSIC :: ISO_C_BINDING CONTAINS FUNCTION lookup(idx) BIND(C) type(C_FUNPTR) :: lookup integer(C_INT), VALUE :: idx lookup = C_FUNLO

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

2025-03-24 Thread Iain Sandoe
> On 24 Mar 2025, at 16:38, Robert Dubner wrote: > > How about you create the new patch and just edit out the regenerated > configure before sending the e-mail? Typing "autoreconf" isn't hard. OK. I can do that (historically that is what we always have done, but now we have CI infrastructure

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

2025-03-24 Thread 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_interface(gfc_expr*, gfc_expr*)': ../../gcc-trunk/gcc/fortr

[committed] libstdc++: Fix some broken links in the manual

2025-03-24 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * doc/xml/manual/policy_data_structures_biblio.xml: Fix two broken links. * doc/html/manual/policy_data_structures.html: Regenerate. --- libstdc++-v3/doc/html/manual/policy_data_structures.html | 4 ++-- libstdc++-v3/doc/xml/manual/policy_data_

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

2025-03-24 Thread Jakub Jelinek
On Mon, Mar 24, 2025 at 10:55:44PM +0100, Jakub Jelinek wrote: > If it was HOST_WIDE_INT_MAX + (size_t) 1 to ~(size_t) 0, previously it would > be false and now is false. Sorry, this case used to be false and now is true. Jakub

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

2025-03-24 Thread Jakub Jelinek
On Mon, Mar 24, 2025 at 05:19:13PM -0400, James K. Lowden wrote: > 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 > >

Re: [PATCH] RISC-V: disable the abd expander for gcc-15 release [PR119224]

2025-03-24 Thread Jeff Law
On 3/24/25 2:53 PM, Vineet Gupta wrote: It seems the new expander triggers a latent issue in sched1 causing extraneous spills in a different satd variant. Given how close we are to gcc-15 release, disable it for now. Since we do want to retain and re-enable this capabilty, manully disable vs.

<    1   2   3   >