[COMMITTED 17/31] ada: Avoid conversion from String to Name_Id at runtime

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Attribute): Replace runtime conversion with existing constant. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[COMMITTED 02/31] ada: Preserve Warning_Doc_Switch in gnatprove invocation

2025-01-07 Thread Marc Poulhiès
From: Johannes Kanig When invoked by gnat2why, the Warning_Doc_Switch was unintenionally reset. gcc/ada/ChangeLog: * gnat1drv.adb: (SPARK_Library_Warning): preserve Warning_Doc_Switch Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gnat1drv.adb | 2 ++ 1 file changed,

[COMMITTED 16/31] ada: Untangle check for restriction No_Implementation_Attributes

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; given that no attribute is both defined by Ada 83 and specific to GNAT, the semantics is unaffected. gcc/ada/ChangeLog: * sem_attr.adb (Analyze_Attribute): Simplify logic. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb

[COMMITTED 29/31] ada: Drop g-cpp* units not needed by the compiler

2025-01-07 Thread Marc Poulhiès
From: Alexandre Oliva Having moved __gnat_convert_caught_object to g-cstyin.o, we can drop other g-cpp* units that are now needed by programs that actually use their APIs to get more information about C++ exceptions and type_info objects. gcc/ada/ChangeLog: * gcc-interface/Make-lang.in

RE: [PATCH] COBOL 3/8 gen: GENERIC interface

2025-01-07 Thread Richard Biener
On Mon, 23 Dec 2024, Robert Dubner wrote: > Richard, a bunch of things you address are in my bailwick. > > When Jim and I set out to create a COBOL front end, I knew *NOTHING* > about, well, anything vis-à-vis GCC. I barely knew how it worked. Some > things I had to figure out even before I kne

Re: [PATCH v1 1/4] Match: Refactor the signed SAT_SUB match patterns [NFC]

2025-01-07 Thread Jeff Law
On 1/6/25 7:47 PM, Li, Pan2 wrote: Kindly ping for the series> Pan -Original Message- From: Li, Pan2 Sent: Monday, December 23, 2024 3:09 PM To: gcc-patches@gcc.gnu.org Cc: richard.guent...@gmail.com; tamar.christ...@arm.com; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gm

[Patch] libgomp.texi: Minor update to omp_get_num_devices/omp_get_initial_device

2025-01-07 Thread Tobias Burnus
OpenMP 6 changed that omp_get_initial_device may not only return the dynamic value of omp_get_num_devices() but also the constant value omp_get_num_devices (== -1). For now, GCC returns omp_get_num_devices() but we may want to change this in the future as '-1' can be solved at compile time; in pa

Re: [PATCH] match.pd: Fold pattern of round semantics.

2025-01-07 Thread Richard Biener
On Thu, 2 Jan 2025, 赵洲 wrote: > Add Reviewer Richard Biener. > > > > -原始邮件- > > 发件人: "Zhou Zhao" > > 发送时间:2025-01-02 19:37:07 (星期四) > > 收件人: gcc-patches@gcc.gnu.org > > 抄送: xry...@xry111.site, i...@xen0n.name, chengl...@loongson.cn, > > xucheng...@loongson.cn, zhaoz...@loongson.cn > >

[committed][PR testsuite/118055] Trivial testsuite adjustment for m68k target

2025-01-07 Thread Jeff Law
After a bit of a prod from Hans... Make the obvious change to these tests to get them passing again on m68k. Jeff commit a856b4d97b8d328fdcb169b792ac5456e40f8c00 Author: Jeff Law Date: Tue Jan 7 07:43:19 2025 -0700 [PR testsuite/118055] Trivial testsuite adjustment for m68k target

Re: [PATCH] middle-end/118325 - nonlocal goto lowering

2025-01-07 Thread Jakub Jelinek
On Tue, Jan 07, 2025 at 03:49:26PM +0100, Richard Biener wrote: > When nonlocal goto lowering creates an artificial label it fails > to adjust its context. > > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress > (I doubt good test coverage is present for non-local gotos) > > OK when t

Re: [PATCH] gcc-wwwdocs: Fix typo in GCC version number.

2025-01-07 Thread Jakub Jelinek
On Tue, Jan 07, 2025 at 11:20:11PM +0800, Gerald Pfeifer wrote: > On Tue, 7 Jan 2025, Simon Martin wrote: > > Noticed while trying to understand when I can expect the GCC 15 branch > > to be created: the GCC 15 release criteria page still mentions GCC 14. > > > > I'll push this as obvious. > > Th

Re: [PATCH] arm: [MVE intrinsics] Fix tuples field name (PR 118332)

2025-01-07 Thread Richard Sandiford
Christophe Lyon writes: > A recent commit mistakenly changed the field name for tuples from > 'val' to '__val', but unlike SVE this name is mandated by ACLE. > > The patch simply switches back the name to 'val'. > > PR target/118332 > > gcc/ChangeLog: > > * config/arm/arm-mve-builtins.

Ping re C++ parts of: [PATCH] c/c++: UX improvements to 'too {few,many} arguments' errors [PR118112]

2025-01-07 Thread David Malcolm
On Thu, 2024-12-19 at 18:40 -0500, David Malcolm wrote: Jason: are the C++ changes OK? Patch can also be seen at: https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672076.html Joseph approved the C part of this in https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672473.html Thanks D

RE: [RFC] PR81358: Enable automatic linking of libatomic

2025-01-07 Thread Prathamesh Kulkarni
> -Original Message- > From: Joseph Myers > Sent: 03 January 2025 22:22 > To: Prathamesh Kulkarni > Cc: Tobias Burnus ; Xi Ruoyao > ; Matthew Malcomson ; gcc- > patc...@gcc.gnu.org > Subject: RE: [RFC] PR81358: Enable automatic linking of libatomic > > External email: Use caution openi

Re: [PATCH v1] LoongArch: Opitmize the cost of vec_construct.

2025-01-07 Thread Lulu Cheng
在 2025/1/7 下午12:47, chenxiaolong 写道: When analyzing 525 on LoongArch architecture, it was found that the for loop of hotspot function x264_pixel_satd_8x4 could not be quantized 256-bit due to the cost of vec_construct setting. After re-adjusting vec_construct, the performance of 525 program

RE: [RFC] PR81358: Enable automatic linking of libatomic

2025-01-07 Thread Thomas Schwinge
Hi Prathamesh! Thanks for working on this! Per my understanding, this patch won't automagically resolve the need to (occasionally) having to specify '-foffload-options=nvptx-none=-latomic' for nvptx offloading: it doesn't use 'LINK_LIBATOMIC_SPEC', currently only used via 'GNU_USER_TARGET_LINK_G

RE: PR118200: note_simd_array_uses crashes in SIMT region with offloading to nvptx

2025-01-07 Thread Prathamesh Kulkarni
> -Original Message- > From: Prathamesh Kulkarni > Sent: 26 December 2024 22:36 > To: gcc-patches@gcc.gnu.org; ja...@redhat.com; Thomas Schwinge > > Subject: PR118200: note_simd_array_uses crashes in SIMT region with > offloading to nvptx > > External email: Use caution opening links

[PATCH] tree-optimization/118269 - SLP reduction chain and early breaks

2025-01-07 Thread Richard Biener
When we create the SLP reduction chain epilogue for the PHIs for the early exit we fail to properly classify the reduction as SLP reduction chain. The following fixes the corresponding checks. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. PR tree-optimization/118269

Re: [PATCH] Accept commas between clauses in OpenMP declare variant

2025-01-07 Thread Tobias Burnus
Paul-Antoine Arras: Add support to the Fortran parser for the new OpenMP syntax that allows a comma after the directive name and between clauses of declare variant. The C and C++ parsers already support this syntax so only a new test is added. Note: only the optional comma between directive nam

Re: [PATCH 10/10] aarch64: Try to avoid passing new flags to assembler

2025-01-07 Thread Andrew Carlotti
On Mon, Nov 25, 2024 at 11:26:39PM +, Richard Sandiford wrote: > Sorry for the slow review. > > Andrew Carlotti writes: > > These new flags (+fcma, +jscvt, +rcpc2, +jscvt, +frintts, +wfxt and +xs) > > were only recently added to the assembler. To improve compatibility > > with older assemble

Re: [RFC/RFA] [PR tree-optimization/92539] Improve code and avoid Warray-bounds false positive

2025-01-07 Thread Richard Biener
On Mon, Jan 6, 2025 at 5:40 PM Qing Zhao wrote: > > > > > On Jan 6, 2025, at 11:01, Richard Biener wrote: > > > > On Mon, Jan 6, 2025 at 3:43 PM Qing Zhao wrote: > >> > >> > >> > >>> On Jan 6, 2025, at 09:21, Jeff Law wrote: > >>> > >>> > >>> > >>> On 1/6/25 7:11 AM, Qing Zhao wrote: > > >

[COMMITTED 06/31] ada: Fix comments about Subprogram_Variant and Exceptional_Cases

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek The comment about Subprogram_Variant was outdated after more types have been allowed by the corresponding SPARK RM rule; the comment about Exceptional_Cases was incorrect, after being copy-pasted. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Exceptional_Contract, Anal

[COMMITTED 18/31] ada: Remove flag Is_Inherited_Pragma which is only set and never used

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; behavior is unaffected. Flag Is_Inherited_Pragma is only set in GNAT, but is not actually used, neither by the compiler nor by any backend. gcc/ada/ChangeLog: * contracts.adb (Inherit_Pragma): Don't set flag Is_Inherited_Pragma. * gen_il-fields

[COMMITTED 26/31] ada: Do not raise exceptions from Exp_Aggr.Packed_Array_Aggregate_Handled

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou An exception is now raised during bootstrap and this causes compatibility issues with older compilers. gcc/ada/ChangeLog: * exp_aggr.adb (Packed_Array_Aggregate_Handled): Remove declaration and handler for Not_Handled local exception. Check the return value

[COMMITTED 08/31] ada: Reject references to attribute Result in Exceptional_Cases

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Functions with aspect Side_Effects should not reference attribute Result in consequences of their aspect Exceptional_Cases. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Exceptional_Cases_In_Decl_Part): Reject references to attribute Result. Tested on x86_64-p

[COMMITTED 14/31] ada: Remove unnecessary qualifiers for First/Next list operations

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup related to work on expression functions for GNATprove (which require accessibility checks even when they are not expanded and thus have no explicit return statements). gcc/ada/ChangeLog: * accessibility.adb (First_Selector): Remove redundant and locally

[COMMITTED 20/31] ada: Fix abort deferral for finally parts

2025-01-07 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes two problems with how abort was deferred in finally parts. First, calls to runtime subprograms are now omitted when aborting is disallowed by active restrictions. Second, Abort_Undefer is now correctly called when the finally part propagates an exception.

[COMMITTED 22/31] ada: Fix violations of GNAT-specific GNATcheck rules

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ChangeLog: * diagnostics-pretty_emitter.adb (Get_Last_Line_Char): Fix whitespace. * sem_aggr.adb (Resolve_Array_Aggregate): Fix style. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/diagnosti

Re: [PATCH] Prefer scalar_int_mode if the size - 1 is equal to UNITS_PER_WORD.

2025-01-07 Thread Jeff Law
On 1/7/25 2:09 AM, Tsung Chun Lin wrote: Hi, Could someone help merge this patch if there are no further concerns? It'll get addressed. Many contributors have been on holiday and are still catching up. jeff

Re: [PATCH 1/2] Match:Support IMM=-1 for signed scalar SAT_ADD IMM form1

2025-01-07 Thread Jeff Law
On 1/2/25 1:34 AM, Li Xu wrote: From: xuli This patch would like to support .SAT_ADD when IMM=-1. Form1: T __attribute__((noinline)) \ sat_s_add_imm_##T##_fmt_1##_##INDEX (T x) \ {\ T sum = (UT)x + (UT)IMM;

Re: [PATCH 1/2] Match:Support signed vector SAT_ADD IMM form 1

2025-01-07 Thread Jeff Law
On 1/2/25 1:03 AM, Li Xu wrote: From: xuli This patch would like to support vector SAT_ADD when one of the op is singed IMM. void __attribute__((noinline)) \ vec_sat_s_add_imm_##T##_fmt_1##_##INDEX (T *out, T *op_1, unsigned limit) \ {

[patch, doc, Fortran] Further documentation of UNSIGNED

2025-01-07 Thread Thomas Koenig
Hello world, the attached patch does what it says in the ChangeLog entry. Tested with "make dvi" and "make pdf". OK for trunk? Best regards Thomas Document unsigned constants in intrinsic modules. gcc/fortran/ChangeLog: * intrinsic.texi (ISO_FORTRAN_ENV): Also

Re: [PATCH] riscv: add mising masking in lrsc expander (PR118137)

2025-01-07 Thread Kito Cheng
LGTM Patrick O'Neill 於 2025年1月8日 週三 00:12 寫道: > > On 1/7/25 07:37, Andreas Schwab wrote: > > gcc: > > PR target/118137 > > * config/riscv/sync.md ("lrsc_atomic_exchange"): Apply mask > > to shifted value. > > > > gcc/testsuite: > > PR target/118137 > > * gcc.dg/atom

Re: [PATCH] libstdc++: add missing to_underlying to module std [PR106852]

2025-01-07 Thread Jonathan Wakely
On Sat, 4 Jan 2025 at 20:06, Nicolas Werner wrote: > > std::to_underlying was missing from the std module introduced in > 7db55c0ba1baaf0e323ef7f9ef8c9cda077d40e9. This patch adds the missing > export for this utility. > > There might be more exports missing, but this is the one I found when > try

[PATCH] testsuite: enable effective-target sync_char_short on RISC-V

2025-01-07 Thread Andreas Schwab
* lib/target-supports.exp (check_effective_target_sync_char_short): Enable for riscv*-*-*. --- gcc/testsuite/lib/target-supports.exp | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5ce7b7976f9.

[PATCH] riscv: add mising masking in lrsc expander (PR118137)

2025-01-07 Thread Andreas Schwab
gcc: PR target/118137 * config/riscv/sync.md ("lrsc_atomic_exchange"): Apply mask to shifted value. gcc/testsuite: PR target/118137 * gcc.dg/atomic/pr118137.c: New. --- gcc/config/riscv/sync.md | 1 + gcc/testsuite/gcc.dg/atomic/pr118137.c |

[PING] [PATCH] c++: Relax checking assert about elision to support -fno-elide-constructors [PR114619]

2025-01-07 Thread Simon Martin
Hi, On 11 Nov 2024, at 20:35, Simon Martin wrote: > Hi, > > On 30 Oct 2024, at 11:46, Simon Martin wrote: > >> On 19 Oct 2024, at 11:09, Simon Martin wrote: >> >>> We currently ICE in checking mode with cxx_dialect < 17 on the >>> following >>> valid code >>> >>> === cut here === >>> struct X { >

[PING] [PATCH v8] c++: Fix overeager Woverloaded-virtual with conversion operators [PR109918]

2025-01-07 Thread Simon Martin
Hi, On 11 Nov 2024, at 20:36, Simon Martin wrote: > Hi, > > On 30 Oct 2024, at 11:44, Simon Martin wrote: > >> Friendly ping. > Friendly ping. Ping. Thanks! Simon >> >> On 16 Oct 2024, at 17:43, Simon Martin wrote: >> >>> Hi Jason, >>> >>> On 12 Oct 2024, at 4:51, Jason Merrill wrote: >>> O

[PING] [PATCH] c++: Only prune capture proxies for constant variables at instantiation time [PR114292]

2025-01-07 Thread Simon Martin
Hi, On 13 Dec 2024, at 13:50, Simon Martin wrote: > Hi Marek, > > On 13 Dec 2024, at 0:44, Marek Polacek wrote: > >> On Thu, Dec 12, 2024 at 07:07:38PM +, Simon Martin wrote: >>> We currently ICE upon the following valid (under -Wno-vla) code >>> >>> === cut here === >>> void f(int c) { >>>

[PING] [PATCH] c++: Make sure fold_sizeof_expr returns the correct type [PR117775]

2025-01-07 Thread Simon Martin
Hi, On 11 Dec 2024, at 22:27, Simon Martin wrote: > Hi, > > On 29 Nov 2024, at 15:33, Simon Martin wrote: > >> We currently ICE upon the following code, that is valid under >> -Wno-pointer-arith: >> >> === cut here === >> int main() { >> decltype( [](auto) { return sizeof(void); } ) x; >> ret

Re: [PATCH] gcc-wwwdocs: Fix typo in GCC version number.

2025-01-07 Thread Gerald Pfeifer
On Tue, 7 Jan 2025, Simon Martin wrote: > Noticed while trying to understand when I can expect the GCC 15 branch > to be created: the GCC 15 release criteria page still mentions GCC 14. > > I'll push this as obvious. Thank you, Simon! > Are such pages created via a script? If so I am happy to fi

Re: [PATCH] gcc-wwwdocs: Fix typo in GCC version number.

2025-01-07 Thread Gerald Pfeifer
On Tue, 7 Jan 2025, Gerald Pfeifer wrote: >> Are such pages created via a script? If so I am happy to fix it as well. > Unless our release managers (Jakub on this case) have been taken over by > ChatGPT/Gemini/you-name-it I believe this is manual work following > https://gcc.gnu.org/releasing.h

Re: [Patch] libgomp.texi: Minor update to omp_get_num_devices/omp_get_initial_device

2025-01-07 Thread Tobias Burnus
Now committed as r15-6659-gd3ccd89fa0d34d – with an additional typo fix: stipe → stripe (OpenMP 6.0 loop transformation directive). Tobias commit d3ccd89fa0d34d44226af47fe82c27ba7833fe65 Author: Tobias Burnus Date: Tue Jan 7 16:43:30 2025 +0100 libgomp.texi: Minor update to omp_get_num_d

[COMMITTED 01/31] ada: Restrict previous change made to expansion of allocators

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou There is no need to build a cleanup if exceptions cannot be propagated. gcc/ada/ChangeLog: * exp_ch4.adb (Expand_Allocator_Expression): Do not build a cleanup if restriction No_Exception_Propagation is active. * exp_ch6.adb (Make_Build_In_Place_Call_I

[COMMITTED 21/31] ada: Remove dead code in detection of null record definitions

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; behavior is unaffected. gcc/ada/ChangeLog: * sem_util.adb (Is_Null_Record_Definition): Remove check for Component_List being present after using it; replace check for component item being a component declaration with an assertion;

Patch ping^3 (Re: [PATCH] analyzer: Handle nonnull_if_nonzero attribute [PR117023])

2025-01-07 Thread Jakub Jelinek
On Wed, Dec 18, 2024 at 12:15:15PM +0100, Jakub Jelinek wrote: > On Fri, Dec 06, 2024 at 05:07:40PM +0100, Jakub Jelinek wrote: > > I'd like to ping the > > https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668699.html > > patch. > > > > The patches it depended on are already committed and t

[COMMITTED 15/31] ada: Handle attributes related to Ada 2012 iterators as internal

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Use existing machinery for internal attributes to handle attributes related to Ada 2012 iterators. All these attributes exist exclusively as a mean to delay processing. Code cleanup. The only change in behavior is the wording of error emitted when one of the internal attribu

[COMMITTED 09/31] ada: Elide the copy for bit-packed aggregates in (safe) assignments

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou The in-place expansion has been historically disabled for them, but there does not seem to be any good reason left for this. gcc/ada/ChangeLog: * exp_aggr.adb (Expand_Array_Aggregate): Do not exclude aggregates of bit-packed array types in assignments from in

[COMMITTED 10/31] ada: Add "finally" GNAT extension

2025-01-07 Thread Marc Poulhiès
From: Ronan Desplanques This patch adds a new reserved word, "finally", and accompanying new syntax that's similar to the Java equivalent. gcc/ada/ChangeLog: * atree.adb (Parent_Or_List_Containing): New function. * atree.ads (Parent_Or_List_Containing): Likewise. * gen_i

C++ patch ping

2025-01-07 Thread Jakub Jelinek
Hi! I'd like to ping 10 C++ patches: https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672040.html P1 - Fix ICEs with large initializer lists or ones including #embed [PR118124] https://gcc.gnu.org/pipermail/gcc-patches/2024-December/672041.html P1 - Fix up maybe_init_list_as_array for

[COMMITTED 05/31] ada: Put_Image spec incorrectly ignored for Fixed_Point_Type'Base'Image call.

2025-01-07 Thread Marc Poulhiès
From: Steve Baird If a Put_Image aspect specification (introduced in Ada 2022) is given for a fixed point type Fx, then in some cases a call to Fx'Base'Image would incorrectly ignore the aspect specification and would instead return the pre-Ada2022 version of the image. However, a call to Fx'Imag

[COMMITTED 19/31] ada: Improved checking of uses of package renamings

2025-01-07 Thread Marc Poulhiès
From: Steve Baird In some cases, the RM 8.5.1(3.1) legality rule about uses of renamings of limited views of packages was implemented incorrectly, resulting in rejecting legal uses. gcc/ada/ChangeLog: * gen_il-fields.ads: add new Renames_Limited_View field. * gen_il-gen-gen_enti

Re: C++ patch ping

2025-01-07 Thread Jakub Jelinek
On Tue, Jan 07, 2025 at 02:07:58PM +0100, Jakub Jelinek wrote: > Stage1: > > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662379.html > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662380.html > https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662381.html > https://

[COMMITTED 24/31] ada: Fix constants overlayed by variables

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup suggested by GNATcheck rule Constant_Overlays. gcc/ada/ChangeLog: * repinfo-input.adb (Decode_Name, Read_Name_With_Prefix): Use constant overlay with pragma Import. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/repinfo-input

[COMMITTED 23/31] ada: Improve protection against wrong use from GDB

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek A code cleanup in routine intended to be used from DGB, suggested by running GNATcheck rule Boolean_Negations. However, this code can be tuned to protect against more illegal uses. gcc/ada/ChangeLog: * exp_disp.adb (Write_DT): Add guards that prevent crashes on ille

Re: Mark const parameters passed by invisible reference as readonly in the function body

2025-01-07 Thread Richard Biener
On Tue, 10 Dec 2024, Jan Hubicka wrote: > Hi, > int: > struct foo > { > int a; > void bar() const; > ~foo() > { > if (a != 42) > __builtin_abort (); > } > }; > __attribute__ ((noinline)) > void test(const struct foo a) > { > int b = a.a; > a.bar(); > if

[PATCH] middle-end/118325 - nonlocal goto lowering

2025-01-07 Thread Richard Biener
When nonlocal goto lowering creates an artificial label it fails to adjust its context. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress (I doubt good test coverage is present for non-local gotos) OK when testing succeeds? Thanks, Richard. PR middle-end/118325 * tre

[COMMITTED 04/31] ada: Error on instantiation with defaulted formal type referencing other formal type

2025-01-07 Thread Marc Poulhiès
From: Gary Dismukes The compiler wasn't accounting for default subtypes on generic formal types that reference other formal types of the same generic, leading to errors about invalid subtypes. Several other problems that could lead to blowups or incorrect errors were noticed through testing relat

[COMMITTED 25/31] ada: Cleanup preanalysis of static expressions (part 2)

2025-01-07 Thread Marc Poulhiès
From: Javier Miranda According to RM 13.14(8/4), a static expression in an aspect specification does not cause freezing; however, the frontend performs many calls to Preanalyze_Spec_Expression made during the analysis of aspects. This patch, suggested by Eric Botcazou, takes care of this addition

Re: [PATCH] RISC-V: Add missing dg-runtest to run the testcase under gcc.target/riscv/rvv/

2025-01-07 Thread Jeff Law
On 1/2/25 10:46 PM, Tsung Chun Lin wrote: From c05d80e696b226444af26a981d78875a5767bf82 Mon Sep 17 00:00:00 2001 From: Jim Tsung-Chun Lin Date: Fri, 3 Jan 2025 13:27:40 +0800 Subject: [PATCH] RISC-V: Add missing dg-runtest to run the testcase under gcc.target/riscv/rvv/ gcc/testsuite/Chang

[PATCH] Fixup convert-dfp*.c

2025-01-07 Thread Richard Biener
The testcases use -save-temps which doesn't play nice with -flto and multilib testing resulting in spurious UNRESOLVED like /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: i386:x86-64 architecture of input file `./convert-dfp-2.ltrans0.ltrans.o' is incompatible with i38

RE: [PATCH] COBOL 3/8 gen: GENERIC interface

2025-01-07 Thread Richard Kenner
> Or maybe write a blog post about how to do a new > GCC frontend (there are multiple such for backends). But I know time > is scarce. I made a set of slides a few decades ago on doing that. It's somewhat, but not fully, out of date and I don't know how to find them, but it does exist somewhere.

[PATCH] arm: [MVE intrinsics] Fix tuples field name (PR 118332)

2025-01-07 Thread Christophe Lyon
A recent commit mistakenly changed the field name for tuples from 'val' to '__val', but unlike SVE this name is mandated by ACLE. The patch simply switches back the name to 'val'. PR target/118332 gcc/ChangeLog: * config/arm/arm-mve-builtins.cc (wrap_type_in_struct): Use 'val'

[COMMITTED 03/31] ada: Use the syntax of Ada 2012 if-expression in -gnatR3 output

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou This uses the syntax of Ada 2012 if-expression in the output produced by the -gnatR3 switch for dynamic expressions. gcc/ada/ChangeLog: * repinfo.adb (List_GCC_Expression.Print_Expr) : Do not output the final "end". Tested on x86_64-pc-linux-gnu, committed o

[COMMITTED 12/31] ada: Add guard to System.Val_Real.Large_Powfive against pathological input

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou There is no need to keep multiplying the result once it saturates to +Inf. gcc/ada/ChangeLog: * libgnat/s-powflt.ads (Maxpow_Exact): Minor comment fix. * libgnat/s-powlfl.ads (Maxpow_Exact): Likewise. * libgnat/s-powllf.ads (Maxpow_Exact): Likewise.

[COMMITTED 13/31] ada: Fix internal error on container aggregate for bounded vectors

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou The problem is that we analyze references to an object before the actual subtype of the object is established, thus creating a type mismatch that is flagged by the code generator. gcc/ada/ChangeLog: * exp_ch7.ads (Store_After_Actions_In_Scope_Without_Analysis): New

[COMMITTED 07/31] ada: Move checks for consequences of Exceptional_Cases to GNAT

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Previously checks for consequence expressions of Exceptional_Cases aspects were done in GNATprove backend. However, we can do them in the frontend, where they will apply to all subprograms, regardless of the SPARK_Mode aspect. gcc/ada/ChangeLog: * sem_prag.adb (Anal

[COMMITTED 11/31] ada: Drop vxworks-smp-ppc-link.spec

2025-01-07 Thread Marc Poulhiès
From: Alexandre Oliva Adding -msmp to linker options in system-vxworks-ppc-rtp-smp.ads obviated vxworks-smp-ppc-link.spec. Drop it. gcc/ada/ChangeLog: * libgnat/system-vxworks-ppc-rtp-smp.ads: Drop --specs=vxworks-ppc-link.spec from Linker_Options. * vxworks-smp-ppc-lin

[COMMITTED 28/31] ada: Do not create temporaries for initialization statements

2025-01-07 Thread Marc Poulhiès
From: Eric Botcazou Assignment statements marked with the No_Ctrl_Actions or No_Finalize_Actions flag are initialization statements and, therefore, no temporaries are needed to hold the value of the right-hand side for them. gcc/ada/ChangeLog: * gcc-interface/trans.cc (Call_to_gnu): Alw

[COMMITTED 27/31] ada: Remove unused AST flag Address_Warning_Posted

2025-01-07 Thread Marc Poulhiès
From: Piotr Trojanek Flag Address_Warning_Posted was only read and never written, so it can be safely removed. gcc/ada/ChangeLog: * gen_il-fields.ads (Opt_Field_Enum): Remove flag. * gen_il-gen-gen_nodes.adb (N_Attribute_Definition_Clause): Remove field. * sem_ch

[COMMITTED 30/31] ada: Adjust pragma obsolescent message

2025-01-07 Thread Marc Poulhiès
Do not mention an explicit version. gcc/ada/ChangeLog: * libgnat/a-calcon.ads: Adjust. * libgnat/a-calend.ads: Adjust. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-calcon.ads | 16 gcc/ada/libgnat/a-calend.ads | 14 ++ 2

[PATCH v2] LoongArch: Opitmize the cost of vec_construct.

2025-01-07 Thread chenxiaolong
When analyzing 525 on LoongArch architecture, it was found that the for loop of hotspot function x264_pixel_satd_8x4 could not be quantized 256-bit due to the cost of vec_construct setting. After re-adjusting vec_construct, the performance of 525 program was improved by 16.57%. It was found that

[PATCH] rtl-optimization/118298 - constant iteration loops and #pragma unroll

2025-01-07 Thread Richard Biener
When the RTL unroller handles constant iteration loops it bails out prematurely when heuristics wouldn't apply any unrolling before checking #pragma unroll. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR rtl-optimization/118298 * loop-unroll.cc (decide_unroll_cons

Re: [PATCH 0/3] testsuite: RISC-V: Improve support for RV32E

2025-01-07 Thread Palmer Dabbelt
On Mon, 09 Dec 2024 08:13:22 PST (-0800), dimi...@dinux.eu wrote: Many test cases implicitly require some form of I ABI variant for RISC-V to be the default. Hence they fail when ILP32E is configured as the default ABI for the toolchain. Example error: spawn ... -march=rv32gc_zbb ...

[PATCH] c++: ICE with MODIFY_EXPR in constexpr [PR118169]

2025-01-07 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Here, cxx_eval_outermost_expression gets a sequence of initialization statements: D.2912.t = TARGET_EXPR <...>; TARGET_EXPR ; D.2922 = 0; the last of which wasn't converted to void and so we, since r15-6369, do not take

Re: [Ada] Fix PR ada/118247

2025-01-07 Thread Maciej W. Rozycki
On Mon, 6 Jan 2025, Eric Botcazou wrote: > This is a regression introduced by > https://gcc.gnu.org/pipermail/gcc-cvs/2024-July/405522.html > in the form of a spurious relinking of the gnatbind executable for the > install > target of cross Ada compilers. The fix feels hackish and I wonder h

Re: [PATCH] riscv: add mising masking in lrsc expander (PR118137)

2025-01-07 Thread Patrick O'Neill
On 1/7/25 07:37, Andreas Schwab wrote: gcc: PR target/118137 * config/riscv/sync.md ("lrsc_atomic_exchange"): Apply mask to shifted value. gcc/testsuite: PR target/118137 * gcc.dg/atomic/pr118137.c: New. --- Thanks for fixing this - I can't give approva

[PATCH] docs: Document new hardreg PRE pass.

2025-01-07 Thread Andrew Carlotti
I forgot to include this in the earlier patch; is this ok for master (once the pass is merged, of course)? gcc/ChangeLog: * doc/passes.texi: Document hardreg PRE pass. diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi index 639f6b325c8be47bffd64269340c4dd8ea0f321c..5c2a174a7495404

Re: [Ada] Fix PR ada/118247

2025-01-07 Thread Eric Botcazou
> The fix feels hackish and I wonder how other frontends handle this, but > overall thank you for taking care of this peculiarity. You're welcome. The main Makefile does the same for xgcc -> gcc-cross and, as this example shows, every change is this area is almost guaranteed to break something,

Re: [PATCH] docs: Document new hardreg PRE pass.

2025-01-07 Thread Jeff Law
On 1/7/25 11:17 AM, Richard Sandiford wrote: Andrew Carlotti writes: I forgot to include this in the earlier patch; is this ok for master (once the pass is merged, of course)? gcc/ChangeLog: * doc/passes.texi: Document hardreg PRE pass. diff --git a/gcc/doc/passes.texi b/gcc/doc/

Re: [PATCH] testsuite: enable effective-target sync_char_short on RISC-V

2025-01-07 Thread Jeff Law
On 1/7/25 8:35 AM, Andreas Schwab wrote: * lib/target-supports.exp (check_effective_target_sync_char_short): Enable for riscv*-*-*. I went ahead and pushed this as well. Thanks again, jeff

Re: [patch, doc, Fortran] Further documentation of UNSIGNED

2025-01-07 Thread Steve Kargl
On Tue, Jan 07, 2025 at 03:28:31PM +0100, Thomas Koenig wrote: > Hello world, > > the attached patch does what it says in the ChangeLog entry. > > Tested with "make dvi" and "make pdf". > > OK for trunk? > OK. -- Steve

[PATCH] aarch64: Fix overly restrictive sibcall check [PR107102]

2025-01-07 Thread Richard Sandiford
aarch64_function_ok_for_sibcall required the caller and callee to use the same PCS variant. However, it should be enough for the callee to preserve at least as much register state as the caller; preserving more state is fine. ARM_PCS_AAPCS64, ARM_PCS_SIMD, and ARM_PCS_SVE agree on what GPRs shoul

RE: [PATCH]AArch64: Fix costing of emulated gathers/scatters [PR118188]

2025-01-07 Thread Tamar Christina
> >> i.e. we use separate address arithmetic and avoid UMOVs. Counting > >> two loads and one store for each element of the scatter store seems > >> like overkill for that. > > > > Hmm agreed.. > > > > How about for stores we increase the load counts by count / 2? > > > > This would account for th

Re: [PATCH] docs: Document new hardreg PRE pass.

2025-01-07 Thread Richard Sandiford
Andrew Carlotti writes: > I forgot to include this in the earlier patch; is this ok for master (once the > pass is merged, of course)? > > gcc/ChangeLog: > > * doc/passes.texi: Document hardreg PRE pass. > > > diff --git a/gcc/doc/passes.texi b/gcc/doc/passes.texi > index > 639f6b325c8be47b

[PATCH] c++: Fix up ICEs on constexpr inline asm strings in templates [PR118277]

2025-01-07 Thread Jakub Jelinek
Hi! The following patch fixes ICEs when the new inline asm syntax to use C++26 static_assert-like constant expressions in place of string literals is used in templates. As finish_asm_stmt doesn't do any checking for processing_template_decl, this patch also just defers handling those strings in te

Re: [PATCH 10/10] aarch64: Try to avoid passing new flags to assembler

2025-01-07 Thread Richard Sandiford
Andrew Carlotti writes: > On Mon, Nov 25, 2024 at 11:26:39PM +, Richard Sandiford wrote: >> Sorry for the slow review. >> >> Andrew Carlotti writes: >> > These new flags (+fcma, +jscvt, +rcpc2, +jscvt, +frintts, +wfxt and +xs) >> > were only recently added to the assembler. To improve compa

Re: [PATCH] Prefer scalar_int_mode if the size - 1 is equal to UNITS_PER_WORD.

2025-01-07 Thread Richard Sandiford
Jeff Law writes: > On 1/7/25 2:09 AM, Tsung Chun Lin wrote: >> Hi, >> >> Could someone help merge this patch if there are no further concerns? > It'll get addressed. Many contributors have been on holiday and are > still catching up. FWIW, I'm happy to push the patch, but wasn't sure how to ch

[PATCH] Prefer scalar_int_mode if the size - 1 is equal to UNITS_PER_WORD.

2025-01-07 Thread Patrick O'Neill
From: Jim Tsung-Chun Lin Re-sending this via git send-email to avoid the application/octet-stream attachement type that prevents Patchworks/CI from finding the patch. --- Don't use the QI vector if its size is equal to UNITS_PER_WORD for better code generation. Before patch: vsetivliz

Re: [PATCH] testsuite: enable effective-target sync_char_short on RISC-V

2025-01-07 Thread Jeff Law
On 1/7/25 8:35 AM, Andreas Schwab wrote: * lib/target-supports.exp (check_effective_target_sync_char_short): Enable for riscv*-*-*. OK jeff

Re: [PATCH] c/c++: UX improvements to 'too {few, many} arguments' errors [PR118112]

2025-01-07 Thread Marek Polacek
On Thu, Dec 19, 2024 at 06:40:19PM -0500, David Malcolm wrote: > Consider this case of a bad call to a callback function (perhaps > due to C23 changing the meaning of () in function decls): > > struct p { > int (*bar)(); > }; > > void baz() { > struct p q; > q.bar(1); > } > > Bef

Re: [PATCH 0/3] testsuite: RISC-V: Improve support for RV32E

2025-01-07 Thread Dimitar Dimitrov
On Tue, Jan 07, 2025 at 07:55:45AM -0800, Palmer Dabbelt wrote: > On Mon, 09 Dec 2024 08:13:22 PST (-0800), dimi...@dinux.eu wrote: > > Many test cases implicitly require some form of I ABI variant for > > RISC-V to be the default. Hence they fail when ILP32E is configured as > > the default ABI f

[PATCH] testsuite: arm: Add pattern for armv8-m.base to cmse-15.c test

2025-01-07 Thread Torbjörn SVENSSON
Ok for trunk and releases/gcc-14? -- Since armv8-m.base uses thumb1 that does not suport sigcall/tailcall, a pattern is needed that uses PUSH/BL/POP sequence instead of a single B instruction to reuse an already existing function in the compile unit. gcc/testsuite/ChangeLog: * gcc.targe

[COMMITTED] RISC-V: vector absolute difference expander [PR117722]

2025-01-07 Thread Vineet Gupta
This improves codegen for x264 sum of absolute difference routines. The insn count is same, but we avoid double widening ops and ensuing whole register moves. Also for more general applicability, we chose to implement abs diff vs. the sum of abs diff variant. Suggested-by: Robin Dapp Co-authored

Re: [PATCH] config-ml.in: Fix multi-os-dir search

2025-01-07 Thread Jeff Law
On 1/1/25 6:42 PM, YunQiang Su wrote: Matthias Klose 于2025年1月1日周三 22:37写道: in https://gcc.gnu.org/pipermail/gcc-patches/2024-January/641619.html there are two typos in the patch, compared to the local Debian patch, Oh, sorry it is not duplicated. - the subst macro has an additional

[committed] Fix regression in ft32 port after recent switch table adjustments

2025-01-07 Thread Jeff Law
This is a trivial bug that showed up after Mark W's recent patch to not apply the size limit on jump tables. The ft32 port has limited immediate ranges on comparisons and the casesi expander didn't honor those. It'd blindly pass along an out of range constant. This patch adds the trivial ad

[PATCH] dwarf2out: Emit DWARF 6 DW_AT_language_{name,version}

2025-01-07 Thread Jakub Jelinek
Hi! DWARF has voted in yesterday https://dwarfstd.org/issues/241209.1.html , which is basically just a guarantee that the DWARF 6 draft DW_AT_language_{name,version} attribute codes and content of https://dwarfstd.org/languages-v6.html can be used as an extension in DWARF 5 and won't be changed.

Re: [PATCH] riscv: add mising masking in lrsc expander (PR118137)

2025-01-07 Thread Jeff Law
On 1/7/25 8:37 AM, Andreas Schwab wrote: gcc: PR target/118137 * config/riscv/sync.md ("lrsc_atomic_exchange"): Apply mask to shifted value. gcc/testsuite: PR target/118137 * gcc.dg/atomic/pr118137.c: New. Thanks. I went ahead and pushed this to the t

Re: [PATCH v2 1/4] testsuite: RISC-V: Add effective target for E ABI variant

2025-01-07 Thread Dimitar Dimitrov
On Mon, Jan 06, 2025 at 07:52:23AM -0700, Jeff Law wrote: > > > On 1/4/25 11:01 AM, Dimitar Dimitrov wrote: > > Add new effective target check for either ILP32E or ILP64E ABI variants. > > > > Initial implementation only checks for RV32E or RV64E ISA, which in turn > > implies that ILP32E/ILP64E

Re: [PATCH] Prefer scalar_int_mode if the size - 1 is equal to UNITS_PER_WORD.

2025-01-07 Thread Patrick O'Neill
On 1/7/25 10:18, Richard Sandiford wrote: Jeff Law writes: On 1/7/25 2:09 AM, Tsung Chun Lin wrote: Hi, Could someone help merge this patch if there are no further concerns? It'll get addressed. Many contributors have been on holiday and are still catching up. FWIW, I'm happy to push the

  1   2   >