[PATCH] testsuite: Fix gcc.target/powerpc/vsx-builtin-7.c test [PR119382]

2025-03-24 Thread jeevitha
Hi All, The following patch has been tested on powerpc64le-linux and verified it's fixed. The test vsx-builtin-7.c was failing on powerpc64le-linux due to identical function detection by ICF. This behavior was introduced by commit r15-7961-gdc47161c1f32c3, which improved alias analysis in ao_comp

[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

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

[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

[PUSHEDv2] vect: Add assert to expand_vector_conversion [PR118616]

2025-03-24 Thread Andrew Pinski
In some cases (after inliing due to LTO and -O3), GCC cannot figure out that the length of the converts vect is not empty when supportable_indirect_convert_operation returns true. So we get an extra warning because we loop through all but the last entry and GCC decided that `converts.length () - 1`

Re: [PATCH] c++: Don't mix timevar_start and auto_cond_timevar for TV_NAME_LOOKUP [PR116681]

2025-03-24 Thread Simon Martin
Hi, On Sun Mar 23, 2025 at 8:30 PM CET, Jason Merrill wrote: > On 3/23/25 1:55 AM, Simon Martin wrote: >> Hi, >> >> On Sat Sep 14, 2024 at 10:00 AM CEST, Jason Merrill wrote: >>> On 9/13/24 1:31 PM, Simon Martin wrote: We currently ICE upon the following testcase when using -ftime-report >>>

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

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

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

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

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

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

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

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

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

2025-03-24 Thread Kito Cheng
On Mon, Mar 24, 2025 at 11:35 PM Robin Dapp wrote: > > > This does not only happen on ELEN=32 and VLEN=32, it happened on all > > ELEN=32 arch, and one of our internal configurations hit this... > > Wait, is there something I keep missing? There must be I guess. > > Disregarding the SEW=8 case be

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.

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

2025-03-24 Thread Sandra Loosemore
On 3/24/25 08:20, Paul-Antoine Arras wrote: On 21/03/2025 20:17, Sandra Loosemore wrote: Does the attached patch reflect what you have in mind? diff --git libgomp/libgomp_g.h libgomp/libgomp_g.h index 8993ec610fb..274f4937680 100644 --- libgomp/libgomp_g.h +++ libgomp/libgomp_g.h @@ -359,9 +359,

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

[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

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

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

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

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

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

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] c++: Fix ICE when template lambdas call with default parameters in unevaluated context

2025-03-24 Thread Jason Merrill
On 3/22/25 4:38 PM, yxj-github-437 wrote: This patch would like to avoid the ICE when template lambdas call with default parameters in unevaluated context. For example as blow: 1 │ template 2 │ void foo(T x) { 3 │ sizeof [](T=x) { return 0; }(); 4 │ } 5 │

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

2025-03-24 Thread Harald Anlauf
Hi Thomas, Am 24.03.25 um 21:40 schrieb 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) :: lo

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

2025-03-24 Thread Vineet Gupta
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. reverting the orig patch which takes away th

[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, V3] PR target/118541 - Do not generate unordered fp cmoves for IEEE compares on PowerPC

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

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

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

[wwwdocs] Add Ada's GCC 15 changelog entry

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

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

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

Re: [PATCH] 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

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

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

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

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

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

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

Re: [PATCH] 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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

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,

[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

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

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.

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

[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

[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 110/141] gccrs: lower: Error out when lowering ErrorPropagationExpr

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   3   >