[committed 071/103] gccrs: typecheck: Fix overzealous `delete` call

2023-02-21 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Fix extra call to `delete`. --- gcc/rust/typecheck/rust-tyty-call.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/rust/typecheck/rust-tyty-call.cc b/gcc/rust/typecheck/rus

[committed 100/103] gccrs: Cleanup unused parameters to fix the bootstrap build

2023-02-21 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Remove unused parameters. * backend/rust-constexpr.cc (constant_value_1): Likewise. (fold_non_dependent_init): Likewise. * backend/rust-tree.cc (publicly_uniquely_

[committed 091/103] gccrs: Remove default location. Add visibility location to create_* functions

2023-02-21 Thread arthur . cohen
From: Dave gcc/rust/ChangeLog: * ast/rust-item.h: Remoe default location for Visibility class. * parse/rust-parse-impl.h (Parser::parse_visibility): Pass proper location when instantiating visibilities. --- gcc/rust/ast/rust-item.h | 33 ++---

[committed 074/103] gccrs: ast: Dump slice type

2023-02-21 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing slice visitor. Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc in

[committed 078/103] gccrs: ast: Dump tuple type

2023-02-21 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing tuple type visitor. Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/rust/ast/rust-ast-dump.c

[committed 099/103] gccrs: Skip this debug test case which is failing on the latest mac-os devtools and its only for debug info

2023-02-21 Thread arthur . cohen
From: Philip Herron gcc/testsuite/ChangeLog: * rust/debug/chartype.rs: Skip testcases on Darwin architectures. --- gcc/testsuite/rust/debug/chartype.rs | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/rust/debug/chartype.rs b/gcc/testsui

[committed 101/103] gccrs: Repair 'gcc/rust/lang.opt' comment

2023-02-21 Thread arthur . cohen
From: Thomas Schwinge ... lost in #1527 commit 138a6260124740208b8f3aff2e38617f43b05fe8 "rust: Add -frust-compile-until option". gcc/rust/ChangeLog: * lang.opt: Fix ordering of file. --- gcc/rust/lang.opt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/rust/l

[committed 081/103] gccrs: ast: Dump impl trait type one bound

2023-02-21 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rus

[committed 102/103] gccrs: const evaluator: Remove get_nth_callarg

2023-02-21 Thread arthur . cohen
From: Arthur Cohen We only used one path of the C++ folder's get_nth_callarg function: CALL_EXPR_ARG. Replace all calls to get_nth_callarg by macro calls to CALL_EXPR_ARG gcc/rust/ChangeLog: * backend/rust-constexpr.cc (get_nth_callarg): Remove function. (rs_bind_parameters_in_c

[committed 087/103] gccrs: ast: Dump generic parameters

2023-02-21 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor. * ast/rust-ast-dump.h: Likewise. Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 129 +++--- gcc/rust/ast/rust-ast-dump.h | 3 + 2 fil

[committed 088/103] gccrs: ast: Remove unused include in rust-ast-dump.cc

2023-02-21 Thread arthur . cohen
From: Jakub Dupak gcc/rust/ChangeLog: * ast/rust-ast-dump.cc: Remove unused include. Signed-off-by: Jakub Dupak --- gcc/rust/ast/rust-ast-dump.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 03a57d416c4..477805f

[committed 092/103] gccrs: Improve lexer dump

2023-02-21 Thread arthur . cohen
From: Raiki Tamura gcc/rust/ChangeLog: * lex/rust-lex.cc (Lexer::Lexer): Add `dump_lex` boolean flag. (Lexer::skip_token): Dump tokens if flag is enabled. (Lexer::dump_and_skip): New function. * lex/rust-lex.h: Include optional.h and declare functions. * p

[committed 096/103] gccrs: Add capture tracking to the type info for closures

2023-02-21 Thread arthur . cohen
From: Philip Herron gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Pass captures properly to `TyTy::ClosureType` constructor. * typecheck/rust-tyty.cc (ClosureType::as_string): Fix string representation. (ClosureType::clone):

[committed 098/103] gccrs: Fix undefined behaviour issues on macos

2023-02-21 Thread arthur . cohen
From: Philip Herron This adds missing copy constructors to HIR::PathExprSegment which were wrongly defaulting to empty vectors when apply specified generic arguments to method calls. gcc/rust/ChangeLog: * hir/tree/rust-hir-expr.h: Add const `get_method_name`. * hir/tree/rust-hir

Re: [PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-21 Thread Ajit Agarwal via Gcc-patches
Hello Segher: On 21/02/23 4:34 pm, Segher Boessenkool wrote: > Hi! > > On Tue, Feb 21, 2023 at 02:18:25PM +0530, Ajit Agarwal wrote: >> This patch replaces fmr instruction 6 cycles with 2 cycles xxlor instruction >> for p7 and p8 architecture. >> >> I have implemented with switch and cases other

[PATCH] tree-optimization/108691 - remove trigger-happy assert

2023-02-21 Thread Richard Biener via Gcc-patches
The following gets rid of the idea that we should prevent setjmp like calls from popping up in uncontrolled way in the IL for now. The solution is probably to handle it similar as noreturn has the ctrl-altering flag on stmts, but use another flag, for example ctrl-receiving which would also make su

Update copyright years. (was: [committed 003/103] gccrs: dump: Emit visibility when dumping items)

2023-02-21 Thread Thomas Schwinge
Hi! On 2023-02-21T13:00:53+0100, arthur.co...@embecosm.com wrote: > --- a/gcc/rust/ast/rust-ast-dump.cc > +++ b/gcc/rust/ast/rust-ast-dump.cc > @@ -1,4 +1,4 @@ > -// Copyright (C) 2020-2023 Free Software Foundation, Inc. > +// Copyright (C) 2020-2022 Free Software Foundation, Inc. > --- a/gcc/rus

Re: [PATCH] tree-optimization/108691 - remove trigger-happy assert

2023-02-21 Thread Jakub Jelinek via Gcc-patches
On Tue, Feb 21, 2023 at 01:47:59PM +0100, Richard Biener wrote: > The following gets rid of the idea that we should prevent setjmp > like calls from popping up in uncontrolled way in the IL for now. > The solution is probably to handle it similar as noreturn has > the ctrl-altering flag on stmts, b

Re: [PATCH] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000.

2023-02-21 Thread Lulu Cheng
在 2023/2/21 下午3:41, Xi Ruoyao 写道: On Tue, 2023-02-21 at 15:20 +0800, Lulu Cheng wrote: Like la264 only has 40 effective bits of virtual address space. I'm OK with the change. But the VA length is configurable building the kernel. Is there any specific reason LA264 has to use the 40-bit conf

Re: [PATCH] LoongArch: Change the value of macro TRY_EMPTY_VM_SPACE from 0x8000000000 to 0x1000000000.

2023-02-21 Thread WANG Xuerui
Hi, On 2023/2/21 21:03, Lulu Cheng wrote: 在 2023/2/21 下午3:41, Xi Ruoyao 写道: On Tue, 2023-02-21 at 15:20 +0800, Lulu Cheng wrote: Like la264 only has 40 effective bits of virtual address space. I'm OK with the change.  But the VA length is configurable building the kernel.  Is there any speci

Re: [PATCH] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-02-21 Thread Segher Boessenkool
On Tue, Feb 21, 2023 at 06:00:52PM +0530, Ajit Agarwal wrote: > On 21/02/23 4:34 pm, Segher Boessenkool wrote: > > Please domn't use a switch, it isn't needed. Instead use the "isa" > > attribute (with p7v here), and put the preferred alternative first. > > I am not sure how this is possible with

Re: [PATCH] gimplify size expressions in parameters for all types [PR107557] [PR108423]

2023-02-21 Thread Martin Uecker via Gcc-patches
Hi Richard, can you look at this middle-end patch? It fixes two regressions. Martin PS: I happy to do something about at variably_modified_type_p  in the middle-end, if you have a recommendation. Am Mittwoch, dem 08.02.2023 um 13:02 +0100 schrieb Martin Uecker: > > Here is a fix for PR1

[committed] libphobos: Add @nogc to gcc.backtrace and gcc.libbacktrace modules.

2023-02-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch annotated the LibBacktrace class and the libbacktrace C bindings it uses with `@nogc' in preparation for a `Throwable.TraceInfo' becoming `@nogc' itself. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline. Regards, Iain. --- libphobos/ChangeLog:

[committed] d: Set doing_semantic_analysis_p before calling functionSemantic3

2023-02-21 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a problem seen where functions which have semantic analysis ran late may still require the use of CTFE built-ins to be evaluated. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * decl.cc (DeclVisit

Re: [PATCH] gimplify size expressions in parameters for all types [PR107557] [PR108423]

2023-02-21 Thread Richard Biener via Gcc-patches
On Tue, 21 Feb 2023, Martin Uecker wrote: > > > Hi Richard, > > can you look at this middle-end patch? It fixes two regressions. But gimplify_type_sizes recurses itself, but in particular _not_ for pointer types. Iff recursing in parameter context is necessary and safe I'd rather have gimplif

[committed] d: Only handle the left-to-right evaluation of a call expression during gimplify

2023-02-21 Thread Iain Buclaw via Gcc-patches
This patch removes an unnecessary rewriting of the front-end AST during lowering. As all functions regardless of their linkage are evaluated strictly left-to-right now, there's no point trying to handle all temp saving during the code generation pass. Bootstrapped and regression tested on x86_64-l

Re: [PATCH] gimplify size expressions in parameters for all types [PR107557] [PR108423]

2023-02-21 Thread Martin Uecker via Gcc-patches
Am Dienstag, dem 21.02.2023 um 14:21 + schrieb Richard Biener: > On Tue, 21 Feb 2023, Martin Uecker wrote: > > > > > > > Hi Richard, > > > > can you look at this middle-end patch? It fixes two regressions. > > But gimplify_type_sizes recurses itself, but in particular _not_ > for pointer t

[PATCH 1/2] ipa-cp: Fix various issues in update_specialized_profile (PR 107925)

2023-02-21 Thread Martin Jambor
Hi, the patch below fixes various issues in function update_specialized_profile. The main is removal of the assert which is bogus in the case of recursive cloning. The division of unexplained counts is guesswork, which then leads to updates of counts of recursive edges, which then can be redirec

[PATCH 2/2] ipa-cp: Improve updating behavior when profile counts have gone bad

2023-02-21 Thread Martin Jambor
Hi, Looking into the behavior of profile count updating in PR 107925, I noticed that an option not considered possible was actually happening, and - with the guesswork in place to distribute unexplained counts - it simply can happen. Currently it is handled by dropping the counts to local estimat

[V2][PATCH] Fixing PR107411

2023-02-21 Thread Qing Zhao via Gcc-patches
This is the 2nd version of the patch. compared to the first version, the major change is: use sprintf to replace xasprintf per Jacub's suggestion. bootstrapped and regression tested on both x86 and aarch64. Okay for committing? thanks. Qing === This is a bug in tree-ssa-

Ping^2: [PATCH+wwwdocs 0/8] A small Texinfo refinement

2023-02-21 Thread Arsen Arsenović via Gcc-patches
Ping. Like last time, I rebased the series. The first two times around, I did not notice there's dedicated maintainers for the documentation component, and so, I am adding Gerald, Joseph and Sandra to CC this time. Apologies for the omission. Range-diff since last ping: 1: 6eba1548dfe = 1: b

Re: [PATCH] Fix RTL simplifications of FFS, POPCOUNT and PARITY.

2023-02-21 Thread Jakub Jelinek via Gcc-patches
On Sun, Jan 01, 2023 at 03:55:26PM -, Roger Sayle wrote: > In 2011, the rtl.texi documentation was updated to reflect that the > modes of the RTX unary operations FFS, POPCOUNT and PARITY must > match those of their operands. Unfortunately, some of the transformations > in simplify-rtx.cc pred

Re: C++ modules and AAPCS/ARM EABI clash on inline key methods

2023-02-21 Thread Richard Earnshaw via Gcc-patches
On 17/02/2023 06:09, Alexandre Oliva via Gcc-patches wrote: On Apr 5, 2022, Alexandre Oliva wrote: Would something like this be acceptable/desirable? It's overreaching, in that not all arm platforms are expected to fail, but the result on them will be an unexpected pass, which is not quite a

Re: C++ modules and AAPCS/ARM EABI clash on inline key methods

2023-02-21 Thread Richard Earnshaw via Gcc-patches
On 21/02/2023 16:31, Richard Earnshaw via Gcc-patches wrote: On 17/02/2023 06:09, Alexandre Oliva via Gcc-patches wrote: On Apr  5, 2022, Alexandre Oliva wrote: Would something like this be acceptable/desirable?  It's overreaching, in that not all arm platforms are expected to fail, but th

Re: [PATCH] Fortran: improve checking of character length specification [PR96025]

2023-02-21 Thread Harald Anlauf via Gcc-patches
Hi Thomas, Am 21.02.23 um 08:19 schrieb Thomas Koenig via Gcc-patches: Hi Harald, the attached patch fixes an ICE on invalid (non-integer) specification expressions for character length in function declarations.  It appears that the error handling was already in place (mostly) and we need to e

[PATCH] c++: more mce_false folding from cp_fully_fold_init [PR108243]

2023-02-21 Thread Patrick Palka via Gcc-patches
We should also fold the overall initializer passed to cp_fully_fold_init with mce_false, which enables folding of the copy-initialization of 'a1' in the below testcase (the initializer here is an AGGR_INIT_EXPR). Unfortunately this doesn't help with direct- or default-initialization because we don

Re: [PATCH] c++: constant non-copy-init is manifestly constant [PR108243]

2023-02-21 Thread Patrick Palka via Gcc-patches
On Mon, 20 Feb 2023, Patrick Palka wrote: > According to [basic.start.static]/2 and [expr.const]/2, a variable > with static storage duration initialized with a constant initializer > has constant initialization, and such an initializer is manifestly > constant-evaluated. > > We're already gettin

[PATCH] Fortran: reject invalid CHARACTER length of derived type components [PR96024]

2023-02-21 Thread Harald Anlauf via Gcc-patches
Dear all, the attached simple patch detects and rejects CHARACTER components of derived types whose length specification is non-integer. Regtested on x86_64-pc-linux-gnu. OK for mainline? This PR is also marked as a 10/11/12/13 regression, so I would like to backport this as far as it seems rea

[COMMITTED] gcc: xtensa: fix PR target/108876

2023-02-21 Thread Max Filippov via Gcc-patches
gcc/ PR target/108876 * config/xtensa/xtensa.cc (xtensa_expand_epilogue): Drop emit_use for A0_REG. * config/xtensa/xtensa.md (sibcall, sibcall_internal) (sibcall_value, sibcall_value_internal): Add 'use' expression for A0_REG. --- gcc/config/xtensa/

Re: [PATCH] Fortran: reject invalid CHARACTER length of derived type components [PR96024]

2023-02-21 Thread Steve Kargl via Gcc-patches
On Tue, Feb 21, 2023 at 10:18:58PM +0100, Harald Anlauf via Fortran wrote: > Dear all, > > the attached simple patch detects and rejects CHARACTER components > of derived types whose length specification is non-integer. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > This PR is also

[pushed] analyzer: stop exploring the path after certain diagnostics [PR108830]

2023-02-21 Thread David Malcolm via Gcc-patches
PR analyzer/108830 reports a situation in which there are lots of followup -Wanalyzer-null-dereference warnings after the first access of a NULL pointer, leading to very noisy output from -fanalyzer. The analyzer's logic for stopping emitting multiple warnings from a state machine doesn't quite wo

Re: C++ modules and AAPCS/ARM EABI clash on inline key methods

2023-02-21 Thread Nathan Sidwell via Gcc-patches
On 2/21/23 11:31, Richard Earnshaw wrote: I started looking at this a few weeks back, but I was a bit confused by the testcase and then never got around to following up. The Arm C++ binding rules normally exclude using an inline function definition from being chosen as the key function becaus

[PATCH] vect: Check that vector factor is a compile-time constant

2023-02-21 Thread Michael Collison
While working on autovectorizing for the RISCV port I encountered an issue where vect_do_peeling assumes that the vectorization factor is a compile-time constant. The vectorization is not a compile-time constant on RISCV. Tested on RISCV and x86_64-linux-gnu. Okay? Michael gcc/     * tree-v

Re: [PING, v2] Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere

2023-02-21 Thread Joseph Myers
On Tue, 21 Feb 2023, Thomas Schwinge wrote: > Is the attached v2 > "Add '-Wno-complain-wrong-lang', and use it in > 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere" > OK? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 1/2] c++: factor out TYPENAME_TYPE substitution

2023-02-21 Thread Patrick Palka via Gcc-patches
On Sun, 19 Feb 2023, Jason Merrill wrote: > On 2/15/23 12:11, Patrick Palka wrote: > > On Wed, 15 Feb 2023, Jason Merrill wrote: > > > > > On 2/15/23 09:21, Patrick Palka wrote: > > > > On Tue, 14 Feb 2023, Jason Merrill wrote: > > > > > > > > > On 2/13/23 09:23, Patrick Palka wrote: > > > > > >

[PATCH] libstdc++: Limit allocations in _Rb_tree 1/2

2023-02-21 Thread François Dumont via Gcc-patches
Here is eventually a working proposal. Compared to the unordered container approach we need to find out what type is going to be used to call the comparer. Otherwise we might reinstantiate a temporary each time we call the comparer. For example in case of const char* insertion with a less comp

[PATCH] libstdc++: Limit allocations in _Rb_tree 2/2

2023-02-21 Thread François Dumont via Gcc-patches
This one is a refinement for multimap/multiset. It allows to have share the same key if managed with ref counting like the cow string.     libstdc++: [_Rb_tree] Limit allocations on equal insertions [PR 96088]     When inserting the same key several times prefer to insert the new entry using

<    1   2