Re: [PATCH] RISC-V: Support CPUs in -march.

2025-06-01 Thread Robin Dapp
I stumped across this change from https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/88 and I want to express my strong disagreement with this change. Perhaps I'm accustomed to Arm's behavior, but I believe using -march= to target a specific CPU isn't ideal. * -march=X: (exe

[PING * 3][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-06-01 Thread Peter Frost
Ping https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672568.html

Re: DEFAULT_PCC_STRUCT_RETURN on NetBSD vs Linux

2025-06-01 Thread Jeff Law
On 6/1/25 8:21 AM, John Paul Adrian Glaubitz wrote: And what about the value for STACK_BOUNDARY? It seems to be 16 for many Linux targets while it's 32 for NetBSD. Is there a reason why it's 16-bit- aligned on Linux? Regardless of differences in the values, I don't see changing them at this

Re: [PATCH v4 04/20] Remove unnecessary `record` argument from maybe_version_functions.

2025-06-01 Thread Jeff Law
On 5/28/25 4:10 AM, Alfie Richards wrote: Previously, the `record` argument in maybe_version_function allowed the call to cgraph_node::record_function_versions to be skipped. However, this was only skipped when both decls were already marked as versioned, in which case we trigger the early ex

[PATCH] c: Move checking assertions from recursion when forming composite types to avoid ICE.

2025-06-01 Thread Martin Uecker
After looking a bit more at this, it turns out that it is still possible to trigger the assertion that checks that the composite type is compatible to the original types when using self-referential types where it then sees composite types which are still under construction. This patch now moves

Re: [PATCH] testsuite: RISC-V: Fix the typo in param-autovec-mode.c

2025-06-01 Thread Jeff Law
On 5/28/25 7:59 PM, Liao Shihua wrote: This patch fixes the typo in the test case `param-autovec-mode.c` in the RISC-V autovec testsuite. The option `autovec-mode` is changed to `riscv-autovec-mode` to match the expected parameter name. gcc/testsuite/ChangeLog: * gcc.target/riscv

Re: [PATCH] Add newlib to gitignore

2025-06-01 Thread Jeff Law
On 6/1/25 1:40 PM, Arijit Kumar Das wrote: newlib sources are not a part of GCC so should be ignored, if present. Signed-off-by: Arijit Kumar Das --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 7150fc3b29c..5ae6a5a08d6 100644 --- a/.giti

Re: [PATCH] or1k: Fix struct return test

2025-06-01 Thread Jeff Law
On 5/31/25 12:03 AM, Stafford Horne wrote: In or1k structs are returned from functions using the memory address passed in r3. In the current version of GCC the struct stores changed from r11 (the return value) to r3 the incoming memory address. Both of are valid. Adjust the test to match wh

Re: [PATCH v4] c++: Unwrap type traits defined in terms of builtins within diagnostics [PR117294]

2025-06-01 Thread Patrick Palka
On Sat, 31 May 2025, Nathaniel Shead wrote: > On Fri, May 30, 2025 at 11:10:08AM -0400, Patrick Palka wrote: > > On Fri, 30 May 2025, Patrick Palka wrote: > > > > > On Fri, 30 May 2025, Nathaniel Shead wrote: > > > > > > > On Wed, May 28, 2025 at 02:14:06PM -0400, Patrick Palka wrote: > > > > >

Re: [PATCH] RISC-V: Implement full-featured iterator for riscv_subset_list [NFC]

2025-06-01 Thread Kito Cheng
CI passed, pushed to trunk :) On Thu, May 29, 2025 at 1:59 PM Kito Cheng wrote: > > This commit implements a full-featured iterator for the > riscv_subset_list, that it able to use range-based-for-loop. > > That could simplfy the code in the future, and make it more readable, > also more compatib

Re: [PATCH] c++tools: Don't check --enable-default-pie.

2025-06-01 Thread Kito Cheng
Pushed to trunk :) On Fri, May 30, 2025 at 2:01 PM Richard Biener wrote: > > On Thu, May 29, 2025 at 8:06 AM Kito Cheng wrote: > > > > `--enable-default-pie` is an option to specify whether to enable > > position-independent executables by default for `target`. > > > > However c++tools is build

Re: [PATCH] RISC-V: Adjust build rule for gen-riscv-ext-opt and gen-riscv-ext-texi

2025-06-01 Thread Kito Cheng
committed :) On Mon, Jun 2, 2025 at 11:28 AM Jeff Law wrote: > > > > On 5/28/25 11:59 PM, Kito Cheng wrote: > > Separate the build rules to compile and link stage to make sure > > BUILD_LINKERFLAGS and BUILD_LDFLAGS are applied correctly. > > > > We hit this issue when we try to build GCC with no

Re: [PATCH, libgfortran] PR119856 Part 2 Fix error handling for missing commas in format strings

2025-06-01 Thread Harald Anlauf
Hi Jerry, On 5/31/25 19:38, Jerry D wrote: Hi all, The attached patch fixes a latent issue where we were saving a parsed and checked format string that had a missing comma. This resulted in the correct error on the first use of the string, but a missed error on subsequent uses of the string.

Re: [PATCH v4 03/20] Add string_slice class.

2025-06-01 Thread Jeff Law
On 5/28/25 4:10 AM, Alfie Richards wrote: The string_slice inherits from array_slice and is used to refer to a substring of an array that is memory managed elsewhere without modifying the underlying array. For example, this is useful in cases such as when needing to refer to a substring of an

Re: [PATCH] RISC-V: Adjust build rule for gen-riscv-ext-opt and gen-riscv-ext-texi

2025-06-01 Thread Jeff Law
On 5/28/25 11:59 PM, Kito Cheng wrote: Separate the build rules to compile and link stage to make sure BUILD_LINKERFLAGS and BUILD_LDFLAGS are applied correctly. We hit this issue when we try to build GCC with non-system-default g++, and it use newer libstdc++, and then got error from using o

Re: [PATCH 0/3] Redirect to specific target based on TARGET_VERSION_COMPATIBLE

2025-06-01 Thread Jeff Law
On 5/28/25 3:58 AM, Alfie Richards wrote: On 28/05/2025 03:36, Jeff Law wrote: On 5/27/25 2:36 AM, Alfie Richards wrote: Hi Jeff, On 22/05/2025 21:02, Jeff Law wrote: On 5/22/25 9:05 AM, Alfie Richards wrote: Hi Jeff, I sent this patch with my implementation a while ago: https://gcc

Re: [PATCH 3/3] OpenMP: Handle more cases in user/condition selector

2025-06-01 Thread Sandra Loosemore
On 5/29/25 22:19, Tobias Burnus wrote: Sandra Loosemore wrote: Like the attached V2 patch? LGTM. However, I think in metadirective-condition-template.C the "scan-tree-dump" should now be changed to "scan-tree-dump-times", given that there are several tests. Yup, good idea. I've pushed th

Re: [PATCH] testsuite: Add tls_link effective target

2025-06-01 Thread Jeff Law
On 5/27/25 7:36 AM, Christophe Lyon wrote: Some tests have 'dg-do link' but currently require 'tls' which is a compile-only check. In some configurations of arm-none-eabi, the 'tls' effective-target can be successful although these tests fail to link with undefined reference to `__aeabi_read_

Re: [PATCH v5 07/24] Change make_attribute to take string_slice.

2025-06-01 Thread Jeff Law
On 5/29/25 6:46 AM, Alfie Richards wrote: gcc/ChangeLog: * attribs.cc (make_attribute): Change arguments. * attribs.h (make_attribute): Change arguments. Approved by Richard Sandiford. Similarly for anything else already approved that is safe to commit now. jeff

Re: [PATCH] expmed: Prevent non-canonical subreg generation in store_bit_field [PR118873]

2025-06-01 Thread Jeff Law
On 5/30/25 12:12 AM, Richard Biener wrote: On Thu, May 29, 2025 at 12:27 PM Konstantinos Eleftheriou wrote: Hi Richard, thanks for the response. On Mon, May 26, 2025 at 11:55 AM Richard Biener wrote: On Mon, 26 May 2025, Konstantinos Eleftheriou wrote: In `store_bit_field_1`, when the

Re: [PATCH v5 05/24] Update is_function_default_version to work with target_version.

2025-06-01 Thread Jeff Law
On 5/29/25 6:44 AM, Alfie Richards wrote: Notably this respects target_version semantics where an unannotated function can be the default version. gcc/ChangeLog: * attribs.cc (is_function_default_version): Add target_version logic. Approved by Richard Sandiford. Given this is approv

Re: [PATCH] RISC-V: Support CPUs in -march.

2025-06-01 Thread Robin Dapp
This rule clearly applies to directly related options like -ffoo and -fno-foo, but it’s less obvious for unrelated pairs like -ffoo and -fbar especially when there is traditionally strong specifics. In many cases, the principle of "the most specific option wins" governs the behavior. Here

Re: DEFAULT_PCC_STRUCT_RETURN on NetBSD vs Linux

2025-06-01 Thread John Paul Adrian Glaubitz
On Sun, 2025-06-01 at 19:44 -0600, Jeff Law wrote: > > On 6/1/25 8:21 AM, John Paul Adrian Glaubitz wrote: > > > > > And what about the value for STACK_BOUNDARY? It seems to be 16 for many > > Linux targets while it's 32 for NetBSD. Is there a reason why it's 16-bit- > > aligned on Linux? > > Re

Re: PING³ — Re: PING (and v2) – [Patch] nvptx/nvptx.opt: Update -march-map= for newer sm_xxx

2025-06-01 Thread Tobias Burnus
Tobias Burnus wrote: PING² On May 12, 2025, Tobias Burnus wrote: PING. There is actually a minor update as meanwhile CUDA 12.8 was released that added the 'f' suffix and sm_103 and sm_121. Still, the pattern remains the same; hence, a normal PING. On April 25, 2025, Tobias Burnus wrote: The

[PATCH v2] gimple-fold: Implement simple copy propagation for aggregates [PR14295]

2025-06-01 Thread Andrew Pinski
This implements a simple copy propagation for aggregates in the similar fashion as we already do for copy prop of zeroing. Right now this only looks at the previous vdef statement but this allows us to catch a lot of cases that show up in C++ code. This used to deleted aggregate copies that are t

[PATCH] Move get_call_rtx_from to final.c

2025-06-01 Thread H.J. Lu
Move get_call_rtx_from to final.c and call call_from_call_insn. PR other/120493 * final.cc (call_from_call_insn): Change the argument type to const rtx_call_insn *. (get_call_rtx_from): New. * rtl.h (is_a_helper ::test): New. (get_call_rtx_from): Moved to the final.cc section. * rtlanal.cc (get_ca

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-06-01 Thread Eric Botcazou
> If one wants to look up something in symbol table during late optimization > one is supposed to check that ::get does not return NULL and be conservative > otheriwse. So your change for PR120156 was OK with me, but I did not > explicitly write (sorty for that). Similarly for vectorizer I would s

Re: [PATCH] aarch64:sve: Use create_tmp_reg_or_ssa_name instead of create_tmp_var in the folder

2025-06-01 Thread Richard Biener
On Sat, May 31, 2025 at 8:41 PM Andrew Pinski wrote: > > Currently gimple_folder::convert_and_fold calls create_tmp_var; that means > while in ssa form, > the pass which calls fold_stmt will always have to update the ssa (via > TODO_update_ssa or otherwise). > This seems not very useful since we

Re: [PATCH] Move get_call_rtx_from to final.c

2025-06-01 Thread Richard Biener
On Sun, Jun 1, 2025 at 9:14 AM H.J. Lu wrote: > > Move get_call_rtx_from to final.c and call call_from_call_insn. > > PR other/120493 > * final.cc (call_from_call_insn): Change the argument type to > const rtx_call_insn *. > (get_call_rtx_from): New. > * rtl.h (is_a_helper ::test): New. > (get_cal

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-06-01 Thread Richard Biener
On Sun, Jun 1, 2025 at 12:54 PM Eric Botcazou wrote: > > > If one wants to look up something in symbol table during late optimization > > one is supposed to check that ::get does not return NULL and be conservative > > otheriwse. So your change for PR120156 was OK with me, but I did not > > expli

Re: DEFAULT_PCC_STRUCT_RETURN on NetBSD vs Linux

2025-06-01 Thread John Paul Adrian Glaubitz
On Wed, 2025-05-28 at 18:10 +0200, Andreas Schwab wrote: > On Mai 28 2025, John Paul Adrian Glaubitz wrote: > > > Shouldn't the #undef in linux.h undefine DEFAULT_PCC_STRUCT_RETURN and not > > PCC_STATIC_STRUCT_RETURN? > > No, they are separate target options. PCC_STATIC_STRUCT_RETURN is no > lo

Re: [PATCH] RISC-V: Support CPUs in -march.

2025-06-01 Thread Fangrui Song
On Sun, Jun 1, 2025 at 4:06 AM Robin Dapp wrote: > > I stumped across this change from > > https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/88 > > and I want to express my strong disagreement with this change. > > > > > > Perhaps I'm accustomed to Arm's behavior, but I believe u

[PATCH] gcc: middle-end opt for trigonometric pi-based functions builtins

2025-06-01 Thread Yuao Ma
Hello world, This patch partially handled PR118592. This patch builds upon r16-710-g591d3d02664c7b and r16-711-g89935d56f768b4. It introduces middle-end optimizations, such as constant folding, for our trigonometric pi-based function built-ins. For MPFR versions older than 4.2.0, we've included

Re: [PATCH] forwprop: Manually rename the virtual mem op for complex and vector loads prop

2025-06-01 Thread Richard Biener
> Am 01.06.2025 um 04:16 schrieb Andrew Pinski : > > There are two places which forwprop replaces an original load to a few > different loads. > Both can set the vuse manually instead of relying on update_ssa. > One is doing a complex load followed by REAL/IMAG_PART only > And the other is ve

[PATCH v2] c++, coroutines: CWG2563 promise lifetime extension [PR115908].

2025-06-01 Thread Iain Sandoe
Updated. I realised we no longer need to refer to initial_await_resume_called in the ramp at all, v2 removes the setting of the variable from there and puts it into the start of the actor. Tested on x86_64-darwin and powerp64le-linux. Confirmed that the sanitizer test in PR 118074 is fixed but we

[PATCH v2] aarch64:sve: Use make_ssa_name instead of create_tmp_var in the folder

2025-06-01 Thread Andrew Pinski
Currently gimple_folder::convert_and_fold calls create_tmp_var; that means while in ssa form, the pass which calls fold_stmt will always have to update the ssa (via TODO_update_ssa or otherwise). This seems not very useful since we know that this will always be a ssa name, using make_ssa_name inst

[committed] cobol: Wrap the call to fprintf in a libgcobol routine. [PR119524]

2025-06-01 Thread Robert Dubner
>From 501f95ffae0371e2335f89951a02a3a32f0cd53d Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Sun, 1 Jun 2025 12:32:37 -0400 Subject: [PATCH] [PR119524] --- gcc/cobol/gengen.cc| 16 +--- libgcobol/libgcobol.cc | 14 ++ 2 files changed, 15 i

Re: [PATCH] aarch64:sve: Use create_tmp_reg_or_ssa_name instead of create_tmp_var in the folder

2025-06-01 Thread Andrew Pinski
On Sun, Jun 1, 2025 at 3:54 AM Richard Biener wrote: > > On Sat, May 31, 2025 at 8:41 PM Andrew Pinski > wrote: > > > > Currently gimple_folder::convert_and_fold calls create_tmp_var; that means > > while in ssa form, > > the pass which calls fold_stmt will always have to update the ssa (via >

[PATCH] Add newlib to gitignore

2025-06-01 Thread Arijit Kumar Das
newlib sources are not a part of GCC so should be ignored, if present. Signed-off-by: Arijit Kumar Das --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 7150fc3b29c..5ae6a5a08d6 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,6 @@ stamp-*