Re: [PATCH] c++/modules: Stream unmergeable temporaries by value again [PR114856]

2024-05-06 Thread Nathaniel Shead
On Thu, May 02, 2024 at 01:53:44PM -0400, Jason Merrill wrote: > On 5/2/24 10:40, Patrick Palka wrote: > > On Thu, 2 May 2024, Nathaniel Shead wrote: > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk/14.2? > > > > > > Another alternative would be to stream such !DECL_NAME

Re: Re: [PATCH 1/1] RISC-V: Add Zfbfmin extension to the -march= option

2024-05-06 Thread Xiao Zeng
2024-05-07 06:40  Jeff Law wrote: >   > > >On 4/11/24 9:32 PM, Xiao Zeng wrote: >> This patch would like to add new sub extension (aka Zfbfmin) to the >> -march= option. It introduces a new data type BF16. >> >> 1 The Zfbfmin extension depend on 'F', and the FLH, FSH, FMV.X.H, and >> FMV.H.X

[RISC-V][V2] Fix incorrect if-then-else nesting of Zbs usage in constant synthesis

2024-05-06 Thread Jeff Law
Reposting without the patch that ignores whitespace. The CI system doesn't like including both patches, that'll generate a failure to apply and none of the tests actually get run. So I managed to goof the if-then-else level of the bseti bits last week. They were supposed to be a last ditch

Re: [PATCH v5 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-05-06 Thread Jason Merrill
On 5/5/24 14:14, Andi Kleen wrote: This patch implements a clang compatible [[musttail]] attribute for returns. Thanks. musttail is useful as an alternative to computed goto for interpreters. With computed goto the interpreter function usually ends up very big which causes problems with

[PATCHv2] Value range: Add range op for __builtin_isfinite

2024-05-06 Thread HAO CHEN GUI
Hi, The former patch adds isfinite optab for __builtin_isfinite. https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html Thus the builtin might not be folded at front end. The range op for isfinite is needed for value range analysis. This patch adds them. Compared to last version,

[PATCH-6, rs6000] Split setcc to two insns after reload

2024-05-06 Thread HAO CHEN GUI
Hi, It's the sixth patch of a series of patches optimizing CC modes on rs6000. This patch splits setcc to two separate insns after reload so that other insns can be inserted between them. It should increase the parallelism. The rotate_cr pattern still needs the info of the number of cr

Re: [PATCH][GCC 13] RISC-V: Fix vsetvli local eliminate [PR114747]

2024-05-06 Thread Kito Cheng
Committed to gcc 13 branch, thanks:) On Tue, May 7, 2024 at 9:20 AM juzhe.zh...@rivai.ai wrote: > > LGTM。 > > > juzhe.zh...@rivai.ai > > > From: Kito Cheng > Date: 2024-05-07 09:17 > To: gcc-patches; kito.cheng; palmer; jeffreyalaw; rdapp; juzhe.zhong; pan2.li >

Re: [PATCH][GCC 13] RISC-V: Fix vsetvli local eliminate [PR114747]

2024-05-06 Thread juzhe.zh...@rivai.ai
LGTM。 juzhe.zh...@rivai.ai From: Kito Cheng Date: 2024-05-07 09:17 To: gcc-patches; kito.cheng; palmer; jeffreyalaw; rdapp; juzhe.zhong; pan2.li CC: Kito Cheng Subject: [PATCH][GCC 13] RISC-V: Fix vsetvli local eliminate [PR114747] vsetvli local eliminate is only consider the current demand

[PATCH][GCC 13] RISC-V: Fix vsetvli local eliminate [PR114747]

2024-05-06 Thread Kito Cheng
vsetvli local eliminate is only consider the current demand instead of full demand, and it will use that incomplete info to remove vsetvli. Give following example from PR114747: vsetvli a5,a1,e8,m4,ta,mu # 57, ratio=2, sew=8, lmul=4 vsetvli zero,a5,e16,m8,ta,ma# 58, ratio=2, sew=16,

Re: [PATCH v3] c++/modules: Fix dangling pointer with imported_temploid_friends

2024-05-06 Thread Jason Merrill
On 5/6/24 18:53, Patrick Palka wrote: On Mon, 6 May 2024, Jason Merrill wrote: On 5/3/24 07:17, Nathaniel Shead wrote: On Thu, May 02, 2024 at 02:05:38PM -0400, Jason Merrill wrote: On 5/1/24 21:34, Nathaniel Shead wrote: On Thu, May 02, 2024 at 12:15:44AM +1000, Nathaniel Shead wrote: On

Re: [PATCH] arm: Support -mfdpic for more targets

2024-05-06 Thread Fangrui Song
On Wed, Mar 6, 2024 at 1:54 AM Richard Earnshaw (lists) wrote: > > On 06/03/2024 05:07, Fangrui Song wrote: > > On Fri, Feb 23, 2024 at 7:33 PM Fangrui Song wrote: > >> > >> From: Fangrui Song > >> > >> Targets that are not arm*-*-uclinuxfdpiceabi can use -S -mfdpic, but -c > >> -mfdpic does

Re: [PATCH v3] c++/modules: Fix dangling pointer with imported_temploid_friends

2024-05-06 Thread Patrick Palka
On Mon, 6 May 2024, Jason Merrill wrote: > On 5/3/24 07:17, Nathaniel Shead wrote: > > On Thu, May 02, 2024 at 02:05:38PM -0400, Jason Merrill wrote: > > > On 5/1/24 21:34, Nathaniel Shead wrote: > > > > On Thu, May 02, 2024 at 12:15:44AM +1000, Nathaniel Shead wrote: > > > > > On Wed, May 01,

Re: [PATCH 1/1] RISC-V: Add Zfbfmin extension to the -march= option

2024-05-06 Thread Jeff Law
On 4/11/24 9:32 PM, Xiao Zeng wrote: This patch would like to add new sub extension (aka Zfbfmin) to the -march= option. It introduces a new data type BF16. 1 The Zfbfmin extension depend on 'F', and the FLH, FSH, FMV.X.H, and FMV.H.X instructions as defined in the Zfh extension. 2 The

Re: [PATCH] c++: replace tf_norm with a local flag

2024-05-06 Thread Jason Merrill
On 5/3/24 11:26, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- The tf_norm flag controlling whether to build diagnostic information during constraint normalization doesn't need to be a global tsubst flag, and is confusingly

Re: [PATCH v3] c++/modules: Fix dangling pointer with imported_temploid_friends

2024-05-06 Thread Jason Merrill
On 5/3/24 07:17, Nathaniel Shead wrote: On Thu, May 02, 2024 at 02:05:38PM -0400, Jason Merrill wrote: On 5/1/24 21:34, Nathaniel Shead wrote: On Thu, May 02, 2024 at 12:15:44AM +1000, Nathaniel Shead wrote: On Wed, May 01, 2024 at 09:57:38AM -0400, Patrick Palka wrote: On Wed, 1 May 2024,

Re: [PATCH] RISC-V: Add zero_extract support for rv64gc

2024-05-06 Thread Jeff Law
On 5/6/24 3:42 PM, Vineet Gupta wrote: On 5/6/24 13:40, Christoph Müllner wrote: The combiner attempts to optimize a zero-extension of a logical right shift using zero_extract. We already utilize this optimization for those cases that result in a single instructions. Let's add a

Re: [PATCH] RISC-V: Add zero_extract support for rv64gc

2024-05-06 Thread Vineet Gupta
On 5/6/24 13:40, Christoph Müllner wrote: > The combiner attempts to optimize a zero-extension of a logical right shift > using zero_extract. We already utilize this optimization for those cases > that result in a single instructions. Let's add a insn_and_split > pattern that also matches the

Re: [NOT CODE REVIEW] [PATCH v3 1/1] [RISC-V] Add support for _Bfloat16

2024-05-06 Thread Jeff Law
On 5/5/24 6:38 PM, Xiao Zeng wrote: 1 At point , BF16 has already been completed "post public review". 2 LLVM has also added support for RISCV BF16 in and . 3 According to

Re: [PATCH] RISC-V: Document -mcmodel=large

2024-05-06 Thread Jeff Law
On 12/20/23 11:13 AM, Jeff Law wrote: On 12/20/23 11:08, Palmer Dabbelt wrote: This slipped through the cracks.  Probably also NEWS-worthy. gcc/ChangeLog: * doc/invoke.texi (RISC-V): Add -mcmodel=large. OK. And yes, I think we're going to need to to a new/changes update for the

Re: [RFA][RISC-V] Use "uw" forms for constant synthesis

2024-05-06 Thread Jeff Law
On 5/4/24 6:53 PM, Jeff Law wrote: So another constant synthesis improvement. In this patch we're looking at cases where we'd like to be able to use lui+slli, but can't because of the sign extending nature of lui on TARGET_64BIT.  For example: 0x800110020UL.  The trunk currently

[PATCH] Mention that some options are turned on by `-Ofast` in their descriptions [PR97263]

2024-05-06 Thread Andrew Pinski
Like was done for -ffast-math in r0-105946-ga570fc16fa8056, we should document that -Ofast enables -fmath-errno, -funsafe-math-optimizations, -finite-math-only, -fno-trapping-math in their documentation. Note this changes the stronger "must not" to be "is not" for -fno-trapping-math since we do

Re: [PATCH] RISC-V: Add zero_extract support for rv64gc

2024-05-06 Thread Jeff Law
On 5/6/24 2:40 PM, Christoph Müllner wrote: The combiner attempts to optimize a zero-extension of a logical right shift using zero_extract. We already utilize this optimization for those cases that result in a single instructions. Let's add a insn_and_split pattern that also matches the

Re: [PATCH v2 1/1] [RISC-V] Add support for _Bfloat16

2024-05-06 Thread Jeff Law
On 5/4/24 8:08 PM, Xiao Zeng wrote: https://github.com/ewlu/gcc-precommit-ci/issues/1412#issuecomment-2031568644 In the future, my patch will strictly adhere to the formatting suggestions provided by CI. No worries. Even those of us who have been working on the project for 30+ years

[PATCH] RISC-V: Add zero_extract support for rv64gc

2024-05-06 Thread Christoph Müllner
The combiner attempts to optimize a zero-extension of a logical right shift using zero_extract. We already utilize this optimization for those cases that result in a single instructions. Let's add a insn_and_split pattern that also matches the generic case, where we can emit an optimized sequence

[RISC-V] Fix incorrect if-then-else nesting of Zbs usage in constant synthesis

2024-05-06 Thread Jeff Law
So I managed to goof the if-then-else level of the bseti bits last week. They were supposed to be a last ditch effort to improve the result, but ended up inside a conditional where they don't really belong. I almost always use Zba, Zbb and Zbs together, so it slipped by. So it's NFC if you

[PATCH] Fortran: improve attribute conflict checking [PR93635]

2024-05-06 Thread Harald Anlauf
Dear all, I've been contemplating whether to submit the attached patch. It addresses an ICE-on-invalid as reported in the PR, and also fixes an accepts-invalid (see testcase), plus maybe some more, related due to incomplete checking of symbol attribute conflicts. The fix does not fully address

[COMMITTED] aarch64: Fix gcc.target/aarch64/sve/loop_add_6.c for LLP64 targets

2024-05-06 Thread Andrew Pinski
Even though the aarch64-mingw32 support has not been committed yet, we should fix some of the testcases. In this case gcc.target/aarch64/sve/loop_add_6.c is easy to fix. We should use __SIZETYPE__ instead of `unsigned long` for the variables that will be used for pointer plus. Committed as

Re: [PATCH v2] Fix auto deduction for template specialization scopes [PR114915]

2024-05-06 Thread Patrick Palka
On Sat, 4 May 2024, Seyed Sajad Kahani wrote: > The limitations of the initial patch (checking specializiation template > usage), have been discussed. > > > I realized that for the case where we have a member function template > > of a class template, and a specialization of the enclosing class

[PATCH] aarch64: Add fcsel to cmov integer and csel to float cmov [PR98477]

2024-05-06 Thread Andrew Pinski
This patch adds an alternative to the integer cmov and one to floating point cmov so we avoid in some more moving PR target/98477 gcc/ChangeLog: * config/aarch64/aarch64.md (*cmov_insn[GPI]): Add 'w' alternative. (*cmov_insn[GPF]): Add 'r' alternative. *

Re: [PATCH v2 1/6] ctf, btf: restructure CTF/BTF emission

2024-05-06 Thread David Faust
On 5/3/24 2:02 PM, Indu Bhagat wrote: > On 5/2/24 10:11, David Faust wrote: >> This commit makes some structural changes to the CTF/BTF debug info >> emission. In particular: >> >> a) CTF is new always fully generated and emitted before any >> BTF-related procedures are run. This means

Re: [PATCH, libgfortran] aix: Fix building fat library for AIX

2024-05-06 Thread FX Coudert
> libgfortran/ChangeLog: > * config/t-aix (all-local, libcaf_single): Explicitly reference > caf/.libs/single.o OK, and sorry for the breakage. FX

Re: [PATCH] c++: Allow IS_FAKE_BASE_TYPE for union types [PR114954]

2024-05-06 Thread Jason Merrill
On 5/6/24 02:32, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- In some circumstances, unions can also have an __as_base type; Hmm, even though unions can't be bases I guess that is needed for something like union U { int i; private:

ping [PATCH] contrib: add cxx-dr-table.sh

2024-05-06 Thread Marek Polacek
A patch to to keep up-to-date: Marek

Re: [PATCH] Fix PR c++/105760: ICE in build_deduction_guide for invalid template

2024-05-06 Thread Jason Merrill
On 5/6/24 09:20, Simon Martin wrote: Hi, We currently ICE upon the following invalid snippet because we fail to properly handle tsubst_arg_types returning error_mark_node in build_deduction_guide. == cut == template struct A { A(Ts...); }; A a; == cut == This patch fixes this, and has been

Re: [PATCH] contrib/gcc-changelog/git_check_commit.py: Implement --num-commits

2024-05-06 Thread Ken Matsui
On Mon, May 6, 2024 at 9:20 AM Jason Merrill wrote: > > On 5/6/24 09:25, Ken Matsui wrote: > > On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui > > wrote: > >> > >> On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote: > >>> > >>> On Wed, 28 Feb 2024, Ken Matsui wrote: > >>> > This patch

Re: [PATCH] contrib/gcc-changelog/git_check_commit.py: Implement --num-commits

2024-05-06 Thread Jason Merrill
On 5/6/24 09:25, Ken Matsui wrote: On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui wrote: On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote: On Wed, 28 Feb 2024, Ken Matsui wrote: This patch implements a --num-commits (-n) flag for shorthand for the range of hash~N..hash commits. Ping.

[PATCH, libgfortran] aix: Fix building fat library for AIX

2024-05-06 Thread David Edelsohn
aix: Fix building fat library for AIX With the change in subdirectories, the code for libgfortran fat libraries needs to be adjusted to explicitly reference the subdirectory. AIX creates fat library archives and the compiler itself can be built as either 32 bit or 64 bit

[PATCH v4 3/3] RISC-V: Implement IFN SAT_ADD for both the scalar and vector

2024-05-06 Thread pan2 . li
From: Pan Li This patch depends on below middle-end enabling patches for scalar and vector. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650822.html https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650823.html The patch also implement the SAT_ADD in the riscv backend as the sample for

[PATCH v4 2/3] VECT: Support new IFN SAT_ADD for unsigned vector int

2024-05-06 Thread pan2 . li
From: Pan Li This patch depends on below scalar enabling patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650822.html For vectorize, we leverage the existing vect pattern recog to find the pattern similar to scalar and let the vectorizer to perform the rest part for standard name

[PATCH v4 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-06 Thread pan2 . li
From: Pan Li This patch would like to add the middle-end presentation for the saturation add. Aka set the result of add to the max when overflow. It will take the pattern similar as below. SAT_ADD (x, y) => (x + y) | (-(TYPE)((TYPE)(x + y) < x)) Take uint8_t as example, we will have: *

Re: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.

2024-05-06 Thread Qing Zhao
.long 2 .long 3 .long 4 .ident "GCC: (GNU) 15.0.0 20240506 (experimental) [master ec1cdad89af]" .section.note.GNU-stack,"",@progbits -- embedded brains GmbH & Co. KG Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: seba

Re: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.

2024-05-06 Thread Sebastian Huber
long 2 .long 3 .long 4 .globl f2 .align 16 .type f2, @object .size f2, 16 f2: .long 1 .long 2 .long 3 .long 4 .ident "GCC: (GNU) 15.0.0 20240506 (experimental) [master ec1cdad89af]"

Re: [PATCH] contrib/gcc-changelog/git_check_commit.py: Implement --num-commits

2024-05-06 Thread Ken Matsui
On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui wrote: > > On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote: > > > > On Wed, 28 Feb 2024, Ken Matsui wrote: > > > > > This patch implements a --num-commits (-n) flag for shorthand for > > > the range of hash~N..hash commits. > > Ping. Ping. Ok for

Re: [PATCH v2] gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]

2024-05-06 Thread Ken Matsui
On Thu, Mar 14, 2024 at 1:01 AM Ken Matsui wrote: > > On Sat, Mar 2, 2024 at 5:04 AM Ken Matsui wrote: > > > > This patch adds a warning switch for "#pragma once in main file". The > > warning option name is Wpragma-once-outside-header, which is the same > > as Clang. > > Ping. Ping. Ok for

[PATCH] Fix PR c++/105760: ICE in build_deduction_guide for invalid template

2024-05-06 Thread Simon Martin
Hi, We currently ICE upon the following invalid snippet because we fail to properly handle tsubst_arg_types returning error_mark_node in build_deduction_guide. == cut == template struct A { A(Ts...); }; A a; == cut == This patch fixes this, and has been successfully tested on

[PATCH] tree-optimization/100923 - re-do VN with contextual PTA info fix

2024-05-06 Thread Richard Biener
The following implements the gist of the PR100923 fix in a leaner (and more complete) way by realizing that all ao_ref_init_from_vn_reference uses need to have an SSA name in the base valueized with availability in mind. Instead of re-valueizing the whole chain of operands we can simply only and

[PATCH] Complete ao_ref_init_from_vn_reference for all refs

2024-05-06 Thread Richard Biener
This makes sure we can create ao_refs from all VN operands we create. Bootstrapped and tested on x86_64-unknown-linux-gnu. Will push later. Richard. * tree-ssa-sccvn.cc (ao_ref_init_from_vn_reference): Add TARGET_MEM_REF support. Handle more bases. --- gcc/tree-ssa-sccvn.cc |

Re: [PATCH v2] testsuite: Verify r0-r3 are extended with CMSE

2024-05-06 Thread Torbjorn SVENSSON
Hi, Forgot to mention when I sent the patch that I would like to commit it to the following branches: - releases/gcc-11 - releases/gcc-12 - releases/gcc-13 - releases/gcc-14 - trunk Kind regards, Torbjörn On 2024-05-02 12:50, Torbjörn SVENSSON wrote: Add regression test to the existing

[PING gcc-14?][PATCH v2] docs: Update function multiversioning documentation

2024-05-06 Thread Andrew Carlotti
Is this patch ok? I was hoping to get it merged before 14.1 releases, if it's not yet too late for that. On Tue, Apr 30, 2024 at 05:10:45PM +0100, Andrew Carlotti wrote: > Add target_version attribute to Common Function Attributes and update > target and target_clones documentation. Move shared

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Martin Uecker
Am Montag, dem 06.05.2024 um 11:07 +0200 schrieb Richard Biener: > On Mon, 6 May 2024, Martin Uecker wrote: > > > Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > > > On Sat, 4 May 2024, Martin Uecker wrote: > > > > > > > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub

[PATCH] tree-optimization/114921 - _Float16 -> __bf16 isn't noop fixup

2024-05-06 Thread Richard Biener
The following further strengthens the check which convert expressions we allow to vectorize as simple copy by resorting to tree_nop_conversion_p on the vector components. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. PR tree-optimization/114921 *

Re: [PATCH] Driver: Reject output filenames with the same suffixes as source files [PR80182]

2024-05-06 Thread Richard Biener
On Mon, May 6, 2024 at 10:29 AM Peter0x44 wrote: > > On Mon May 6, 2024 at 8:14 AM BST, Richard Biener wrote: > > On Sat, May 4, 2024 at 9:36 PM Peter Damianov wrote: > > > > > > Currently, commands like: > > > gcc -o file.c -lm > > > will delete the user's code. > > > > Since there's an error

[COMMITTED] ada: Allow use of writable parameters inside function with side-effects

2024-05-06 Thread Marc Poulhiès
From: Piotr Trojanek Writable parameters can be used as global outputs inside functions with side-effects. gcc/ada/ * sem_prag.adb (Collect_Global_Item): Handle functions with side-effects. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 5

[COMMITTED] ada: Cleanup collecting of implicit outputs

2024-05-06 Thread Marc Poulhiès
From: Piotr Trojanek Move handling of IN parameters to where both IN and IN OUT parameters are handled. This makes the code marginally more efficient and symmetrical to handling of implicit inputs. gcc/ada/ * sem_prag.adb (Collect_Global_Item): Move code. Tested on

[COMMITTED] ada: Tweak discriminant source locations

2024-05-06 Thread Marc Poulhiès
From: Ronan Desplanques This patch changes the source location information for the default expressions of discrimants to better represent the fact that they're evaluated at the point of object declaration, in the cases where a Build_Default_Subtype optimization is performed. This fixes a

[COMMITTED] ada: Give error for reference to nonvisible library unit

2024-05-06 Thread Marc Poulhiès
From: Bob Duff This patch fixes a bug where the compiler would allow a name X to refer to a library unit that is not visible. In particular, this happens when the name X occurs in the private part of a library package, and the parent of that package contains an instantiation of a generic

[COMMITTED] ada: Excess finalization on return of call to dispatching constructor

2024-05-06 Thread Marc Poulhiès
From: Gary Dismukes The compiler expands a too-early finalization call for the result object of an extended return statement that returns a call to a dispatching constructor function for a limited interface type, resulting in premature (and extra) finalization of the result. The temporary object

[COMMITTED] ada: Deconstruct support for abstract states with Relaxed_Initialization

2024-05-06 Thread Marc Poulhiès
From: Piotr Trojanek GNATprove newer implemented support for abstract states with aspect Relaxed_Initialization, so the frontend support is now deconstructed. gcc/ada/ * einfo-utils.adb (Is_Relaxed_Initialization_State): Remove. * einfo-utils.ads

[COMMITTED] ada: Do not attempt to generate finalization actions with restricted profile

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou These actions are not supported with this profile, but we were nevertheless attempting to generate them for protected objects. gcc/ada/ * exp_ch7.adb (Build_Finalizer.Process_Declarations): Do not call Processing_Actions for simple protected objects if the

[COMMITTED] ada: Support writable parameters in Depends with side-effects

2024-05-06 Thread Marc Poulhiès
From: Piotr Trojanek Functions with side-effects can modify writable parameters of mode IN, so these parameters must be allowed to appear in their Depends aspects. gcc/ada/ * sem_prag.adb (Find_Role): Handle functions with side-effects like procedures. Tested on

[COMMITTED] ada: Small cleanup in C/C++ front-end interface

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou The fe.h header file is supposed to contain only the declarations needed by the code in the gcc-interface repository. gcc/ada/ * fe.h: Remove unused declarations and add 'extern' to others. no-issue-check Tested on x86_64-pc-linux-gnu, committed on master.

[COMMITTED] ada: Fix wrong Finalization_Size for No_Heap_Finalization objects

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou When an access type is subject to the No_Heap_Finalization pragma, no header is added in front of objects allocated through it, and the value returned by Finalization_Size is defined to be the size of this header. gcc/ada/ * exp_attr.adb

[COMMITTED] ada: Spurious reference warning on qualified expression

2024-05-06 Thread Marc Poulhiès
From: Justin Squirek Incremental improvement/clean up. gcc/ada/ * sem_warn.adb (Within_Postcondition): Add/modify comments to document various cases. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_warn.adb | 4 1 file changed, 4 insertions(+) diff

[COMMITTED] ada: Spurious reference warning on qualified expression

2024-05-06 Thread Marc Poulhiès
From: Justin Squirek This patch fixes an error in the compiler whereby an assignment to an out formal (whose type requires a predicate check) can lead to spurious "value may be referenced before it has a value" warnings when the RHS is a qualified expression. gcc/ada/ * sem_warn.adb

[COMMITTED] ada: Spurious reference warning on qualified expression

2024-05-06 Thread Marc Poulhiès
From: Justin Squirek Incremental improvement/clean up. gcc/ada/ * sem_warn.adb (Within_Postcondition): Add coverage for Preconditions Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_warn.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[COMMITTED] ada: Fix detection of (Un)Hide_Info pragma in GNATprove mode

2024-05-06 Thread Marc Poulhiès
From: Yannick Moy Spec or body may not be in a list for subunit. gcc/ada/ * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add guard. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/inline.adb | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[COMMITTED] ada: Spurious reference warning on qualified expression

2024-05-06 Thread Marc Poulhiès
From: Justin Squirek Incremental improvement/clean up. gcc/ada/ * sem_warn.adb (Within_Postcondition): Renamed to Within_Contract_Or_Predicate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_warn.adb | 20 ++-- 1 file changed, 10

[COMMITTED] ada: Replace references to PO_Simple by Protected_Objects in comments

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou The child unit was renamed a while ago. gcc/ada/ * libgnarl/s-taprob.ads (Protection): Add cross-reference to the counterpart in System.Tasking.Protected_Objects.Entries. * libgnarl/s-taskin.ads (Locking Rules): Replace PO_Simple by

[COMMITTED] ada: Replace redundant conditions with assertions

2024-05-06 Thread Marc Poulhiès
From: Piotr Trojanek Fix warnings from the CodePeer. The code structure is essentially: if A and B then ... elsif not A and not B then ... elsif A then ... elsif B then ... -- this condition is redundant end if; and it causes CodePeer to say "exception is raised in a conditional

[COMMITTED] ada: Fix missing associated node for packed array itypes

2024-05-06 Thread Marc Poulhiès
From: Piotr Trojanek After decoration, itypes should have its associated node set. gcc/ada/ * exp_pakd.adb (Create_Packed_Array_Impl_Type): Set associated node for the packed array itype. * exp_util.adb (Possible_Side_Effect_In_SPARK): Remove workaround for a

[COMMITTED] ada: Rework processing of special objects needing finalization

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou This reworks the processing of special objects needing finalization in the new implementation. These special objects, i.e. return object in extended return statements and transient objects, cannot be automatically handled by the post-processing phase because they have

[COMMITTED] ada: Fix spurious warning emission

2024-05-06 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes a bug where GNAT would emit incorrect warnings about obsolescent syntax for array aggregates with generics and particular arrangements of Ada version pragmas. This patch also removes a syntactic field that was introduced to support the emission of this

[COMMITTED] ada: Don't propagate convention to internal subprograms

2024-05-06 Thread Marc Poulhiès
From: Richard Kenner AI95-117 requires that all new primitives of a tagged type must inherit the convention of the full view of the type. However, we need not do this for primitives that are internally-generated, such as for finalization. There are issues with GNAT LLVM when primitives have

[COMMITTED] ada: Fix RM reference in comment

2024-05-06 Thread Marc Poulhiès
From: Ronan Desplanques The RM 2.2(15) that the comment mentioned before this patch doesn't exist. It's pretty clear that the comment meant to refer to RM 2.2(14) instead. gcc/ada/ * hostparm.ads: Fix reference to RM clause. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED] ada: Fix memory leak in 'Image

2024-05-06 Thread Marc Poulhiès
From: Bob Duff Fix memory leak in 'Image by managing the secondary stack in scopes that call the new Ada 2020 'Image, which calls 'Put_Image and then Get, which returns on the secondary stack. gcc/ada/ * exp_put_image.adb (Build_Image_Call): Call Set_Uses_Sec_Stack on the

[COMMITTED] ada: Fix non-idiomatic construct

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou gcc/ada/ * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Use No instead of not Present. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch3.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch3.adb

[COMMITTED] ada: Make a couple of comment tweaks

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou This removes a reference to a mechanism that didn't make it into the final implementation and completes the description of another. gcc/ada/ * libgnat/s-finpri.ads (Finalize_Master): Remove obsolete reference in the description. (Finalize_Object):

[COMMITTED] ada: Do not inline in GNATprove the subprograms with (Un)Hide_Info

2024-05-06 Thread Marc Poulhiès
From: Yannick Moy The annotations Hide_Info and Unhide_Info in GNATprove are meant to give special visibility in the corresponding scope to the precise definition of some entities. Hence, such scopes should not be inlined in GNATprove. gcc/ada/ * inline.adb

[COMMITTED] ada: Prevent inlining in GNATprove for memory leaks

2024-05-06 Thread Marc Poulhiès
From: Yannick Moy In some cases, inlining a call in GNATprove could lead to missing a memory leak. Recognize such cases and do not inline such calls. gcc/ada/ * inline.adb (Call_Can_Be_Inlined_In_GNATprove_Mode): Add case to prevent inlining of call. * inline.ads:

[COMMITTED] ada: Adjust source location for degenerate scope master

2024-05-06 Thread Marc Poulhiès
From: Eric Botcazou When the finalization scope master degenerates into a simple master node, the latter must inherit the source location that the former would have had. gcc/ada/ * exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): Adjust the Sloc of the master node

Re: [PATCH] sra: Do not leave work for DSE (that it can sometimes not perform)

2024-05-06 Thread Richard Biener
On Fri, 3 May 2024, Martin Jambor wrote: > Hi, > > when looking again at the g++.dg/tree-ssa/pr109849.C testcase we > discovered that it generates terrible store-to-load forwarding stalls > because SRA was leaving behind aggregate loads but all the stores were > by scalar parts and DSE failed to

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Richard Biener
On Mon, 6 May 2024, Martin Uecker wrote: > Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > > On Sat, 4 May 2024, Martin Uecker wrote: > > > > > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > > > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker

Re: [PATCH] testsuite: c++: Skip g++.dg/analyzer on Solaris [PR111475]

2024-05-06 Thread Richard Biener
On Sun, 5 May 2024, Rainer Orth wrote: > Rainer Orth writes: > > >> On Fri, May 03, 2024 at 09:31:08AM -0400, David Malcolm wrote: > >>> Jakub, Richi, Rainer: this is a non-trivial change that cleans up > >>> analyzer C++ testsuite results on Solaris, but has a slight risk of > >>> affecting

Re: [PATCH] Driver: Reject output filenames with the same suffixes as source files [PR80182]

2024-05-06 Thread Peter0x44
On Mon May 6, 2024 at 8:14 AM BST, Richard Biener wrote: > On Sat, May 4, 2024 at 9:36 PM Peter Damianov wrote: > > > > Currently, commands like: > > gcc -o file.c -lm > > will delete the user's code. > > Since there's an error from the linker in the end (missing 'main'), I wonder > if > the

[PING 4][PATCH v3] rs6000/p8swap: Fix incorrect lane extraction by vec_extract() [PR106770]

2024-05-06 Thread Surya Kumari Jangala
Ping On 08/01/24 11:19 am, Surya Kumari Jangala wrote: > Ping > > On 28/11/23 6:24 pm, Surya Kumari Jangala wrote: >> Ping >> >> On 10/11/23 12:27 pm, Surya Kumari Jangala wrote: >>> Ping >>> >>> On 03/11/23 1:14 pm, Surya Kumari Jangala wrote: Hi Segher, I have incorporated changes in

[PATCH] i386: fix ix86_hardreg_mov_ok with lra_in_progress

2024-05-06 Thread Kong, Lingling
Hi, Originally eliminate_regs_in_insn will transform (parallel [ (set (reg:QI 130) (plus:QI (subreg:QI (reg:DI 19 frame) 0) (const_int 96))) (clobber (reg:CC 17 flag))]) {*addqi_1} to (set (reg:QI 130) (subreg:QI (reg:DI 19 frame) 0)) {*movqi_internal} when verify_changes. But

Re: [PATCH] libgfortran: Fix libgfortran.so versioning on Solaris with subdirs

2024-05-06 Thread Rainer Orth
Hi FX, >> This patch fixes this by allowing for the new structure. >> Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. >> >> Ok for trunk? > > OK to push, given it’s localised inside LIBGFOR_USE_SYMVER_SUN. > > I find it weird though that .libs is harcoded there. If we look at all the >

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Martin Uecker
Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > On Sat, 4 May 2024, Martin Uecker wrote: > > > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker wrote: > > > > > > > > TYPE_CANONICAL as used by the

Re: [PATCH] Driver: Reject output filenames with the same suffixes as source files [PR80182]

2024-05-06 Thread Richard Biener
On Sat, May 4, 2024 at 9:36 PM Peter Damianov wrote: > > Currently, commands like: > gcc -o file.c -lm > will delete the user's code. Since there's an error from the linker in the end (missing 'main'), I wonder if the linker can avoid truncating/opening the output file instead? A trivial

Re: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.

2024-05-06 Thread Richard Biener
On Sat, 4 May 2024, Sebastian Huber wrote: > On 07.08.23 16:22, Qing Zhao via Gcc-patches wrote: > > Hi, > > > > This is the 2nd version of the patch. > > Comparing to the 1st version, the only change is to address Richard's > > comment on refering a warning option for diagnosing deprecated

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Richard Biener
On Sat, 4 May 2024, Martin Uecker wrote: > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker wrote: > > > > > > > TYPE_CANONICAL as used by the middle-end cannot express this but > > > > > > > > > > Hm. so how does it

[PATCH] c++: Allow IS_FAKE_BASE_TYPE for union types [PR114954]

2024-05-06 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- In some circumstances, unions can also have an __as_base type; we need to make sure that IS_FAKE_BASE_TYPE correctly recognises this. PR c++/114954 gcc/cp/ChangeLog: * cp-tree.h (IS_FAKE_BASE_TYPE): Also

Re: [PATCH] x86: Fix cmov cost model issue [PR109549]

2024-05-06 Thread Uros Bizjak
On Mon, May 6, 2024 at 5:20 AM Hongtao Liu wrote: > > CC uros. > > On Mon, May 6, 2024 at 11:03 AM Kong, Lingling > wrote: > > > > Hi, > > (if_then_else:SI (eq (reg:CCZ 17 flags) > > (const_int 0 [0])) > > (reg/v:SI 101 [ e ]) > > (reg:SI 102)) > > The cost is 8 for the rtx, the

[PATCH-5, rs6000] Replace explicit CC bit reverse with common format

2024-05-06 Thread HAO CHEN GUI
Hi, It's the fifth patch of a series of patches optimizing CC modes on rs6000. There are some explicit CR6 bit reverse (mfcr/xor) expand in vector.md. As the forth patch optimized CC bit reverse implement, the patch changes the explicit format to the common format (testing if the bit is not