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] change cbl_field_data_t::etc_t::value from _Float128 to tree

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Jakub Jelinek wrote: > On Fri, Mar 21, 2025 at 01:47:05PM -0500, Robert Dubner wrote: > > > -Original Message- > > > From: Robert Dubner > > > Sent: Friday, March 21, 2025 14:23 > > > To: Richard Biener > > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek > > > Subject:

[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

[patch, avr] PR119421: Optimize more bit operations

2025-03-21 Thread Georg-Johann Lay
There are occasions where knowledge about nonzero bits makes some optimizations possible. For example, Rd |= Rn << Off can be implemented as SBRC Rn, 0 ORI Rd, 1 << Off when Rn in { 0, 1 }, i.e. nonzero_bits (Rn) == 1. This patch adds some patterns that exploit nonzero_bits() in so

Re: [PATCH] cobol, libgcobol: Currently libgcobol depends on libstdc++.

2025-03-21 Thread Richard Biener
On Fri, Mar 21, 2025 at 7:02 PM Iain Sandoe wrote: > > Tested on x86_64 linux, darwin, aarch64 linux, OK for trunk? OK. > thanks, > Iain > > --- 8< --- > > We need to add libstdc++ to link lines even when the link is not > '-static' since libgcobol depends on libstdc++. > > gcc/cobol/ChangeLog:

[PATCH] c++, libcpp: Allow some left shifts in the preprocessor [PR119391]

2025-03-21 Thread Jakub Jelinek
Hi! The libcpp left shift handling implements (partially) the C99-C23 wording where shifts are UB if shift count is negative, or too large, or shifting left a negative value or shifting left non-negative value results in something not representable in the result type (in the preprocessor case that

[committed] libgomp.fortran/get-mapped-ptr-1.f90: Use -6 for non-conf dev number

2025-03-21 Thread Tobias Burnus
Committed as r15-8659-gc264df142a850b: This is a fix for the GOMP_interop commit r15-8654-g99e2906ae255fc that added GOMP_DEVICE_DEFAULT_OMP_61 alias omp_default_device, which is a conforming device number. But that test used -5 as check for a non-conforming device number. Tobias commit c264

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

2025-03-21 Thread Jakub Jelinek
Hi! I have still strong doubts that this parser_display_internal replacement does what the code used to do before. On Fri, Mar 21, 2025 at 01:56:40PM +0100, Richard Biener wrote: > @@ -4884,8 +4883,9 @@ parser_display_internal(tree file_descriptor, > // We make use of that here > > ch

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

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

Re: [patch, avr] PR119421: Optimize more bit operations

2025-03-21 Thread Jeff Law
On 3/21/25 2:59 PM, Georg-Johann Lay wrote: There are occasions where knowledge about nonzero bits makes some optimizations possible.  For example,    Rd |= Rn << Off can be implemented as    SBRC Rn, 0    ORI  Rd, 1 << Off when Rn in { 0, 1 }, i.e. nonzero_bits (Rn) == 1.  This patch a

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

2025-03-21 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Friday, March 21, 2025 15:25 > To: Jakub Jelinek > Cc: Robert Dubner ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] change cbl_field_data_t::etc_t::value from _Float128 > to tree > > On Fri, 21 Mar 2025, Jakub Jelinek wrote: > > >

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

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Robert Dubner wrote: > I did what I described to apply the patch copied in this e-mail > > The results: You started with two errors in our gcc/cobol/tests, one was > the 55.5556 problem. That one is gone. But another test where a > couple of results that should be 0.0

[COMMITTED 125/146] gccrs: tychk: resolve lang item type paths properly

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Adapt code to handle lang item type paths. --- .../typecheck/rust-hir-type-check-type.cc | 26 --- 1 file changed, 17 insertions(+), 9 deletion

Re: Frontend access to target features (was Re: [PATCH] libgccjit: Add ability to get CPU features)

2025-03-21 Thread Antoni Boucher
Hi David. My gccrs patch was merged, so I was wondering if you could please review this patch again. It was also posted here on GitHub: https://github.com/antoyo/libgccjit/pull/6 Thanks. Le 29/10/2024 à 17:04, David Malcolm a écrit : On Tue, 2024-10-29 at 07:59 -0400, Antoni Boucher wrote:

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] libgomp/plugin: Add initial interop support to nvptx + gcn

2025-03-21 Thread Tobias Burnus
This patch has now been committed as r15-8657-g41b9c3b848c8cb with two changes: * In interop-fr-1.c, one assert did not properly handle the case -99 (= use default device) in the is-returned-device-number-correct check. (Or actually two: one for gcn and one identical one for nvptx.) * It fix

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

2025-03-21 Thread Andrew Pinski
On Fri, Mar 21, 2025 at 2:51 AM 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 shou

[COMMITTED 066/146] gccrs: lang-items: Add lang-items AST collector

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * Make-lang.in: Add new object file. * rust-session-manager.cc (Session::compile_crate): Call CollectLangItems. * ast/rust-collect-lang-items.cc: New file. * ast/rust-collect-lang-items.h: New file. --- gcc/rust/Make-lang.i

[COMMITTED 137/146] gccrs: ast-builder: Add new methods around type paths.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc: New functions. * ast/rust-ast-builder.h: Declare them. --- gcc/rust/ast/rust-ast-builder.cc | 57 ++-- gcc/rust/ast/rust-ast-builder.h | 13 +++- 2 files changed, 67 insertions(+),

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

[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

[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

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

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

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

[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

[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] 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++: ICE w/ dependently scoped template friend [PR119378]

2025-03-21 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for 14/13/12 (since it was reported against GCC 12)? This old regression is already fixed on trunk by r15-123 which contains this change. -- >8 -- Here we ICE during instantiation of the dependently scoped template friend te

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

2025-03-21 Thread Robert Dubner
Again: I am not sure how I can best help here, or even if I can. I am happy to run tests, so just ask. I am going to go back working on converting the larger UAT test suite. > -Original Message- > From: Robert Dubner > Sent: Friday, March 21, 2025 15:33 > To: Richard Biener ; Jakub Jel

[COMMITTED 056/146] gccrs: mappings: Move lang_item definitions to .cc

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-hir-map.h: Move definitions from header... * util/rust-hir-map.cc: ...to source file. --- gcc/rust/util/rust-hir-map.cc | 19 +++ gcc/rust/util/rust-hir-map.h | 18 ++ 2 files changed, 21 inserti

[pushed] c++: add fixed test [PR119378]

2025-03-21 Thread Patrick Palka
Fixed by r15-123 (specifically the change to set processing_template_decl when tsubsting UNBOUND_CLASS_TEMPLATE). PR c++/119378 gcc/testsuite/ChangeLog: * g++.dg/template/friend85.C: New test. --- gcc/testsuite/g++.dg/template/friend85.C | 16 1 file changed, 16

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 01:47:05PM -0500, Robert Dubner wrote: > > -Original Message- > > From: Robert Dubner > > Sent: Friday, March 21, 2025 14:23 > > To: Richard Biener > > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek > > Subject: RE: [PATCH] change cbl_field_data_t::etc_t::value from >

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

2025-03-21 Thread Sandra Loosemore
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 dumps; added C/C++ disjunction where needed. *

[PATCH] Export native_encode_real operating on REAL_VALUE_TYPE

2025-03-21 Thread Richard Biener
The following exports the native_encode_real worker, and makes it take a scalar float mode and REAL_VALUE_TYPE data instead of a tree for use in the COBOL frontend, avoiding creating of a temporary tree. Bootstrap / regtest in progress. Is this OK for the use in COBOL? Thanks, Richard.

[COMMITTED 136/146] gccrs: derive(Copy): Use copy lang item when deriving Copy.

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-copy.cc: Use lang item path. --- gcc/rust/expand/rust-derive-copy.cc | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gcc/rust/expand/rust-derive-copy.cc b/gcc/rust/expand/rust-derive-copy.cc index b

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

2025-03-21 Thread Robert Dubner
> -Original Message- > From: Robert Dubner > Sent: Friday, March 21, 2025 14:23 > To: Richard Biener > Cc: gcc-patches@gcc.gnu.org; Jakub Jelinek > Subject: RE: [PATCH] change cbl_field_data_t::etc_t::value from _Float128 > to tree > > Crossed in the mail. > > I applied your fixes belo

Re: [PATCH] Export native_encode_real operating on REAL_VALUE_TYPE

2025-03-21 Thread Jakub Jelinek
On Fri, Mar 21, 2025 at 07:33:15PM +0100, Richard Biener wrote: > The following exports the native_encode_real worker, and makes it > take a scalar float mode and REAL_VALUE_TYPE data instead of a tree > for use in the COBOL frontend, avoiding creating of a temporary tree. > > Bootstrap / regtest

Re: [PATCH] cobol, driver: Handle targets without HAVE_LD_STATIC_DYNAMIC.

2025-03-21 Thread Richard Biener
On Fri, Mar 21, 2025 at 5:02 PM Iain Sandoe wrote: > > Tested on x86_64 linux, darwin and aarch64 linux, OK for trunk? OK. Richard. > thanks > Iain > > --- 8< --- > > This fixes a typo where libraries were not added for targets without > HAVE_LD_STATIC_DYNAMIC. > > It also adds the libraries in

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

2025-03-21 Thread Robert Dubner
I am stepping my way through the code that initializes the COBOL variable 01 FLOATLONG FLOAT-LONG VALUE 12345678. In the version created by Richard's patch, I arrive at line 15721, which I have flagged with /**/. (My editor lacks the ability too prepend line numbers, sadly.) case F

[COMMITTED 042/146] gccrs: Use a reference wrapper to please GCC 4.8

2025-03-21 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): Change call. (CompileExpr::resolve_operator_overload): Update function arguments. * backend/rust-compile-expr.h: Change the function's prototype to use a reference

Re: COBOL: Implementation of STOP RUN / GOBACK

2025-03-21 Thread 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 >>>STOP RUN WITH NORMAL STATU

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

2025-03-21 Thread Christophe Lyon
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, 21 Mar 2025 at 11:18, Richard Earnshaw (lists) >

Re: [PATCH] cobol: Rename COB_{BLOCK,UNSIGNED,SIGNED} to {BLOCK,UNSIGNED,SIGNED}_kw for consistency

2025-03-21 Thread James K. Lowden
On Fri, 21 Mar 2025 10:21:13 +0100 Jakub Jelinek wrote: > On Wed, Mar 19, 2025 at 06:03:24PM -0400, James K. Lowden wrote: > > Elsewhere in the parser where there was a conflict like that, I > > renamed the token. For example, the COBOL word TRUE uses a token > > named TRUE_kw. I don't mind eit

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

2025-03-21 Thread Richard Biener
The following removes the main instance of _Float128 use in the cobol frontend and replaces it with a tree for cbl_field_data_t::etc_t::value and with REAL_VALUE_TYPE in some helpers. The default value is changed to a float128_type_node zero from 0.0. get_power_of_ten was picked from Jakubs PR119

Re: [pushed: r15-7126] jit: fix startup on aarch64

2025-03-21 Thread Antoni Boucher
Hi David! With your last patch, it will now silently ignore the target buitins that have an unsupported type. Would you be OK that I add a boolean option that, if set to true, would instead abort to show the error? I would find this useful to add the support for new types when there are new bu

[COMMITTED 017/146] gccrs: Improve handling of struct expressions in nr2.0

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Handle StructExprStruct and use ForeverStack::resolve_path instead of ForeverStack::get to resolve struct expression paths. * resolve/rust-late-name-resolver-2.0.h

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

[COMMITTED 057/146] gccrs: hir: Remove duplicate function in TraitItemFunc

2025-03-21 Thread arthur . cohen
From: Arthur Cohen Both TraitItemFunc::has_definition() and TraitItemFunc::has_block_defined() were exactly the same implementation, so remove one. gcc/rust/ChangeLog: * hir/tree/rust-hir-item.h: Remove TraitItemFunc::has_block_defined() * backend/rust-compile-implitem.cc (Compi

[COMMITTED 122/146] gccrs: attributes: Add #[derive] as a built-in attribute

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-attribute-values.h: Declare new attribute value. * util/rust-attributes.cc: Use it. --- gcc/rust/util/rust-attribute-values.h | 1 + gcc/rust/util/rust-attributes.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc

[COMMITTED 043/146] gccrs: Use nr2.0 in PrivacyReporter

2025-03-21 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_for_privacy_violation): Use name resolver 2.0. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. Signed-off-by: Owen Avery --- ...

[COMMITTED 051/146] gccrs: fix crash in hir dump with missing guards

2025-03-21 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * hir/rust-hir-dump.cc (Dump::visit): add missing null checks Signed-off-by: Philip Herron --- gcc/rust/hir/rust-hir-dump.cc | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rus

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

2025-03-21 Thread Jason Merrill
On 3/20/25 12:48 PM, Thomas Schwinge wrote: Hi Jason! On 2025-03-20T11:59:07-0400, Jason Merrill wrote: On 3/20/25 11:35 AM, Thomas Schwinge wrote: Appears that I'm too dumb to implement : | We "simply" need to transform any symbol ali

Re: [PATCH] lra, v2: emit caller-save register spills before call insn [PR116028]

2025-03-21 Thread Jakub Jelinek
On Fri, Mar 21, 2025 at 02:00:18PM +0100, Jakub Jelinek wrote: > I have some concerns: > 1) I wonder if there is a guarantee that first_call_insn if non-NULL will be >always in between curr_insn and usage_insn when call_save_p; I'd hope >yes because if usage_insn is before first_call_insn i

Re: [PATCH v3, backport] c++: Don't prune constant capture proxies only used in array dimensions [PR114292]

2025-03-21 Thread Simon Martin
Hi, On Thu Mar 20, 2025 at 2:54 PM CET, Jason Merrill wrote: [...] > Thanks a lot. Merged to trunk as r15-7238-gceabea405ffdc8. > > Even though it’s an “old” regression (from GCC 7), it’s a > reject-valid and I’m tempted to backport; OK for active branches as > well? >>>

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

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

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,

Re: [PATCH 2/4] cfgloopmanip: Add infrastructure for scaling of multi-exit loops [PR117790]

2025-03-21 Thread Alex Coplan
Ping^7 On 06/03/2025 10:48, Alex Coplan wrote: > Ping^6 > > On 19/02/2025 12:15, Alex Coplan wrote: > > Ping^5 for patches 2-4: > > https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672677.html > > https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672678.html > > https://gcc.gnu.org/pip

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

[PATCH] cobol, driver: Handle targets without HAVE_LD_STATIC_DYNAMIC.

2025-03-21 Thread Iain Sandoe
Tested on x86_64 linux, darwin and aarch64 linux, OK for trunk? thanks Iain --- 8< --- This fixes a typo where libraries were not added for targets without HAVE_LD_STATIC_DYNAMIC. It also adds the libraries in this case; typically, a target without HAVE_LD_STATIC_DYNAMIC can take the -static-lib

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

2025-03-21 Thread Alex Coplan
On 21/03/2025 14:06, Matthew Malcomson wrote: > 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 whic

[COMMITTED 065/146] gccrs: lang-items: Store NodeId mappings for lang items

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-hir-map.h: Keep a NodeId mappings for lang items. * util/rust-hir-map.cc (Mappings::insert_lang_item_node): New function. (Mappings::lookup_lang_item_node): Likewise. --- gcc/rust/util/rust-hir-map.cc | 22 ++

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

2025-03-21 Thread Christophe Lyon
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: > >>> Depending on if/how the testing flags are overridden, the

Re: [PATCH 1/1][RFC] Induction vectorizer: prevent ICE for scalable types

2025-03-21 Thread Richard Biener
On Thu, 20 Mar 2025, Spencer Abson wrote: > We currently check that the target suppports PLUS_EXPR and MINUS_EXPR > with step_vectype (a fix for pr103523). However, vectorizable_induction > can emit a vectorized MULT_EXPR when calculating the step of each IV for > SLP, and both MULT_EXPR/FLOAT_EX

[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: [PATCH] gimple: sccopy: Don't increment i after vec::unordered_remove()

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Filip Kastl wrote: > On Thu 2025-03-20 13:31:38, Richard Biener wrote: > > On Thu, 20 Mar 2025, Filip Kastl wrote: > > > > > Hi, > > > > > > Ok to push if bootstrap and regtest (on x86_64 linux) succeeds? > > > > OK. > > > > And I again almost forgot: Can I backport this

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

[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

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

2025-03-21 Thread Richard Biener
On Fri, 21 Mar 2025, Robert Dubner wrote: > 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? Yes. > I am more used to being three hours

[PING^1][PATCH v2] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-03-21 Thread jeevitha
Ping! please review. Thanks & Regards Jeevitha On 20/02/25 7:41 pm, jeevitha wrote: > Hi All, > > The following patch has been bootstrapped and regtested on powerpc64le-linux. > > Changes to amo.h include the addition of the following load atomic operations: > Compare and Swap Not Equal, Fetch

[COMMITTED 133/146] gccrs: builder: Allow generating struct statements

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::struct_struct): New function. * ast/rust-ast-builder.h (vec): New function. --- gcc/rust/ast/rust-ast-builder.cc | 15 +++ gcc/rust/ast/rust-ast-builder.h | 31 +++

[COMMITTED 134/146] gccrs: derive(Clone): Manually generate AssertParamIsCopy struct for unions

2025-03-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-derive-clone.cc (DeriveClone::visit_union): Manually generate the struct used for asserting a union implements Copy. --- gcc/rust/expand/rust-derive-clone.cc | 38 +--- 1 file changed, 34 insertions(+)

[COMMITTED 127/146] gccrs: lang-items: Collect struct lang items.

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

[COMMITTED 117/146] gccrs: Revert "gcc/rust/ChangeLog:"

2025-03-21 Thread arthur . cohen
From: CohenArthur This reverts commit 600fd806b8821ea24103ea0f31d666077245c6b7. --- gcc/rust/ast/rust-collect-lang-items.cc | 7 ++- gcc/rust/util/rust-attributes.cc| 8 gcc/rust/util/rust-attributes.h | 2 -- 3 files changed, 6 insertions(+), 11 deletions(-) diff -

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

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

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

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

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

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

  1   2   >