Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-07 Thread Sam James
Florian Weimer writes: > --- > htdocs/gcc-14/porting_to.html | 465 > ++ > 1 file changed, 465 insertions(+) > Can't approve but LGTM. Thank you for being so thorough - it'll be helpful when showing upstreams. > diff --git

Re: [PATCH] x86: Update constraints for APX NDD instructions

2024-02-07 Thread Hongtao Liu
On Tue, Feb 6, 2024 at 11:49 AM H.J. Lu wrote: > > 1. The only supported TLS code sequence with ADD is > > addq foo@gottpoff(%rip),%reg > > Change je constraint to a memory operand in APX NDD ADD pattern with > register source operand. > > 2. The instruction length of APX NDD instructions

RE: RE: [PATCH v1] RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker

2024-02-07 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Thursday, February 8, 2024 2:43 PM To: Li, Pan2 ; gcc-patches Cc: Wang, Yanzhang ; kito.cheng Subject: Re: RE: [PATCH v1] RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker LGTM

Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-02-07 Thread Greg McGary
On 2/4/24 9:58 PM, Jeff Law wrote: On 2/2/24 15:48, Greg McGary wrote: input: (sign_extend:DI (mem/c:SI (symbol_ref:DI ("minus_1") [flags 0x86] ) [1 minus_1+0 S4 A32])) result: (subreg:DI (mem/c:SI (symbol_ref:DI ("minus_1") [flags 0x86] ) [1 minus_1+0 S4 A32]) 0) Later, the high part

Re: [PATCH RFA] build: drop target libs from LD_LIBRARY_PATH [PR105688]

2024-02-07 Thread Alexandre Oliva
On Feb 6, 2024, Jason Merrill wrote: > Reverting that hunk of the change fixed my problem with bubblestrapping GCC > 12 with ccache on a host with a newer system libstdc++. Did you have libcc1, gnattools and gotools enabled in your testing? Those non-bootstrapped tools are most likely to be

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-07 Thread Marek Polacek
On Wed, Feb 07, 2024 at 04:32:57PM -0500, Jason Merrill wrote: > On 2/6/24 19:23, Hans-Peter Nilsson wrote: > > > Date: Mon, 22 Jan 2024 14:33:59 -0500 > > > From: Marek Polacek > > > > > On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: > > > > I don't really know whether this

[PATCH] c++: make build_throw SFINAE-friendly [PR98388]

2024-02-07 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Here the problem is that we give hard errors while substituting template parameters during overload resolution of is_throwable which has an invalid throw in decltype. The backtrace shows that fn_type_unification ->

RE: [PATCH v1] RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker

2024-02-07 Thread Li, Pan2
I think it relates to the location of frm args. For example, we use below to get the operand index. And then pass to function_checker. unsigned int frm_num = c.arg_num () - 2; Unfortunately, the function checker treat argno as unsigned, thus we need to ensure that c.arg_num () is not less than

[committed] c: Fix boolean conversion of floating constant as integer constant expression [PR113776]

2024-02-07 Thread Joseph Myers
My fix for bug 111059 and bug 111911 caused a conversion of a floating constant to boolean to wrongly no longer be considered an integer constant expression, because logic to insert a NOP_EXPR in c_objc_common_truthvalue_conversion for an argument not an integer constant expression itself now took

Re: [committed][gcc-wwwdocs] Add blurb about bitfield signedness on mcore

2024-02-07 Thread Jeff Law
On 2/7/24 14:23, Gerald Pfeifer wrote: On Tue, 19 Dec 2023, Jeff Law wrote: Pushed to the trunk. Is this minor follow-up okay, adding a full stop and shortening a bit? Yes, of course. Thanks. jeff

Re: Repost [PATCH 6/6] PowerPC: Add support for 1,024 bit DMR registers.

2024-02-07 Thread Michael Meissner
On Mon, Feb 05, 2024 at 11:58:31AM +0800, Kewen.Lin wrote: > Hi Mike, I will comment on about 1/2 of the things, and come back with the other comments. > on 2024/1/6 07:42, Michael Meissner wrote: > > This patch is a prelimianry patch to add the full 1,024 bit dense math > > register> (DMRs)

[RFC 2/3] RISC-V: Add Zalrsc and Zaamo testsuite support

2024-02-07 Thread Patrick O'Neill
Convert testsuite infrastructure to use Zalrsc and Zaamo rather than A. gcc/testsuite/ChangeLog: * gcc.target/riscv/amo-table-a-6-amo-add-1.c: Use Zaamo rather than A. * gcc.target/riscv/amo-table-a-6-amo-add-2.c: Ditto. * gcc.target/riscv/amo-table-a-6-amo-add-3.c:

[RFC 3/3] RISC-V: Add Zalrsc amo-op patterns

2024-02-07 Thread Patrick O'Neill
All amo patterns can be represented with lrsc sequences. Add these patterns as a fallback when Zaamo is not enabled. gcc/ChangeLog: * config/riscv/sync.md (atomic_): New expand pattern. (amo_atomic_): Rename amo pattern. (atomic_fetch_): New lrsc sequence pattern.

[RFC 1/3] RISC-V: Add basic Zaamo and Zalrsc support

2024-02-07 Thread Patrick O'Neill
There is a proposal to split the A extension into two parts: Zaamo and Zalrsc. This patch adds basic support by making the A extension imply Zaamo and Zalrsc. Proposal: https://github.com/riscv/riscv-zaamo-zalrsc/tags gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Add Zaamo and

Re: Repost [PATCH 3/6] PowerPC: Add support for accumulators in DMR registers.

2024-02-07 Thread Michael Meissner
On Wed, Feb 07, 2024 at 05:38:46PM +0800, Kewen.Lin wrote: > >>> -(define_insn_and_split "*movxo" > >>> +(define_insn_and_split "*movxo_nodm" > >>>[(set (match_operand:XO 0 "nonimmediate_operand" "=d,ZwO,d") > >>> (match_operand:XO 1 "input_operand" "ZwO,d,d"))] > >>> - "TARGET_MMA > >>> +

[pushed] c++: class nttp ICE

2024-02-07 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. Marek, I'll leave it to you to judge if there is anything else needed for P2308. -- 8< -- The new testcase from P2308 crashed trying to expand 'this' without an object to refer to, because we stripped the TARGET_EXPR in create_template_parm_object.

[r14-8838 Regression] FAIL: gcc.dg/vect/vect-early-break_110-pr113467.c (test for excess errors) on Linux/x86_64

2024-02-07 Thread haochen.jiang
On Linux/x86_64, 194d0956ef5992d4e453bde3eb5772dc077f610c is the first bad commit commit 194d0956ef5992d4e453bde3eb5772dc077f610c Author: Tamar Christina Date: Wed Feb 7 10:57:05 2024 + middle-end: add additional runtime test for [PR113467] caused FAIL:

Re: [PATCH v2] c++: DR2237, cdtor and template-id tweaks [PR107126]

2024-02-07 Thread Jason Merrill
On 2/5/24 22:11, Marek Polacek wrote: On Mon, Feb 05, 2024 at 10:14:34AM -0500, Jason Merrill wrote: On 2/3/24 10:24, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? I'm not certain OPT_Wc__20_extensions is the best thing for something from [diff.cpp17];

Re: [PATCH] c++: NTTP type CTAD w/ tmpl from current inst [PR113649]

2024-02-07 Thread Jason Merrill
On 2/6/24 16:59, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Since template argument coercion happens relative to the most general template (for a class template at least), during NTTP type CTAD we might need to consider outer

Re: [PATCH] c++: Don't ICE for unknown parameter to constexpr'd switch-statement, PR113545

2024-02-07 Thread Jason Merrill
On 2/6/24 19:23, Hans-Peter Nilsson wrote: Date: Mon, 22 Jan 2024 14:33:59 -0500 From: Marek Polacek On Mon, Jan 22, 2024 at 06:02:32PM +0100, Hans-Peter Nilsson wrote: I don't really know whether this is the right way to treat CONVERT_EXPR as below, but... Regtested native

Re: [committed][gcc-wwwdocs] Add blurb about bitfield signedness on mcore

2024-02-07 Thread Gerald Pfeifer
On Tue, 19 Dec 2023, Jeff Law wrote: > Pushed to the trunk. Is this minor follow-up okay, adding a full stop and shortening a bit? Gerald diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 6d917535..dbc77493 100644 --- a/htdocs/gcc-14/changes.html +++

Re: [PATCH RFA] build: drop target libs from LD_LIBRARY_PATH [PR105688]

2024-02-07 Thread Ian Lance Taylor
On Tue, Feb 6, 2024 at 6:08 PM Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. Any thoughts? It still makes sense to me, for what that's worth. Ian > -- 8< -- > > The patch for PR22340 (r104978) moved the adding of TARGET_LIB_PATH to > RPATH_ENVVAR from POSTSTAGE1_HOST_EXPORTS to

Re: Repost [PATCH 5/6] PowerPC: Switch to dense math names for all MMA operations.

2024-02-07 Thread Michael Meissner
On Sun, Feb 04, 2024 at 01:47:12PM +0800, Kewen.Lin wrote: > > diff --git a/gcc/config/rs6000/mma.md b/gcc/config/rs6000/mma.md > > index 525a85146ff..f06e6bbb184 100644 > > --- a/gcc/config/rs6000/mma.md > > +++ b/gcc/config/rs6000/mma.md > > @@ -227,13 +227,22 @@ (define_int_attr apv

Re: Repost [PATCH 1/6] Add -mcpu=future

2024-02-07 Thread Michael Meissner
On Wed, Feb 07, 2024 at 05:21:10PM +0800, Kewen.Lin wrote: > on 2024/2/6 14:01, Michael Meissner wrote: > Sorry for the possible confusion here, the "tune_proc" that I referred to is > the variable in the above else branch: > >enum processor_type tune_proc = (TARGET_POWERPC64 ?

Re: [PATCH] c++: for contracts, cdtors never return this

2024-02-07 Thread Jason Merrill
On 2/7/24 11:22, Torbjorn SVENSSON wrote: Hi, Is it okay to backport 71804526d3a71a8c0f189a89ce3aa615784bfd8b to releases/gcc-13? OK. Without this backport, I see these failures on arm-none-eabi: FAIL: g++.dg/contracts/contracts-ctor-dtor2.C    (test for errors, line 23) FAIL:

Re: [PATCH] libstdc++: Work around modules issue causing hello-1 ICE [PR113710]

2024-02-07 Thread Patrick Palka
On Wed, 7 Feb 2024, Jonathan Wakely wrote: > > > On Wed, 7 Feb 2024 at 17:29, Patrick Palka wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > > > OK. > > Do we have a reduced testcase to track the modules bug that will still exist > in the FE?

Re: [PATCH] testsuite: Pattern does not match when using --specs=nano.specs

2024-02-07 Thread Mike Stump
On Feb 6, 2024, at 8:58 AM, Torbjörn SVENSSON wrote: > > Ok for trunk and releases/gcc-13? Ok. If .* goes across newlines, you might want to not use .. > -if {![regexp -- "/${compiler}(\\.exe)? -quiet.*$compiler_pattern" > $gcc_output]} { > +if {![regexp -- "/${compiler}(\\.exe)?

Re: [PATCH] Arm: Fix incorrect tailcall-generation for indirect calls [PR113780]

2024-02-07 Thread Richard Earnshaw (lists)
On 07/02/2024 07:59, Tejas Belagod wrote: > This patch fixes a bug that causes indirect calls in PAC-enabled functions > to be tailcalled incorrectly when all argument registers R0-R3 are used. > > Tested on arm-none-eabi for armv8.1-m.main. OK for trunk? > > 2024-02-07 Tejas Belagod > >

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2024-02-07 Thread Torbjorn SVENSSON
On 2024-02-07 17:33, Jonathan Wakely wrote: On Wed, 7 Feb 2024 at 16:31, Torbjorn SVENSSON mailto:torbjorn.svens...@foss.st.com>> wrote: Hi, Is it okay to backport 62b29347c38394ae32858f2301aa9aa65205984e, 2a4d9e4f533c77870cc0eb60fbbd8047da4c7386 and

Re: [PATCH 1/2] Fix contracts-tmpl-spec2.C on targets where plain char is unsigned by default

2024-02-07 Thread Torbjorn SVENSSON
On 2024-02-07 18:13, Andrew Pinski (QUIC) wrote: -Original Message- From: Torbjorn SVENSSON Sent: Wednesday, February 7, 2024 8:23 AM To: Andrew Pinski (QUIC) ; gcc- patc...@gcc.gnu.org Cc: Yvan Roux Subject: Re: [PATCH 1/2] Fix contracts-tmpl-spec2.C on targets where plain char is

Re: [PATCH] libstdc++: Work around modules issue causing hello-1 ICE [PR113710]

2024-02-07 Thread Jonathan Wakely
On Wed, 7 Feb 2024 at 17:29, Patrick Palka wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > OK. Do we have a reduced testcase to track the modules bug that will still exist in the FE? > > -- >8 -- > > The forward declarations of std::get in added in >

[PATCH] libstdc++: Work around modules issue causing hello-1 ICE [PR113710]

2024-02-07 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- The forward declarations of std::get in added in r14-8710-g65b4cba9d6a9ff are causing an ICE in the test modules/hello-1 due to what seems to be a declaration merging issue in modules. What seems to be happening is that in

RE: [PATCH 1/2] Fix contracts-tmpl-spec2.C on targets where plain char is unsigned by default

2024-02-07 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Torbjorn SVENSSON > Sent: Wednesday, February 7, 2024 8:23 AM > To: Andrew Pinski (QUIC) ; gcc- > patc...@gcc.gnu.org > Cc: Yvan Roux > Subject: Re: [PATCH 1/2] Fix contracts-tmpl-spec2.C on targets where plain > char is unsigned by default > > Hi, > > Is

Re: [PATCH v2] libstdc++: optimize bit iterators assuming normalization [PR110807]

2024-02-07 Thread Jonathan Wakely
On Wed, 7 Feb 2024 at 16:25, Torbjorn SVENSSON < torbjorn.svens...@foss.st.com> wrote: > Hi, > > Is it okay to backport e39b3e02c27bd771a07e385f9672ecf1a45ced77 to > releases/gcc-13? > It would also need 807f47497f17ed50be91f0f879308cb6fa063966 Please test with that as well, and OK for both if

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2024-02-07 Thread Jonathan Wakely
On Wed, 7 Feb 2024 at 16:31, Torbjorn SVENSSON < torbjorn.svens...@foss.st.com> wrote: > Hi, > > Is it okay to backport 62b29347c38394ae32858f2301aa9aa65205984e, > 2a4d9e4f533c77870cc0eb60fbbd8047da4c7386 and > ba0cde8ba2d93b7193050eb5ef3cc6f7a2cdfe61 to releases/gcc-13? > > Without this

Re: Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport 62b29347c38394ae32858f2301aa9aa65205984e, 2a4d9e4f533c77870cc0eb60fbbd8047da4c7386 and ba0cde8ba2d93b7193050eb5ef3cc6f7a2cdfe61 to releases/gcc-13? Without this backport, I see these failures on arm-none-eabi: FAIL: 29_atomics/atomic/compare_exchange_padding.cc

Re: [PATCH] Revert "Pass GUILE down to subdirectories"

2024-02-07 Thread Christian Biesinger
On Mon, Jan 22, 2024 at 7:21 PM Tom Tromey wrote: > This reverts commit b7e5a29602143b53267efcd9c8d5ecc78cd5a62f. > > This patch caused problems for some users when building gdb, because > it would cause 'guild' to be invoked with the wrong versin of guile. > Is "guild" here a typo? (I don't

Re: [PATCH v2] libstdc++: optimize bit iterators assuming normalization [PR110807]

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport e39b3e02c27bd771a07e385f9672ecf1a45ced77 to releases/gcc-13? Without this backport, I see this failure on arm-none-eabi: FAIL: 23_containers/vector/bool/110807.cc (test for excess errors) Kind regards, Torbjörn On 2023-11-09 02:22, Jonathan Wakely wrote: On

Re: [PATCH] call maybe_return_this in build_clone

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport 0d24289d129639efdc79338a64188d6d404375e8 to releases/gcc-13? Without this backport, I see these failures on arm-none-eabi: FAIL: g++.dg/warn/Wuse-after-free3.C -std=gnu++14 (test for excess errors) FAIL: g++.dg/warn/Wuse-after-free3.C -std=gnu++17 (test for

Re: [PATCH 1/2] Fix contracts-tmpl-spec2.C on targets where plain char is unsigned by default

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport 6e15e4e1abed02443a27a69455f4bfa49457c99e to releases/gcc-13? Without this backport, I see this failure on arm-none-eabi: FAIL: g++.dg/contracts/contracts-tmpl-spec2.C output pattern test Kind regards, Torbjörn On 2023-11-26 03:57, Andrew Pinski wrote: Since

Re: [PATCH] c++: for contracts, cdtors never return this

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport 71804526d3a71a8c0f189a89ce3aa615784bfd8b to releases/gcc-13? Without this backport, I see these failures on arm-none-eabi: FAIL: g++.dg/contracts/contracts-ctor-dtor2.C(test for errors, line 23) FAIL: g++.dg/contracts/contracts-ctor-dtor2.C(test for errors,

Re: [PATCH] analyzer: deal with -fshort-enums

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport 3cbab07b08d2f3a3ed34b6ec12e67727c59d285c to releases/gcc-13? Without this backport, I see these failures on arm-none-eabi: FAIL: gcc.dg/analyzer/switch-enum-1.c (test for bogus messages, line 26) FAIL: gcc.dg/analyzer/switch-enum-1.c (test for bogus messages,

Re: [PATCH 1/2] c-family: -Waddress-of-packed-member and casts

2024-02-07 Thread Torbjorn SVENSSON
Hi, Is it okay to backport b7e4a4c626eeeb32c291d5bbbaa148c5081b6bfd to releases/gcc-13? Without this backport, I see these failures on arm-none-eabi: FAIL: gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c (test for excess errors) FAIL:

Re: [PATCH] Revert "Pass GUILE down to subdirectories"

2024-02-07 Thread Andrew Burgess
Tom Tromey writes: > This reverts commit b7e5a29602143b53267efcd9c8d5ecc78cd5a62f. > > This patch caused problems for some users when building gdb, because > it would cause 'guild' to be invoked with the wrong versin of guile. > On the whole it seems simpler to just back this out. > > *

Re: [COMMITTED 07/25] gccrs: TyTy: Store region constraints

2024-02-07 Thread Arthur Cohen
On 2/7/24 16:26, Bernhard Reutner-Fischer wrote: On Wed, 7 Feb 2024 12:43:53 +0100 arthur.co...@embecosm.com wrote: diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h b/gcc/rust/typecheck/rust-hir-type-check-implitem.h index 067465ec77a..4d178440775 100644 ---

Re: [PATCH] ranger: Grow BBs in relation oracle as needed [PR113735]

2024-02-07 Thread Jakub Jelinek
On Tue, Feb 06, 2024 at 01:28:06PM +0100, Aldy Hernandez wrote: > The relation oracle grows the internal vector of SSAs as needed, but > due to an oversight was not growing the basic block vector. This > fixes the oversight. > > OK for trunk? > > PR tree-optimization/113735 > >

Re: [COMMITTED 07/25] gccrs: TyTy: Store region constraints

2024-02-07 Thread Bernhard Reutner-Fischer
On Wed, 7 Feb 2024 12:43:53 +0100 arthur.co...@embecosm.com wrote: > diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h > b/gcc/rust/typecheck/rust-hir-type-check-implitem.h > index 067465ec77a..4d178440775 100644 > --- a/gcc/rust/typecheck/rust-hir-type-check-implitem.h > +++

[PATCH v3]: gcc/doc/extend.texi: Update builtin descriptions for __builtin_FILE, __builtin_LINE __builtin_FUNCTION

2024-02-07 Thread Jonny Grant
2024-02-07 Jonathan Grant gcc/ChangeLog: * doc/extend.texi: Update builtin descriptions for __builtin_FILE __builtin_LINE __builtin_FUNCTION. >From 9e0b662b5b036f37d7ca90db607bacbb0012e8b3 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Wed, 7 Feb 2024 14:51:34 + Subject:

Re: [PATCH v2]: gcc/doc/extend.texi: Update builtin example for __builtin_FILE, __builtin_LINE __builtin_FUNCTION

2024-02-07 Thread Jonny Grant
On 14/01/2024 05:34, Sandra Loosemore wrote: > On 1/10/24 14:28, Jonny Grant wrote: >> >> 2024-01-10  Jonathan Grant  >> gcc/ChangeLog: >> * doc/extend.texi: Update builtin example for __builtin_FILE >>   __builtin_LINE __builtin_FUNCTION. >> >> >> >>>From

[PATCH] tree-optimization/113796 - if-conversion and ranges

2024-02-07 Thread Richard Biener
The following makes sure to wipe range info before folding the COND_EXPRs we insert as part of replacing PHI nodes when combining blocks in the if-conversion pass. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/113796 * tree-if-conv.cc

Re: [wwwdocs] Add 2 more C++26 core papers

2024-02-07 Thread Marek Polacek
On Wed, Feb 07, 2024 at 10:58:18AM +0100, Jakub Jelinek wrote: > Hi! > > cppreference has 2 more Kona papers listed and it seems eel.is/c++draft/ > has those papers incorporated. > > Ok for wwwdocs? Patch is OK. W3 validates fine too. Thanks, > diff --git a/htdocs/projects/cxx-status.html

[COMMITTED 23/25] gccrs: Parse trait functions as `AST::Function`.

2024-02-07 Thread arthur . cohen
From: Kushal Pal To use AST::Function for trait functions, we can parse trait functions using available parse_function(). gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_trait_item): Use parse_function() to parse trait functions. Signed-off-by: Kushal Pal ---

[COMMITTED 25/25] gccrs: Fix macro parsing for trait items.

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_trait_item): Handle macros in trait items similar to how its handled for trait implementation items. Signed-off-by: Kushal Pal --- gcc/rust/parse/rust-parse-impl.h | 37

[COMMITTED 20/25] gccrs: Add checks for Trait functions

2024-02-07 Thread arthur . cohen
From: Kushal Pal Since we want to use AST::Function class for trait functions as well, we need to check against specific conditions in ASTValidation phase. gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add checks for Trait functions.

[COMMITTED 24/25] gccrs: Remove obsolete classes and functions.

2024-02-07 Thread arthur . cohen
From: Kushal Pal Trait functions now use AST::Function class, so classes AST::TraitItemFunc, AST::TraitItemMethod, AST::TraitFunctionDecl, AST::TraitMethodDecl and their related functions can be removed. gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit):

[COMMITTED 19/25] gccrs: Use AssociatedItem in place of TraitItem

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * ast/rust-ast.h: Replace TraitItem with AssociatedItem. * ast/rust-item.h (class Trait): Likewise. * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise. * parse/rust-parse-impl.h (Parser::parse_trait):

[COMMITTED 14/25] gccrs: remove similar hack in type paths as we had in path expressions

2024-02-07 Thread arthur . cohen
From: Philip Herron This keeps the resolution code in line with paths. Addresses #2723 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc: remove hack --- gcc/rust/typecheck/rust-hir-type-check-type.cc | 16 1 file changed, 16 deletions(-) diff --git

[COMMITTED 08/25] gccrs: TyTy: Store reference to type before any substitutions

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-tyty.cc (BaseType::BaseType): Store orig ref. (BaseType::get_orig_ref): Add getter. * typecheck/rust-tyty.h: Store orig ref. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty.cc | 10 --

[COMMITTED 13/25] gccrs: remove old generics hack to reuse generic symbols from previous seg

2024-02-07 Thread arthur . cohen
From: Philip Herron This patch introduces one regression because generics are getting better understood over time. The code here used to apply generics with the same symbol from previous segments which was a bit of a hack with out limited inference variable support. The regression looks like it

[COMMITTED 05/25] gccrs: HIR: Add mising getter

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * hir/tree/rust-hir-item.h: Add missing getter Signed-off-by: Jakub Dupak --- gcc/rust/hir/tree/rust-hir-item.h | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h index

[COMMITTED 10/25] gccrs: add testcase to prove issue has already been fixed

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #1483 gcc/testsuite/ChangeLog: * rust/compile/issue-1483.rs: New test. --- gcc/testsuite/rust/compile/issue-1483.rs | 28 1 file changed, 28 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-1483.rs diff --git

[COMMITTED 16/25] gccrs: Move the Implementation of implitem lowering into its own file.

2024-02-07 Thread arthur . cohen
From: Nobel Singh This patch moves the implementation of the implitem lowering from rust-ast-lower-implitem.h into the rust-ast-lower-implitem.cc file. gcc/rust/ChangeLog: * Make-lang.in: Add rust-ast-lower-implitem.cc to list of objects. * hir/rust-ast-lower-implitem.h

[COMMITTED 22/25] gccrs: Fix inconsistent formatting.

2024-02-07 Thread arthur . cohen
From: Kushal Pal gcc/testsuite/ChangeLog: * rust/compile/issue-2040.rs: Enclose 'const' in single quotes. Signed-off-by: Kushal Pal --- gcc/testsuite/rust/compile/issue-2040.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[COMMITTED 21/25] gccrs: Add missing visitors for AST::Function.

2024-02-07 Thread arthur . cohen
From: Kushal Pal To use AST::Function instead of AST::TraitItemFunc and AST::TraitItemMethod, we need to provide similar visitors during lowering and resolving phase. gcc/rust/ChangeLog: * hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit): Provide visitor for

[COMMITTED 09/25] gccrs: Set the default ABI to C for extern blocks and extern functions

2024-02-07 Thread arthur . cohen
From: Nobel Singh Previously, the default ABI was set to Rust, which is not correct for extern blocks and extern functions. This patch changes the default ABI to C for these cases. gcc/rust/ChangeLog: * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_qualifiers): Change

[COMMITTED 18/25] gccrs: fix bug in pattern check for tuples

2024-02-07 Thread arthur . cohen
From: Philip Herron We can point to generic parent types which means we need to do the shallow resolve thing that rustc does. We have destructure which is similar to get what the parameter type points to. Fixes #2775 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc

[COMMITTED 04/25] gccrs: TyTy: Region (lifetime) representation

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-tyty-region.h: New file. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty-region.h | 110 ++ 1 file changed, 110 insertions(+) create mode 100644 gcc/rust/typecheck/rust-tyty-region.h diff

[COMMITTED 15/25] gccrs: refactor inference variable computation into a seperate method

2024-02-07 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): refactor * typecheck/rust-hir-type-check.h: new prototype * typecheck/rust-typecheck-context.cc (TypeCheckContext::compute_inference_variables): x ---

[COMMITTED 17/25] gccrs: Add testcase to show issue is already fixed

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2782 gcc/testsuite/ChangeLog: * rust/compile/issue-2782.rs: New test. Signed-off-by: Philip Herron --- gcc/testsuite/rust/compile/issue-2782.rs | 12 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-2782.rs

[COMMITTED 11/25] gccrs: add test cases to prove type inference is working

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2772 gcc/testsuite/ChangeLog: * rust/compile/issue-2772-1.rs: New test. * rust/compile/issue-2772-2.rs: New test. --- gcc/testsuite/rust/compile/issue-2772-1.rs | 20 gcc/testsuite/rust/compile/issue-2772-2.rs | 20

[COMMITTED 06/25] gccrs: Typecheck: add regions (lifetimes) to TyTy

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-hir-trait-resolve.cc: add regions * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): add regions, resolve generic lifetimes * typecheck/rust-hir-type-check-expr.cc

[COMMITTED 03/25] gccrs: Typecheck: lifetime interning and resolution tool

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.h (class Lifetime): add interned lifetime class * typecheck/rust-typecheck-context.cc (TypeCheckContext::TypeCheckContext): add resolution tool (TypeCheckContext::intern_lifetime): add method

[COMMITTED 12/25] gccrs: Fix ICE accessing empty vector without check

2024-02-07 Thread arthur . cohen
From: Philip Herron Fixes #2747 gcc/rust/ChangeLog: * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): fix gcc/testsuite/ChangeLog: * rust/compile/issue-2747.rs: New test. --- gcc/rust/typecheck/rust-tyty-subst.cc| 3 ++-

[COMMITTED 07/25] gccrs: TyTy: Store region constraints

2024-02-07 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit): Add region constraints. (TypeCheckImplItem::visit): Add region constraints. * typecheck/rust-hir-type-check-implitem.h: Add region

[COMMITTED 02/25] gccrs: Implement quick-check for Unicode

2024-02-07 Thread arthur . cohen
From: Raiki Tamura gcc/rust/ChangeLog: * rust-lang.cc (run_rust_tests): Add test. * rust-system.h: Add . * util/make-rust-unicode.py: Output NFC_Quick_Check table. * util/rust-codepoint.h (struct Codepoint): Add is_supplementary method. *

[COMMITTED 01/25] gccrs: Parse normal functions with `self` parameter correctly

2024-02-07 Thread arthur . cohen
From: Kushal Pal Fixes #2812 gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_function): Skip token if its a COMMA. gcc/testsuite/ChangeLog: * rust/compile/issue-2812.rs: New test. Signed-off-by: Kushal Pal --- gcc/rust/parse/rust-parse-impl.h |

Re: [PATCH v1] RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker

2024-02-07 Thread juzhe.zh...@rivai.ai
Why is it 2 not 1 or other value ? juzhe.zh...@rivai.ai From: pan2.li Date: 2024-02-07 17:27 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker From: Pan Li There is another corn case

[wwwdocs] Add 2 more C++26 core papers

2024-02-07 Thread Jakub Jelinek
Hi! cppreference has 2 more Kona papers listed and it seems eel.is/c++draft/ has those papers incorporated. Ok for wwwdocs? diff --git a/htdocs/projects/cxx-status.html b/htdocs/projects/cxx-status.html index c265edc0..65030980 100644 --- a/htdocs/projects/cxx-status.html +++

[PATCH] Apply TLC to vect_analyze_early_break_dependences

2024-02-07 Thread Richard Biener
There has been some confusion in my understanding of how early breaks work, the following clarifies some comments and undoes one change that shouldn't have been necessary. It also fixes the dependence test to avoit TBAA (we're moving stores down across loads). I'm bootstrapping and testing this

Re: [PATCH] range-op: Fix up ABSU_EXPR handling [PR113756]

2024-02-07 Thread Aldy Hernandez
LGTM. Up to the release managers. Thanks for tracking this down. Aldy On Tue, Feb 6, 2024 at 9:43 PM Jakub Jelinek wrote: > > Hi! > > ABSU_EXPR unary expr is special because it has a signed integer > argument and unsigned integer result (of the same precision). > > The following testcase is

Re: Repost [PATCH 3/6] PowerPC: Add support for accumulators in DMR registers.

2024-02-07 Thread Kewen.Lin
on 2024/2/7 08:06, Michael Meissner wrote: > On Thu, Jan 25, 2024 at 05:28:49PM +0800, Kewen.Lin wrote: >> Hi Mike, >> >> on 2024/1/6 07:38, Michael Meissner wrote: >>> The MMA subsystem added the notion of accumulator registers as an optional >>> feature of ISA 3.1 (power10). In ISA 3.1, these

[PATCH v1] RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker

2024-02-07 Thread pan2 . li
From: Pan Li There is another corn case when similar as below example: void test (void) { __riscv_vaadd (); } We report error when overloaded function with empty args. For example: test.c: In function 'foo': test.c:8:3: error: no matching function call to '__riscv_vaadd' with empty args

Re: Ping: Re: [PATCH] libgcc: fix SEH C++ rethrow semantics [PR113337]

2024-02-07 Thread Matteo Italia
Il 06/02/24 10:17, Jonathan Yong ha scritto: On 2/6/24 05:31, NightStrike wrote: On Mon, Feb 5, 2024, 06:53 Matteo Italia wrote: Il 31/01/24 04:24, LIU Hao ha scritto: 在 2024-01-31 08:08, Jonathan Yong 写道: On 1/24/24 15:17, Matteo Italia wrote: Ping! That's a one-line fix, and you can

Re: Repost [PATCH 1/6] Add -mcpu=future

2024-02-07 Thread Kewen.Lin
on 2024/2/6 14:01, Michael Meissner wrote: > On Tue, Jan 23, 2024 at 04:44:32PM +0800, Kewen.Lin wrote: ... >>> diff --git a/gcc/config/rs6000/rs6000-opts.h >>> b/gcc/config/rs6000/rs6000-opts.h >>> index 33fd0efc936..25890ae3034 100644 >>> --- a/gcc/config/rs6000/rs6000-opts.h >>> +++

[COMMITTED] testsuite: Don't xfail gcc.dg/debug/dwarf2/inline5.c

2024-02-07 Thread Rainer Orth
gcc.dg/debug/dwarf2/inline5.c has been XPASSing on Solaris (both SPARC and x86, 32 and 64-bit) with the native assembler since 20210429. According to gcc-testresults postings, the same is true on AIX. XPASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not (DIE (0x([0-9a-f]*))

Re: [wwwdocs] tweak for sourceware account request alias

2024-02-07 Thread Gerald Pfeifer
On Thu, 11 Jan 2024, Frank Ch. Eigler wrote: > diff --git a/htdocs/gitwrite.html b/htdocs/gitwrite.html : > -overse...@gcc.gnu.org to add access to the GCC repository. > +admin-reque...@sourceware.org to add access to the GCC > repository. Thanks, Frank. I just pushed this. (Sorry, I had