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

2025-03-21 Thread Christophe Lyon
Depending on if/how the testing flags are overridden, the first value we try("") might not do what we want. For instance, if the whole testsuite is executed with (A) -mthumb -march=armv7-m -mtune=cortex-m3 -mfloat-abi=softfp bf16_neon_ok is first compiled with (A) (B) where B = -mcpu=unset -march

Re: [PATCH] cobol: Address some iconv issues.

2025-03-21 Thread Iain Sandoe
> On 21 Mar 2025, at 22:11, Robert Dubner wrote: > > So, please, stick with the default 1252 for existing code -- as you noted, > changing the page breaks some tests. So … like so? #if __APPLE__ “CP1252" #else "CP1252//" #endif (I’m not sure what the trailing ‘//‘ does on Linux [it’s an

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

2025-03-21 Thread Richard Biener
On Thu, 20 Mar 2025, Jakub Jelinek wrote: > On Thu, Mar 20, 2025 at 03:30:30PM -0500, Robert Dubner wrote: > > Let me find one inky-dink example. Talk amongst yourselves...here we go. > > > > identification division. > > program-id. prog. > > data

[Patch] testsuite/lib/libgomp.exp: compile with -fdiagnostics-plain-output

2025-03-21 Thread Tobias Burnus
I tried to match in dg-warning the whole string, including [-OpenMP], but it failed. I turned out that that was because of -fdiagnostics-urls ... Solution do what other testsuites do: Use -fdiagnostics-plain-output. Unless there are further comments, I intent to commit the attached patch later

Re: [PATCH 3/3] libstdc++: Fix localized %c formatting for non-UTC times [PR117214]

2025-03-21 Thread Tomasz Kaminski
On Thu, Mar 20, 2025 at 10:39 AM Jonathan Wakely wrote: > The previous commit fixed most cases of %c formatting, but it > incorrectly prints times using the system's local time zone. This only > matters if the locale's %c format includes %Z, but some do. > > To print a correct value for %Z we can

Re: COBOL: Implementation of STOP RUN / GOBACK

2025-03-21 Thread Simon Sobisch
Am 21.03.2025 um 11:50 schrieb Jose E. Marchesi: Am 20.03.2025 um 21:50 schrieb James K. Lowden: On Mar 13, 2025, at 8:04 AM, Simon Sobisch wrote: exit() allows us to "pass to the operating system" directly; but it doesn't directly say "success" or "fail". Obviously the statements

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

2025-03-21 Thread Jason Merrill
On 3/20/25 12:28 PM, 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. gcc always errors out while LLVM declares it undefined. But maybe we can fix that one to

[COMMITTED 001/146] gccrs: Fix bad recursive operator overload call

2025-03-21 Thread arthur . cohen
From: Philip Herron When we are typechecking the impl block for DerefMut for &mut T the implementation follows the usual operator overload check but this ended up just resolving directly to the Trait definition which ends up being recursive which we usually handle. The issue we had is that a dere

[COMMITTED 009/146] gccrs: Fix name resolution 2.0 definition lookups in unsafe checker

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/rust-unsafe-checker.cc: Add includes. (UnsafeChecker::visit): Use 2.0 version of resolver when name resolution 2.0 is enabled. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-b

[COMMITTED 015/146] gccrs: fix bad type inferencing on path's

2025-03-21 Thread arthur . cohen
From: Philip Herron This catch to inject inference variables into generic paths was a catch all 'hack' that we needed before we handled generics correctly as we do now. Fixes #3009 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): remove ha

[COMMITTED 006/146] gccrs: Use name resolution 2.0 in TraitItemReference

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.cc: Add includes. (TraitItemReference::get_type_from_fn): Use ForeverStack::to_canonical_path when name resolution 2.0 is enabled. Signed-off-by: Owen Avery --- gcc/rust/typecheck/rust-hir-typ

[COMMITTED 008/146] gccrs: Improve path handling while testing name resolution 2.0

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/nr2/compile.exp: Handle paths using "file join" and "file split". * rust/compile/nr2/exclude: Remove debug-diagnostics-on.rs. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/nr2/compile.exp | 18

[COMMITTED 011/146] gccrs: Use name resolution 2.0 in TraitResolver

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * typecheck/rust-hir-trait-resolve.cc: Add includes. (TraitResolver::resolve_path_to_trait): Use name resolution 2.0 resolver when enabled. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by:

[COMMITTED 021/146] gccrs: Reorganize the CPU feature detection

2025-03-21 Thread arthur . cohen
From: Antoni Boucher Move the code from i386-rust.cc to i386-rust-and-jit.inc so that it can be reused by libgccjit. gcc/ChangeLog: * config/i386/i386-rust-and-jit.inc: New file. * config/i386/i386-rust.cc: Move code to i386-rust-and-jit.inc. --- gcc/config/i386/i386-rust-and-j

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

2025-03-21 Thread Richard Biener
On Thu, 20 Mar 2025, Robert Dubner wrote: > Okay, I managed to figure out a way of getting the debug information back > into the libgcobol. > > The addition is done by the routine __gg__add_fixed_phase1() > > The run-tiome inputs to that routine should be 1 and 555. > > What's coming th

[COMMITTED 116/146] gccrs: Fix scan-gimple testcases on LE platforms.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/testsuite/ChangeLog: * rust/compile/macros/builtin/eager1.rs: Switch to scan-assembler directive as the GIMPLE dump does not contain strings on LE. * rust/compile/macros/builtin/recurse2.rs: Likewise. --- .../rust/compile/macros/builtin/eager1.rs

[COMMITTED 088/146] gccrs: ast: Add new constructors for PathInExpression

2025-03-21 Thread arthur . cohen
From: Arthur Cohen This commit adds two new constructors for AST::PathInExpression: One using a provided lang-item, and one with an already built std::unique_ptr gcc/rust/ChangeLog: * ast/rust-path.h: Add two new constructors. --- gcc/rust/ast/rust-path.h | 21 - 1

[COMMITTED 080/146] gccrs: add ptr to int and int to ptr type cast rules

2025-03-21 Thread arthur . cohen
From: Nobel Added rules to allow type casting pointer as integer types (u*,i*) and integer types to be casted as pointer. gcc/rust/ChangeLog: * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule. gcc/testsuite/ChangeLog: * rust/compile/ptr_int_cast.rs: New test. Si

[COMMITTED 059/146] gccrs: ast: Use StackedContexts class in ContextualASTVisitor

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-visitor.h: Replace context with StackedContexts. * ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Use new APIs. * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Likewise. --- gcc/rust/ast/rust-as

[COMMITTED 083/146] gccrs: resolve: Name resolve trait bounds properly

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit): Resolve additional trait bounds. * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Error out properly on unresolved type-path instead of crashing

[COMMITTED 119/146] gccrs: nr2.0: Early resolve pending eager macro invocations

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::visit): Resolve the pending eager invocations inside builtin macro invocations. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by: Owen Avery

[COMMITTED 084/146] gccrs: typecheck: Add note about erorring out on additional trait bounds.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen If additional trait bounds aren't auto traits, then the typechecker must error out (Rust-GCC#3008) gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc: Add TODO note. --- gcc/rust/typecheck/rust-hir-type-check-type.cc | 5 + 1 file changed, 5 insertions(+

[COMMITTED 099/146] gccrs: fix ICE during HIR dump

2025-03-21 Thread arthur . cohen
From: Philip Herron These hir nodes have optional expressions which need guarded gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::do_qualifiedpathtype): add guard (Dump::do_traitfunctiondecl): likewise (Dump::visit): likewise Signed-off-by: Philip Herron --- gcc/rust

[COMMITTED 100/146] gccrs: nr2.0: Improve default, top-level, and late resolvers

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Make sure to scope visitation of the children of type definition items. * resolve/rust-default-resolver.h (DefaultResolver::visit): Add overrides for TupleStr

[COMMITTED 093/146] gccrs: Remove Rust::make_unique

2025-03-21 Thread arthur . cohen
From: Owen Avery Since our bootstrap requirement has been bumped to C++14, we don't need a custom implementation of std::make_unique anymore. gcc/rust/ChangeLog: * ast/rust-ast-builder-type.cc: Remove inclusion of rust-make-unique.h. * ast/rust-ast-builder.cc: Likewise.

[COMMITTED 092/146] gccrs: ast: Add EnumItem::Kind

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-item.h: Add EnumItem::Kind for differentiating all variants that may be used inside an enum declaration. --- gcc/rust/ast/rust-item.h | 52 1 file changed, 52 insertions(+) diff --git a/

[v2] C++: Adjust implicit '__cxa_bad_cast' prototype to reality

2025-03-21 Thread Thomas Schwinge
Hi! 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 >> > 52a11cbfcf0cfb32628b6953588b6af4037ac0b6) >> > "IA-64 ABI Exception Ha

[COMMITTED 098/146] gccrs: use StackedContexts for block context

2025-03-21 Thread arthur . cohen
From: Prajwal S N Replaces the DIY vector stack with a StackedContexts object for block scopes in the type checker context. Fixes #3284. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.h (class TypeCheckContext): add header file and use StackedContexts for blocks *

[COMMITTED 019/146] gccrs: Use name resolver 2.0 in VisibilityResolver

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/privacy/rust-visibility-resolver.cc: Add includes. (VisibilityResolver::resolve_module_path): Use name resolver 2.0 (when enabled) to lookup path resolutions. Signed-off-by: Owen Avery --- .../privacy/rust-vi

[COMMITTED 027/146] gccrs: typecheck: Remove unused parameter in TyTyCheckCallExpr

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-tyty-call.h: Remove unused context member. --- gcc/rust/typecheck/rust-tyty-call.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/rust/typecheck/rust-tyty-call.h b/gcc/rust/typecheck/rust-tyty-call.h in

[COMMITTED 058/146] gccrs: stacked-contexts: Add peek() method

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-stacked-contexts.h: Add new method to see what context we are currently in. --- gcc/rust/util/rust-stacked-contexts.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/gcc/rust/util/rust-stacked-contexts.h b/gcc/rust/util/rus

[COMMITTED 018/146] gccrs: fix bad type inference on local patterns

2025-03-21 Thread arthur . cohen
From: Philip Herron We do not need to inject inference variables on generic patterns with generic blocks. This will just cause unconstrained inference variables as they may not unify against something. Fixes Rust-GCC#2323 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-path.cc (Ty

[COMMITTED 030/146] gccrs: Push ribs by kind rather than by value

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack::push): Accept argument of type Rib::Kind rather than Rib. * resolve/rust-forever-stack.hxx (ForeverStack::push): Likewise. * resolve/rust-name-resolution-context.cc

[COMMITTED 037/146] gccrs: FnParam cloning now keeps projections

2025-03-21 Thread arthur . cohen
From: Pierre-Emmanuel Patry FnParam type where monomorphized during cloning. gcc/rust/ChangeLog: * typecheck/rust-tyty.h: Reverse monomorphization during cloning and make a new function to explicitly monomorphize. * typecheck/rust-tyty.cc: Use monomorphization when requi

[COMMITTED 003/146] gccrs: Fix variable shadowing in late resolution 2.0

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Visit the initialization expressions of let statements before visiting their patterns. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-b

[COMMITTED 020/146] gccrs: Use name resolver 2.0 for module descendance checks

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/privacy/rust-privacy-reporter.cc: Include rust-immutable-name-resolution-context.h. (is_child_module): Use ForeverStack::is_module_descendant if name resolution 2.0 is enabled. * resolve/rust-forever-sta

[COMMITTED 014/146] gccrs: Make TyTy::TupleType::get_unit_type cache its return value

2025-03-21 Thread arthur . cohen
From: Owen Avery This removes a usage of Resolver::get_unit_type_node_id in rust-hir-type-check-expr.cc (the HIR::TupleExpr overload of TypeCheckExpr::visit). gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (TupleType::get_unit_type): Remove parameter, cache return value.

[COMMITTED 025/146] gccrs: add test case to show issue is fixed

2025-03-21 Thread arthur . cohen
From: Philip Herron The original test case 1773 has been moved to a new issue 3242 which is still open and test-case is skipped. The original issue in 1773 is fixed so this will close out that issue Fixes Rust-Gcc#1773 gcc/testsuite/ChangeLog: * rust/compile/issue-1773.rs: new test cas

Re: [PATCH] aarch64: Add support for -mcpu=olympus

2025-03-21 Thread Kyrylo Tkachov
Hi Dhruv, > On 21 Mar 2025, at 11:11, Dhruv Chawla wrote: > > This adds support for the NVIDIA Olympus core to the AArch64 backend. The > initial patch does not add any special tuning decisions, and those may come > later. > > Bootstrapped and tested on aarch64-none-linux-gnu. > Thanks, given

[COMMITTED 050/146] gccrs: Prepend crate name to functions with nr2

2025-03-21 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * backend/rust-compile-base.cc: Prepend crate name to function's ir name. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove passing tests from exclude list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ba

[COMMITTED 052/146] gccrs: improve handling of Self Type paths

2025-03-21 Thread arthur . cohen
From: Philip Herron TypePaths have special handling for Self where we can look at the current ctx for more acurate TypeAlias information if required. We cant do this for Impl contexts but not for Traits as we might as well fall back to the TypePathProbe. The other issue was the dyn type comming

[COMMITTED 046/146] gccrs: Clean up some system includes

2025-03-21 Thread arthur . cohen
From: Pierre-Emmanuel Patry System includes shall use rust-system header instead. gcc/rust/ChangeLog: * ast/rust-stmt.h: Remove stdlib include and use rust-system instead. * backend/rust-compile-expr.cc: Likewise. * backend/rust-mangle-legacy.cc: Likewise. * back

[COMMITTED 069/146] gccrs: Fix ForeverStack::find_starting_point output parameter

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack::find_starting_point): Use type 'std::reference_wrapper &' instead of 'Node &' for parameter starting_point. * resolve/rust-forever-stack.hxx (ForeverStack::find_star

[COMMITTED 054/146] gccrs: ensure packed and aligned is applied properly

2025-03-21 Thread arthur . cohen
From: Philip Herron We cannot apply aligned or packed after layout_type is called you need to set this up first then call it. Fixes Rust-GCC#3260 gcc/rust/ChangeLog: * backend/rust-compile-type.cc (TyTyResolveCompile::visit): call lauout type directly * rust-backend.h (struct_

Re: [PATCH 3/3] libstdc++: Fix localized %c formatting for non-UTC times [PR117214]

2025-03-21 Thread Jonathan Wakely
On Fri, 21 Mar 2025 at 12:24, Tomasz Kaminski wrote: > > > > On Thu, Mar 20, 2025 at 10:39 AM Jonathan Wakely wrote: >> >> The previous commit fixed most cases of %c formatting, but it >> incorrectly prints times using the system's local time zone. This only >> matters if the locale's %c format i

[COMMITTED 064/146] gccrs: fix crash in hir dump

2025-03-21 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::visit): add missing check for no return value Signed-off-by: Philip Herron --- gcc/rust/hir/rust-hir-dump.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc

[COMMITTED 063/146] gccrs: add test case to show issue is fixed

2025-03-21 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#266 gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 cant handle this * rust/compile/issue-266.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/issue-266.rs | 3 +++ gcc/testsuite/rust/compile/nr2/exclude |

[COMMITTED 048/146] gccrs: empty match expressions should resolve to !

2025-03-21 Thread arthur . cohen
From: Philip Herron This is a special case in Rust and the ! type can unify with pretty much anything its almost a inference variable and a unit-type for special cases. Fixes Rust-GCC/gccrs#3231 Fixes Rust-GCC/gccrs#2567 gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (check_match_s

[COMMITTED 094/146] gccrs: lower: Correctly lower parenthesized types

2025-03-21 Thread arthur . cohen
From: Arthur Cohen This is useful for handling multiple trait bounds, and required for better handling of auto traits. gcc/rust/ChangeLog: * hir/rust-ast-lower-type.cc (ASTLoweringType::visit): Add implementation for ParenthesizedType. * hir/rust-ast-lower-type.h: Decl

[COMMITTED 091/146] gccrs: nr2.0: Handle "Self" properly in trait definitions

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit implicit Self parameters of traits. * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Resolve implicit Self parameters of traits. * resolve/rust-

[COMMITTED 106/146] gccrs: Allow float type to be casted as integer type

2025-03-21 Thread arthur . cohen
From: Nobel gccrs now should be able to cast float types as numeric. gcc/rust/ChangeLog: * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule. gcc/testsuite/ChangeLog: * rust/compile/cast_float_as_integer.rs: New test. Signed-off-by: Nobel Singh --- gcc/rust/type

[COMMITTED 062/146] gccrs: add checks for division by zero and left shift overflow

2025-03-21 Thread arthur . cohen
From: Philip Herron These are ported from the c-family code c-warn.cc and c/c-typchk.cc Fixes Rust-GCC#2394 gcc/rust/ChangeLog: * backend/rust-constexpr.cc (eval_store_expression): check for null (eval_call_expression): remove bad warning * rust-gcc.cc (arithmetic_or_lo

[COMMITTED 124/146] gccrs: ast: Refactor how lang item paths are handled.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen Lang item typepaths were not handled properly, and required a complete overhaul. All old classes that concerned lang item paths are now modified to use a simpler version of `AST::LangItemPath`, which has been removed. TypePath segments can now be lang items, as this is requied

Re: [Fortran, Patch, PR119380, v1] Fix freeing procedure pointers in components

2025-03-21 Thread Andre Vehreschild
Hi Paul, well, I had those might complicated patches bit my mightily. So let's hope for the best :-) Thanks for the review. Committed with your proposed change in the testcase as gcc-15-8642-ga5c69abf138 Thanks again, Andre On Fri, 21 Mar 2025 10:40:11 + Paul Richard Thomas wrote:

[COMMITTED 097/146] gccrs: ast: Add new Kind enums for more precise downcasting

2025-03-21 Thread arthur . cohen
From: Arthur Cohen This commit adds things like Item::Kind, Expr::Kind, etc, and implements the associated `get_*_kind` functions. It also removes the more generic AST::Kind enum we were using, which was incomplete and painful to use. gcc/rust/ChangeLog: * ast/rust-ast.h: Add new Kind

[COMMITTED 068/146] gccrs: type-check: Remove unused capture in nr2.0

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Remove unused capture in lambda. --- gcc/rust/typecheck/rust-hir-type-check-type.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/r

[COMMITTED 075/146] gccrs: nr2.0: Resolve lang item paths properly.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): New. * resolve/rust-late-name-resolver-2.0.h: New. --- .../resolve/rust-late-name-resolver-2.0.cc| 20 +++ .../resolve/rust-late-name-resolver-2.0.h | 1 + 2 f

Re: [PATCH] opcodes: fix wrong code in expand_binop_directly [PR117811]

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Richard Earnshaw wrote: > If expand_binop_directly fails to add a REG_EQUAL note it tries to > unwind and restart. But it can unwind too far if expand_binop changed > some of the operands before calling it. We don't need to unwind that > far anyway since we should end up tak

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

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Simon Sobisch wrote: > > Now a question on COBOL: > > > > 77 var8 PIC 999V9(8) COMP-5 > > > > what precision/digits does this specify? When then doing > > > > add 0.0001 TO var555 giving var8 rounded > > > > what's the precision/digit specification for the litera

Re: [Fortran, Patch, PR119380, v1] Fix freeing procedure pointers in components

2025-03-21 Thread Paul Richard Thomas
Hi Andre, Gosh, that's a mighty complicated patch :-) I suggest changing the comment in the test case: s/Check that components of procedure pointer aren't freeed./Do not free procedure pointer components/ or some such. OK for mainline and, I propose, 14-branch. Regards and thanks Paul On Fri

New French PO file for 'gcc' (version 15.1-b20250316)

2025-03-21 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the French team of translators. The file is available at: https://translationproject.org/latest/gcc/fr.po (This file, 'gcc-15.1-b20250316.fr.po',

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

2025-03-21 Thread Alfie Richards
Minor update to add the PR label from Alex's feedback (thank you!). Regtested and bookstrapped for gcc-12 and gcc-13 (after applying r13-100-g3771486daa1e904ceae6f3e135b28e58af33849 to gcc-12). Alfie Andrew Carlotti (1): aarch64: Use PAUTH instead of V8_3A in some places gcc/config/aarch64/a

[PATCH] inliner: Silently drop musttail flag on calls during inlining unless the inlined routine was musttail called [PR119376]

2025-03-21 Thread Jakub Jelinek
Hi! As discussed in the PR, some packages fail to build because they use musttail attribute on calls in functions which we inline, and if they are inlined into a middle of the function, that results in an error because we have a musttail call in the middle of a function and so it can't be tail cal

[PATCH] icf: Punt for musttail call flag differences in ICF [PR119376]

2025-03-21 Thread Jakub Jelinek
Hi! The following testcase shows we were ignoring musttail flags on calls when deciding if two functions are the same. That can result in problems in both directions, either we silently lose musttail attribute because there is a similar function without it earlier and then we e.g. don't diagnose i

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

2025-03-21 Thread Tomasz Kaminski
On Thu, Mar 20, 2025 at 5:29 PM Jonathan Wakely wrote: > On Thu, 20 Mar 2025 at 16:16, Jonathan Wakely wrote: > > > > 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 __t

[PATCH] opcodes: fix wrong code in expand_binop_directly [PR117811]

2025-03-21 Thread Richard Earnshaw
If expand_binop_directly fails to add a REG_EQUAL note it tries to unwind and restart. But it can unwind too far if expand_binop changed some of the operands before calling it. We don't need to unwind that far anyway since we should end up taking exactly the same route next time, just without a t

[COMMITTED 111/146] gccrs: Visit the trait paths of trait implementations

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): When visiting a TraitImpl, visit its trait path. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by: Owen Avery --- gcc/rust/ast/rust-as

[COMMITTED 105/146] gccrs: cleanup our enum type layout to be closer to rustc

2025-03-21 Thread arthur . cohen
From: Philip Herron This changes our enum type layout so for example: enum Foo { A, B, C(char), D { x: i32, y: i32 }, } Used to get layed out like this in gccrs: union { struct A { int RUST$ENUM$DISR; }; struct B { int RUST$ENUM$DISR; }; struct C { int

[COMMITTED 115/146] gccrs: testsuite: Fix missing handling of little endian.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen Some failures occur in the testsuite because we did not account for the little-endian case. gcc/testsuite/ChangeLog: * rust/compile/issue-1446.rs: Add swap_bytes function. * rust/compile/iterators1.rs: Remove unused {to, from}_le functions. --- gcc/testsuite/

[COMMITTED 103/146] gccrs: fix ICE with hir dump on closure

2025-03-21 Thread arthur . cohen
From: Philip Herron Return type and parameter types are optional on closures. gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::visit): add null guard Signed-off-by: Philip Herron --- gcc/rust/hir/rust-hir-dump.cc | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --

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

2025-03-21 Thread Tomasz Kaminski
On Fri, Mar 21, 2025 at 11:14 AM Tomasz Kamiński wrote: > This is another piece of P1206R7, adding from_range constructor, > append_range, > prepend_range, insert_range, and assign_range members to std::deque. > > For insert_range, the handling of insertion in the middle of input-only > ranges >

[COMMITTED 128/146] gccrs: lang-item: Add LangItem::PrettyString

2025-03-21 Thread arthur . cohen
From: Arthur Cohen Which formats a lang item as it appears in source code. gcc/rust/ChangeLog: * util/rust-lang-item.cc (LangItem::PrettyString): New. * util/rust-lang-item.h: New. --- gcc/rust/util/rust-lang-item.cc | 6 ++ gcc/rust/util/rust-lang-item.h | 1 + 2 files ch

Re: C++/v3 PATCH to add/throw std::bad_array_new_length

2025-03-21 Thread Thomas Schwinge
Hi Jason! On 2025-03-20T11:52:46-0400, Jason Merrill wrote: > On 3/19/25 1:35 PM, Thomas Schwinge wrote: >> On 2013-05-03T16:24:43-0400, Jason Merrill wrote: >>> Last year Florian fixed the compiler to detect overflow in array new >>> size calculations and pass (size_t)-1 in that case. But C++1

[COMMITTED 130/146] gccrs: ast-collector: Adapt to lang item type path segments

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Fix collector to better handle lang item type path segments. --- gcc/rust/ast/rust-ast-collector.cc | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff -

[PATCH] aarch64: Add support for -mcpu=olympus

2025-03-21 Thread Dhruv Chawla
This adds support for the NVIDIA Olympus core to the AArch64 backend. The initial patch does not add any special tuning decisions, and those may come later. Bootstrapped and tested on aarch64-none-linux-gnu. gcc/ChangeLog: * config/aarch64/aarch64-cores.def (olympus): New entry.

[PATCH] c++: structural equality and partially inst typedef [PR119379]

2025-03-21 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Complex alias templates (and their dependent specializations) use structural equality because we want to treat them as transparent in some contexts but not others. Structural-ness however wasn't being preser

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

2025-03-21 Thread Iain Sandoe
It seems that libiberty already has replacements for most of the mem* functions, but they are not published via include/libiberty.h. Tested on x86_64 Linux, Darwin aarch64 Linux, OK for trunk? thanks, Iain --- 8< --- This adds an implementation of memrchr to libiberty and arranges to configure g

RE: [PATCH] cobol: Address some iconv issues.

2025-03-21 Thread Robert Dubner
As you have no doubt figured out, for input and output I am converting, as best I can, from system locale to CP1252 for "ASCII" and CP1140 for EBCDIC. We can't use UTF-8 internally for most purposes, because going back to a time before the Cuban Missile Crisis means that COBOL is built around an a

Re: [PATCH] fnsplit: Set musttail call during function splitting if there are musttail calls [PR119376]

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Jakub Jelinek wrote: > Hi! > > The just posted inliner patch can regress musttail calls if we perform > function splitting and then inline the outlined body back into the original > (or inline both the small function and outlined large body into something > else). > If there

[COMMITTED 028/146] gccrs: asm: Fix clang warnings

2025-03-21 Thread arthur . cohen
From: Arthur Cohen Fixes a couple of warnings thrown by clang, with mismatched class/struct usages and unused members. gcc/rust/ChangeLog: * ast/rust-expr.h: Remove invalid usage of `struct`. * backend/rust-compile-asm.h: Remove unused `translated` member. * backend/rust

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

2025-03-21 Thread Richard Earnshaw (lists)
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, 21 Mar 2025 at 11:18, Richard Earnshaw (lists) >>> wrote: On 20/03/2025 16:15, Christophe Lyon wrote: > Dependi

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

2025-03-21 Thread James K. Lowden
On Thu, 20 Mar 2025 22:01:28 + Jonathan Wakely wrote: > > LGTM. I am gun-shy about using iterators while modifying > > containers. I know there are rules. :-/ > > Yes, the erased iterator is invalidated, but it returns an iterator to > the next element after the erased one, so we can conti

[COMMITTED 129/146] gccrs: mappings: Add get_lang_item_node

2025-03-21 Thread arthur . cohen
From: Arthur Cohen This method errors out if the lang item has not been declared yet. gcc/rust/ChangeLog: * util/rust-hir-map.cc (Mappings::get_lang_item_node): New. * util/rust-hir-map.h: New function. --- gcc/rust/util/rust-hir-map.cc | 10 ++ gcc/rust/util/rust-hir-m

[COMMITTED 076/146] gccrs: lang-item: Remove unused NodeId from LangItemPath

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-path.h: Adapt children of Path to fix some NodeId issues. --- gcc/rust/ast/rust-path.h | 76 +++- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast

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

2025-03-21 Thread Jakub Jelinek
On Fri, Mar 21, 2025 at 07:12:23PM +0100, Richard Biener wrote: > So this is the following hunk where I totally misunderstood > real_to_target when converting this from native_encode_expr and > a tree to using REAL_VALUE_TYPE: > > @@ -15702,13 +15714,16 @@ initial_from_float128(cbl_field_t *field,

Re: [PATCH 09/10] testsuite: aarch64: arm: Fix -mfpu=auto support in fp16_neon_ok

2025-03-21 Thread Richard Earnshaw (lists)
On 20/03/2025 16:15, Christophe Lyon wrote: > Like a previous patch, replace "" with -mfpu=auto to match the > intended effect of -march=armv8.2-a+fp16. > > No visible change because the effect is masked by other effective > targets used in the tests, done for consistency. > > gcc/testsuite

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

2025-03-21 Thread Robert Dubner
Just so I understand your terminology: Am I to understand that by pulling master, and then applying the patch in this message, that the source code will be at the point you are ready to have me test? I am more used to being three hours ahead of the US west coast than I am to being five hours behi

[COMMITTED 123/146] gccrs: collect-lang-items: Display attribute upon error finding it

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-collect-lang-items.cc (get_lang_item_attr): Show unknown attribute upon error. --- gcc/rust/ast/rust-collect-lang-items.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/rust/ast/rust-collect-lang-items.cc b/

Re: [PATCH 04/10] testsuite: aarch64: restore torture options in vml[as]_float_not_used.c

2025-03-21 Thread Richard Earnshaw (lists)
On 20/03/2025 16:15, Christophe Lyon wrote: > Remove dg-options, so that the test is executed as expected using the > options defined by advsimd-intrinsics.exp. > > gcc/testsuite/ > * gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c: > Remove dg-options. > * gcc

Re: [PATCH 2/2] libstdc++: Fix std.compat exports of and

2025-03-21 Thread Tomasz Kaminski
On Thu, Mar 20, 2025 at 8:19 PM Jonathan Wakely wrote: > libstdc++-v3/ChangeLog: > > * src/c++23/std.compat.cc.in: Only export and > contents for C++26 and later. > --- > > Tested by compiling and importing both std and std.compat. > LGTM > > libstdc++-v3/src/c++23/std.compat.

[COMMITTED 104/146] gccrs: nr2.0: Resolve Self inside impl blocks

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Insert a definition for Self when visiting InherentImpl and TraitImpl instances. * resolve/rust-toplevel-name-resolver-2.0.h (TopLevel::visit): Add visitor

[COMMITTED 139/146] gccrs: derive(Clone): Add note about Clone::clone()

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc (DeriveClone::clone_call): Mention using `clone_fn` lang item in the future. --- gcc/rust/expand/rust-derive-clone.cc | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/rus

[committed 1/2] arm: testsuite: memcpy-aligned requires unaligned accesses

2025-03-21 Thread Richard Earnshaw
This test is designed to check that if one of the operands is aligned (but the other isn't) we expand to a sensible sequence and bypass most of the overhead of doing a memcpy. But on targets without unaligned accessess, we still end up calling memcpy. It's then a lottery as to whether the prologu

[COMMITTED 146/146] gccrs: nr2.0: late: Better format PathInExpression resolution

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Improve formatting. --- .../resolve/rust-late-name-resolver-2.0.cc | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/gcc/rust/resolve/rust-late-name-

[pushed] c++: fix return type of __cxa_bad_array_new_length

2025-03-21 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. Thomas Schwinge checked that it addresses the problem on nvptx. -- 8< -- We were lying about the return type, but that's not necessary; we already need to handle a COND_EXPR where one side is void for THROW_EXPR. This fixes an execution failure on

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

2025-03-21 Thread Richard Earnshaw (lists)
On 21/03/2025 14:05, Christophe Lyon wrote: > On Fri, 21 Mar 2025 at 11:18, Richard Earnshaw (lists) > wrote: >> >> On 20/03/2025 16:15, Christophe Lyon wrote: >>> Depending on if/how the testing flags are overridden, the first value >>> we try("") might not do what we want. >>> >>> For instance,

[COMMITTED 109/146] gccrs: rust/intrinsic: add new "catch_unwind" variant of API

2025-03-21 Thread arthur . cohen
From: liushuyu gcc/rust/ChangeLog: * backend/rust-compile-intrinsic.cc: add the new `catch_unwind` variant of the `try` intrinsic: this variant can be seen on Rust 1.78+ and returns `()` instead of `i32`. --- gcc/rust/backend/rust-compile-intrinsic.cc | 57 +++

[patch, avr] Add "used" attribute to code in .initN and .finiN

2025-03-21 Thread Georg-Johann Lay
For code in .initN and .finiN there are no calls, hence let the compiler add "used" attribute. Ok for trunk? Johann -- AVR: Add attribute "used" for code in .initN and .initN sections. Code in .initN and .initN sections is never called since these sections are special and part of the startup

Re: [Fortran, Patch, PR119349, v1] Fix regression of polymorphic dummy sourced from array constructors.

2025-03-21 Thread Andre Vehreschild
Hi Paul, thanks for the (additional) review. The patch has been merged already as gcc-15-8481-g0f344846a62. But I totally agree, that conv_procedure_call is calling (pun intended) for a refactoring. Thanks again, Andre On Fri, 21 Mar 2025 14:34:13 + Paul Richard Thomas wrote: > Hi

[COMMITTED 145/146] gccrs: derive(Clone): Add lang item typepaths failure testcases to nr2 exclude

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Add failing lang item typepaths tests. * rust/execute/torture/derive_macro4.rs: Mark Clone as lang item. --- gcc/testsuite/rust/compile/nr2/exclude | 5 + gcc/testsuite/rust/execute/torture/

  1   2   >