Re: [PATCH v5 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
On Tue, Sep 16, 2025 at 08:53:04AM +0200, Alejandro Colomar wrote: > Warn about this: > > void f(int x; int x; int x); > > Add a new diagnostic, -Wmultiple-parameter-fwd-decl-lists, which > diagnoses uses of this obsolescent syntax. > > Add this diagnostic in -Wextra. > > Forward declarat

[PATCH v5 0/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, I've fixed the documentation (compared to what I suggested on the list, I've removed the obsolescence mention, and I've s/separated/terminated/ which I think is more accurate about the semicolon in lists of parameter forward declarations). I've also added extend.texi to the ChangeLog,

[PATCH v5 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Warn about this: void f(int x; int x; int x); Add a new diagnostic, -Wmultiple-parameter-fwd-decl-lists, which diagnoses uses of this obsolescent syntax. Add this diagnostic in -Wextra. Forward declarations of parameters are very rarely used. And functions that need two forward declara

RE: [PATCH] i386/testsuite: Correct res_ref2 array size for avx512bw-vpmov{,us}wb-2.c

2025-09-15 Thread Liu, Hongtao
> -Original Message- > From: Jiang, Haochen > Sent: Tuesday, September 16, 2025 2:47 PM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com > Subject: [PATCH] i386/testsuite: Correct res_ref2 array size for avx512bw- > vpmov{,us}wb-2.c > > Both of the tests under 128 b

[PATCH] i386/testsuite: Correct res_ref2 array size for avx512bw-vpmov{, us}wb-2.c

2025-09-15 Thread Haochen Jiang
Both of the tests under 128 bit are raising: warning: writing 16 bytes into a region of size 8 [-Wstringop-overflow=] when compiling, leading to a test fail. The warning is caused by the incorrect array size for res_ref2. The wrong size caused the overflow. Correct them in this patch to fix the

Re: [PATCH v2] vect: Remove type from misalignment hook.

2025-09-15 Thread Richard Biener
On Mon, Sep 15, 2025 at 8:51 PM Robin Dapp wrote: > > Hi, > > This patch removes the type argument from the vector_misalignment hook. > Ever since we switched from element to byte misalignment its > semantics haven't been particularly clear and nowadays it should be > redundant. > > Also, in case

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 08:53:37PM +, Joseph Myers wrote: > On Mon, 15 Sep 2025, Alejandro Colomar wrote: > > > +You can write any number of such parameter forward declaration lists, > > +but using more than one is obsolete and unnecessary. > > I'm dubious of declaring it

Re: [PATCH v2 6/7] riscv: Add RISC-V Kernel Control Flow Integrity implementation

2025-09-15 Thread Kees Cook
On Mon, Sep 15, 2025 at 09:40:53PM -0600, Jeff Law wrote: > > > On 9/4/25 18:24, Kees Cook wrote: > > Implement RISC-V-specific KCFI backend. > > > > - Function preamble generation using .word directives for type ID storage > >at offset from function entry point (no alignment NOPs needed due

[PATCH] Remove SPR/GNR/DMR from avx512_{move,store}_by pieces tune.

2025-09-15 Thread liuhongt
From: "hongtao.liu" Align move_max with prefer_vector_width for SPR/GNR/DMR to avoid STLF issue. It's similar as previous commit. commit 6ea25c041964bf63014fcf7bb68fb1f5a0a4e123 Author: liuhongt Date: Thu Aug 15 12:54:07 2024 +0800 Align ix86_{move_max,store_max} with vectorizer. Wh

Re: [PATCH] rs6000: Update scalar cost of {TRUNC,FLOOR}_MOD_EXPR[PR121700]

2025-09-15 Thread Avinash Jayakar
Hi Surya, Apologies for the late response. This patch has been bootstrapped and regtested for powerpc64le with no new failures. Thanks and regards, Avinash Jayakar On Mon, 2025-09-15 at 22:22 +0530, Surya Kumari Jangala wrote: > Hi Avinash, > Patches should be posted for review only *after* re

[COMMITTED 09/27] ada: Implement Super aspect and improve implementation of related features.

2025-09-15 Thread Marc Poulhiès
From: Steve Baird Implement the GNAT-defined Super aspect (which should not be confused with with the Super attribute). For a two-part constructor procedure declaration, an Initialize aspect specification is permitted on the subprogram body, and not on the subprogram specification (this reverses

Re: [PATCH 0/2] [aarch64] sme/nonlocal_goto_* tests fail remat with PIE

2025-09-15 Thread Andrew Pinski
On Mon, Sep 15, 2025 at 3:59 PM Alexandre Oliva wrote: > > On Sep 13, 2025, Alexandre Oliva wrote: > > > gcc.target/aarch64/sme/nonlocal_goto_[123].c fail on aarch64 targets > > configured with --enable-default-pie. > > FTR, Martin's commit afa74d37e8170d696f97424da7ab0f71883aac70 regressed > non

Re: [PATCH v2 6/7] riscv: Add RISC-V Kernel Control Flow Integrity implementation

2025-09-15 Thread Jeff Law
On 9/4/25 18:24, Kees Cook wrote: Implement RISC-V-specific KCFI backend. - Function preamble generation using .word directives for type ID storage at offset from function entry point (no alignment NOPs needed due to fix 4-byte instruction size). - Scratch register allocation using t1/

[PATCH] forwprop: Add a simple DSE after a clobber

2025-09-15 Thread Andrew Pinski
After copy propagation for aggregates patches we might end up with now: ``` tmp = a; b = a; // was b = tmp; tmp = {CLOBBER}; ``` To help out ESRA, it would be a good idea to remove the `tmp = a` statement as there is no DSE between frowprop and ESRA. copy-prop-aggregate-sra-1.c is an example where

[PING^1] [PATCH v5] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-09-15 Thread jeevitha
Ping! please review. Thanks & Regards Jeevitha On 26/08/25 8:56 pm, jeevitha wrote: > Hi All, > > The following patch has been bootstrapped and regtested on powerpc64le-linux. > > Changes from V4: > * Refined AMO tests with proper variable names. > * Added tests for missed checks. > * Reword

[PATCH v2 5/5] libstdc++: Implement std::layout_left_padded.

2025-09-15 Thread Luc Grosheintz
This commit adds a new layout layout_left_padded as standardized in N5014 but with one deviation. It includes checking of all mandates and prerequisites. It adds a purely internal feature testing macro padded_layouts and registers layout_left_padded in the std module. The standard mandates that th

[PATCH] expr, tree: Ensure get_range_pos_neg is called only on scalar integral types [PR121904]

2025-09-15 Thread Jakub Jelinek
Hi! The gcc.c-torture/compile/20111209-1.c testcase which uses typedef char* char_ptr32 __attribute__ ((mode(SI))); ICEs on s390x since my change to optimize extensions by cheaper of signed or unsigned extension if sign bit is known from VRP not to be set. The problem is that get_range_pos_neg us

Re: [PATCH] RISC-V: Imply zicsr for sdtrig and ssstrict extensions.

2025-09-15 Thread Jeff Law
On 9/12/25 20:17, Dongyan Chen wrote: This patch implies zicsr for sdtrig and ssstrict extensions. According to the riscv-privileged spec, the sdtrig and ssstrict extensions are privileged extensions, so they should imply zicsr. gcc/ChangeLog: * config/riscv/riscv-ext.def: Imply zics

[PATCH v2 0/2] Support unsigned scalar SAT_MUL form 5

2025-09-15 Thread pan2 . li
From: Pan Li This patch would like to try to match the the unsigned SAT_MUL form 5, aka below: #define DEF_SAT_U_MUL_FMT_5(NT, WT) \ NT __attribute__((noinline))\ sat_u_mul_##NT##_from_##WT##_fmt_5 (NT a, NT b) \ {

[PATCH v2 1/2] Match: Add form 5 of unsigned SAT_MUL for widen-mul

2025-09-15 Thread pan2 . li
From: Pan Li This patch would like to try to match the the unsigned SAT_MUL form 4, aka below: #define DEF_SAT_U_MUL_FMT_5(NT, WT) \ NT __attribute__((noinline))\ sat_u_mul_##NT##_from_##WT##_fmt_5 (NT a, NT b) \ {

[COMMITTED 26/27] ada: Remove dependence on secondary stack for type with controlled component

2025-09-15 Thread Marc Poulhiès
From: Gary Dismukes There are cases where GNAT introduces a dependence on the secondary stack in a build-in-place function with a result subtype that is definite, when this dependence could be avoided. In particular this is done for record types that requires finalization due to having a control

Re: [PATCH v2 2/2] RISC-V: Allow profiles input in '--with-arch' option.

2025-09-15 Thread Jeff Law
On 9/8/25 05:27, Jiawei wrote: Allows profiles input in '--with-arch'. Check profiles with 'riscv-profiles.def'. gcc/ChangeLog: * config.gcc: Accept RISC-V profiles in `--with-arch`. * config/riscv/arch-canonicalize: Add profile detection and skip canonicalization for

Re: [PATCH v2 1/2] RISC-V: Configure Profiles definitions in the definition file.

2025-09-15 Thread Jeff Law
On 9/11/25 01:32, Kito Cheng wrote: LGTM, I want to do that for a while but I have not found enough time yet, thanks :) On Mon, Sep 8, 2025 at 7:27 PM Jiawei wrote: Moving RISC-V Profiles definations into 'riscv-profiles.def'. Add comments for 'riscv_profiles'. gcc/ChangeLog: *

[PATCH v2 2/2] RISC-V: Add test case of unsigned scalar SAT_MUL form 5 for widen-mul

2025-09-15 Thread pan2 . li
From: Pan Li The form 5 of unsigned scalar SAT_MUL is covered in middle-expand alreay, add test case here to cover form 5. gcc/testsuite/ChangeLog: * gcc.target/riscv/sat/sat_arith.h: Add test helper macros. * gcc.target/riscv/sat/sat_u_mul-6-u16-from-u128.c: New test. *

Re: [PATCH v2] diagnostics: Fix mojibake from displaying UTF-8 on Windows consoles

2025-09-15 Thread LIU Hao
在 2025-9-16 00:10, David Malcolm 写道: I notice that libcpp/charset.cc defines a function convert_utf8_utf16 (albeit currently static). Is there a way that this could be reused, rather than adding a 2nd implementation? On Windows there's `MultiByteToWideChar()` which can do UTF-8-to-UTF-16 conve

Re: [PATCH] vect: Try signed and unsigned gather offsets.

2025-09-15 Thread Richard Biener
On Thu, Sep 11, 2025 at 12:03 PM Robin Dapp wrote: > > Hi, > > This patch adjusts vect_gather_scatter_fn_p to always check an offset > type with swapped signedness (vs. the original offset argument). > If the target supports the gather/scatter with the new offset type the > offset is converted to

[COMMITTED 07/27] ada: Remove the note that GNAT LLVM doesn't ship the light runtime

2025-09-15 Thread Marc Poulhiès
From: Sebastian Poeplau gcc/ada/ChangeLog: * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Remove the note on light runtimes. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_ugn/building_executable_programs_with_gnat.rst| 3 +-- 1 file chang

[PATCH] c++: Fix lambdas with variadic parameters and static specifier [PR119048]

2025-09-15 Thread Eczbek
From d70ac2b0a7b524829d22b3bb6bacbe1ef381c7fb Mon Sep 17 00:00:00 2001 From: Eczbek Date: Mon, 15 Sep 2025 19:37:20 -0400 Subject: [PATCH] c++: Fix lambdas with variadic parameters and static specifier [PR119048] PR c++/119048 gcc/cp/ChangeLog: * lambda.cc (compare_lambda_sig)

Re: [PATCH 0/2] [aarch64] sme/nonlocal_goto_* tests fail remat with PIE

2025-09-15 Thread Alexandre Oliva
On Sep 13, 2025, Alexandre Oliva wrote: > gcc.target/aarch64/sme/nonlocal_goto_[123].c fail on aarch64 targets > configured with --enable-default-pie. FTR, Martin's commit afa74d37e8170d696f97424da7ab0f71883aac70 regressed nonlocal_goto_2.c in a slightly different way, even in a standard aarch64

[PATCH] ctf: Fix struct size truncation in 32-bit hosts [PR121903, PR121411]

2025-09-15 Thread David Faust
The 'size' argument of ctf_add_sou was size_t. After the prior fixes for PR121411, this could cause the struct size to be truncated when encoding extremely large structs on a host where size_t is smaller than unsigned HOST_WIDE_INT, manifesting for example as the test failure reported in PR121903.

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Joseph Myers
On Mon, 15 Sep 2025, Alejandro Colomar wrote: > +You can write any number of such parameter forward declaration lists, > +but using more than one is obsolete and unnecessary. I'm dubious of declaring it obsolete. -- Joseph S. Myers josmy...@redhat.com

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-15 Thread Joseph Myers
On Mon, 15 Sep 2025, Alejandro Colomar wrote: > What's your opinion about 'void f(; int x);'? Is that okay? It's a new feature. A reasonable enough one, but also not one that adds any benefit for users in terms of expressivity; I'd be inclined to add it only if it gets added to the standard.

[COMMITTED 24/27] ada: Document hardening features not supported by LLVM

2025-09-15 Thread Marc Poulhiès
From: Jose Ruiz gcc/ada/ChangeLog: * doc/gnat_rm/security_hardening_features.rst: clarify that hardening options are not supported by the LLVM back end. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on m

[PATCH v2] c/c++: Treat stack protection guard as an internal symbol

2025-09-15 Thread H.J. Lu
Add a new target hook, stack_protect_guard_symbol, to support a user provided the stack protection guard: 1. Treat the stack protect guard as an internal C/C++ symbol. 2. If not nullptr, use the stack_protect_guard_symbol hook as the stack protect guard symbol. 3. Declare the stack protection guar

[PATCH] docs: Adjust -Wimplicit-fallthrough= documentation for C23

2025-09-15 Thread Jakub Jelinek
Hi! I've noticed in -Wimplicit-fallthrough= documentation we talk about [[fallthrough]]; for C++17 but don't mention that it is also standard way to suppress the warning for C23. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2025-09-15 Jakub Jelinek * doc/invok

Re: [PATCH] docs: Adjust -Wimplicit-fallthrough= documentation for C23

2025-09-15 Thread Marek Polacek
On Mon, Sep 15, 2025 at 11:05:12PM +0200, Jakub Jelinek wrote: > Hi! > > I've noticed in -Wimplicit-fallthrough= documentation we talk about > [[fallthrough]]; for C++17 but don't mention that it is also standard > way to suppress the warning for C23. > > Bootstrapped/regtested on x86_64-linux an

[COMMITTED 21/27] ada: C_Pass_By_Copy convention incorrectly ignored

2025-09-15 Thread Marc Poulhiès
From: Steve Baird In some cases involving a convention-C anonymous access-to-subprogram type with a parameter whose type has a convention of C_Pass_By_Copy, that C_Pass_By_Copy convention is incorrectly ignored. gcc/ada/ChangeLog: * freeze.adb (Freeze_Entity): In the case of an anonymou

Re: [PATCH] Fortran: fix assignment to allocatable scalar polymorphic component [PR121616]

2025-09-15 Thread Harald Anlauf
Am 15.09.25 um 22:32 schrieb Mikael Morin: Le 15/09/2025 à 21:33, Harald Anlauf a écrit : I've been wondering if there is some strategy to "differentially" debug the frontend: using a simple testcase, and replacing just a single token by another one, and see when and how the path splits and mayb

Re: [PATCH] Fortran: fix assignment to allocatable scalar polymorphic component [PR121616]

2025-09-15 Thread Mikael Morin
Le 15/09/2025 à 21:33, Harald Anlauf a écrit : Am 15.09.25 um 19:21 schrieb Jerry D: On 9/15/25 1:56 AM, Mikael Morin wrote: Le 14/09/2025 à 21:17, Harald Anlauf a écrit : Am 13.09.25 um 22:54 schrieb Mikael Morin: Le 12/09/2025 à 22:51, Harald Anlauf a écrit : Well, the patch changes gfc_va

Re: [PATCH] Fortran: fix assignment to allocatable scalar polymorphic component [PR121616]

2025-09-15 Thread Mikael Morin
Le 15/09/2025 à 19:21, Jerry D a écrit : On 9/15/25 1:56 AM, Mikael Morin wrote: Le 14/09/2025 à 21:17, Harald Anlauf a écrit : Am 13.09.25 um 22:54 schrieb Mikael Morin: Le 12/09/2025 à 22:51, Harald Anlauf a écrit : Am 12.09.25 um 11:12 schrieb Mikael Morin: Le 11/09/2025 à 22:46, Harald A

Re: [PATCH v1 1/4] RISC-V: Combine vec_duplicate + vwaddu.vv to vwaddu.vx on GR2VR cost

2025-09-15 Thread Robin Dapp
>> Where does the actual HI->SI extension happen then? No chance we see it >> during combine/late-combine? > > There is no HI->SI extension from the 272.expand and combine dump, so there > is no change in RTL or > It is unsafe here. I think we need additional fix to make it work, may > related t

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 09:34:13PM +0200, Alejandro Colomar wrote: > Hi Joseph, > > On Mon, Sep 15, 2025 at 06:57:23PM +, Joseph Myers wrote: > > On Sat, 13 Sep 2025, Alejandro Colomar wrote: > > > > > @@ -675,7 +675,7 @@ declaration}, and it serves the purpose of making the > >

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 07:07:14PM +, Joseph Myers wrote: > On Mon, 15 Sep 2025, Alejandro Colomar wrote: > > > // Whatever, but at least should be self-consistent: > > void l(void;); // ok > > void m(void; void); // error: ‘void’ must be the only parameter and

Re: [PATCH] Preserve TREE_THIS_NOTRAP during inlining in more cases

2025-09-15 Thread Eric Botcazou
> Yes. So I read the comment in a way to say that TREE_THIS_NOTRAP does not > mean the reference is writable. In some context we check > > || tree_could_trap_p (lhs) > > /* tree_could_trap_p is a predicate for rvalues, so check > for readonly memory explicitly.

Re: [PATCH] c/c++: Treat __stack_chk_guard as an internal symbol

2025-09-15 Thread H.J. Lu
On Mon, Sep 15, 2025 at 6:04 AM Florian Weimer wrote: > > * H. J. Lu: > > >> Is it possible to enable stack protector for individual functions if > >> !flag_stack_protect? > > > > I don't think so. We only have > > > > @cindex @code{no_stack_protector} function attribute > > @item no_stack_prote

Re: [PATCH v4 1/1] c, objc: Add -Wmultiple-parameter-fwd-decl-lists

2025-09-15 Thread Alejandro Colomar
Hi Joseph, On Mon, Sep 15, 2025 at 06:57:23PM +, Joseph Myers wrote: > On Sat, 13 Sep 2025, Alejandro Colomar wrote: > > > @@ -675,7 +675,7 @@ declaration}, and it serves the purpose of making the > > name @code{len} > > known when the declaration of @code{data} is parsed. > > > > You ca

Re: [PATCH] Fortran: fix assignment to allocatable scalar polymorphic component [PR121616]

2025-09-15 Thread Harald Anlauf
Am 15.09.25 um 19:21 schrieb Jerry D: On 9/15/25 1:56 AM, Mikael Morin wrote: Le 14/09/2025 à 21:17, Harald Anlauf a écrit : Am 13.09.25 um 22:54 schrieb Mikael Morin: Le 12/09/2025 à 22:51, Harald Anlauf a écrit : Well, the patch changes gfc_variable_attr, but see also the comment I cited. 

[COMMITTED 10/27] ada: Avoid ghost context check in early freeze

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus We freeze the expression for expression functions that complete before we have set up the ghost region from both the existing spec and body. Avoid triggering the ghost context checks during the analysis for this early freeze as the expression will be reanalyzed when we analyze

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-15 Thread Joseph Myers
On Mon, 15 Sep 2025, Alejandro Colomar wrote: > // Whatever, but at least should be self-consistent: > void l(void;); // ok > void m(void; void); // error: ‘void’ must be the only parameter and > unnamed > void n(void; int n); // error: parameter ‘({anonymous})’ has

Re: [PATCH v3] preprocessor: More escapes for Makefile rules (-M option) [PR41329, PR121450]

2025-09-15 Thread Joseph Myers
On Sun, 14 Sep 2025, Joerg Boehmer wrote: > This patch adds support for more characters that are special to GNU make in > file-names. > Especially GNU make expects in rules that #, %, :, *, ? and [ characters > are preceded by a backslash to remove their special meaning. This does not address my

[PATCH v2] vect: Handle grouped accesses via gather/scatter.

2025-09-15 Thread Robin Dapp
Hi, This patch adds gather/scatter handling for grouped access. The idea is to e.g. replace an access (for uint8_t elements) like arr[0] arr[1] arr[2] arr[3] arr[0 + step] arr[1 + step] ... by a gather load of uint32_t arr[0] arr[0 + step * 1] arr[0 + step * 2] ... where the

Re: [PATCH v1 2/2] Match: Adjust the unsigned SAT_MUL pattern

2025-09-15 Thread Richard Biener
On Tue, Sep 9, 2025 at 3:31 AM wrote: > > From: Pan Li > > The widen-mul removed the unnecessary cast, thus adjust the > SAT_MUL of wide-mul to a simpler form. OK. > gcc/ChangeLog: > > * match.pd: Remove unnecessary cast of unsigned > SAT_MUL for widen-mul. > > Signed-off-by: Pa

[PATCH v2] vect: Remove type from misalignment hook.

2025-09-15 Thread Robin Dapp
Hi, This patch removes the type argument from the vector_misalignment hook. Ever since we switched from element to byte misalignment its semantics haven't been particularly clear and nowadays it should be redundant. Also, in case of gather/scatter, the patch sets misalignment to the misalignment

Re: [PATCH v2] diagnostics: Fix mojibake from displaying UTF-8 on Windows consoles

2025-09-15 Thread Jonathan Yong
On 9/15/25 6:26 PM, Peter0x44 wrote: On 2025-09-15 19:04, Jonathan Yong wrote: On 9/15/25 4:33 PM, Peter0x44 wrote: Thanks for the patch. I notice that libcpp/charset.cc defines a function convert_utf8_utf16 (albeit currently static).  Is there a way that this could be reused, rather than a

Re: [PATCH v2] diagnostics: Fix mojibake from displaying UTF-8 on Windows consoles

2025-09-15 Thread Peter0x44
On 2025-09-15 19:04, Jonathan Yong wrote: On 9/15/25 4:33 PM, Peter0x44 wrote: Thanks for the patch. I notice that libcpp/charset.cc defines a function convert_utf8_utf16 (albeit currently static).  Is there a way that this could be reused, rather than adding a 2nd implementation? From wh

Re: [PATCH] Preserve TREE_THIS_NOTRAP during inlining in more cases

2025-09-15 Thread Richard Biener
On Mon, Sep 15, 2025 at 12:05 PM Eric Botcazou wrote: > > > Yes please. Can we assert the MEM_REF offset is zero and the MEM_REF > > isn't type-punning, aka TREE_TYPE of the MEM_REF is compatible with > > the decls type, or is this not easily possible (again because of the > > placeholders)? > >

Re: [PATCH] [analyzer] another function name that returns a pointer to errno

2025-09-15 Thread David Malcolm
On Sat, 2025-09-13 at 01:42 -0300, Alexandre Oliva wrote: > > Add __get_errno_ptr() as yet another synonym for __errno_location. > > This came up while updating a port for a target that uses this > function > name in the implementation of errno.  Tested on that target, and on > x86_64-linux-gnu a

Re: [PATCH] Preserve TREE_THIS_NOTRAP during inlining in more cases

2025-09-15 Thread Richard Biener
On Mon, Sep 15, 2025 at 1:44 PM Eric Botcazou wrote: > > > Ah, I wasn't aware of that. This makes TREE_THIS_NOTRAP possibly not > > usable for tree_could_trap_p :/ One could read the docs so that it means > > when you have a read with TREE_THIS_NOTRAP then you can't infer > > from that that writ

Re: [PATCH] c/c++: Treat __stack_chk_guard as an internal symbol

2025-09-15 Thread H.J. Lu
On Mon, Sep 15, 2025 at 9:51 AM Florian Weimer wrote: > > * H. J. Lu: > > > No, it doesn't work: > > > > [hjl@gnu-zen4-1 pr121911]$ cat bar.c > > #include > > #include > > > > const size_t __stack_chk_guard = 0x2d853605a4d9a09cUL; > > > > void > > __stack_chk_fail (void) > > { > > exit (0); /*

Re: [PATCH] rs6000: Update scalar cost of {TRUNC,FLOOR}_MOD_EXPR[PR121700]

2025-09-15 Thread Surya Kumari Jangala
Hi Avinash, Patches should be posted for review only *after* regression testing. Regards, Surya On 15/09/25 5:09 pm, Avinash Jayakar wrote: > Hi, > > Below is a patch for fixing PR121700 proposed for master. Kindly review. > Regtesting on powerpc64le is still running. Will update the status soo

Re: [patch,wwwdocs,applied] Notice AVR32EB14/20/28/32 addition in v15.3.

2025-09-15 Thread Gerald Pfeifer
On Mon, 15 Sep 2025, Georg-Johann Lay wrote: > + Support for the following devices has been added in v15.3: Thanks for documenting this. Can we make the GCC reference "GCC 15.3" instead of "v15.3" which is a form we generally don't use? Happy to make that change myself; wanted to see whether th

Re: [PATCH v2] diagnostics: Fix mojibake from displaying UTF-8 on Windows consoles

2025-09-15 Thread Jonathan Yong
On 9/15/25 4:33 PM, Peter0x44 wrote: Thanks for the patch. I notice that libcpp/charset.cc defines a function convert_utf8_utf16 (albeit currently static).  Is there a way that this could be reused, rather than adding a 2nd implementation? From what I can tell, it calls libiconv, which can

[COMMITTED 02/27] ada: Disable ghost context checks before context is set

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus There are cases where we need to analyze the argument of the pragma in order to determine the ghostliness of the pragma. However during that analysis the ghost region of the pragma is not set yet so we cannot perform the ghost context checks at that moment. This patch provides

[COMMITTED 05/27] ada: Don't generate call of `System.Standard_Library.Adafinal`

2025-09-15 Thread Marc Poulhiès
From: Vadim Godunko `adafinal` is not available on targets without standard library. gcc/ada/ChangeLog: * bindgen.adb (Gen_Adafinal): Don't generate call of adafinal when use of standard library suppressed. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/bindg

[PATCH] simplify-rtx: Canonicalize subreg and lshiftrt order for AND operations

2025-09-15 Thread Kishan Parmar
Hi All, For a given rtx expression (and (lshiftrt (subreg X) shift) mask) combine pass tries to simplify the RTL form to (and (subreg (lshiftrt X shift)) mask) where the SUBREG wraps the result of the shift. This leaves the AND and the shift in different modes, which complicates recognition.

Re: [PATCH] Preserve TREE_THIS_NOTRAP during inlining in more cases

2025-09-15 Thread Eric Botcazou
> Ah, I wasn't aware of that. This makes TREE_THIS_NOTRAP possibly not > usable for tree_could_trap_p :/ One could read the docs so that it means > when you have a read with TREE_THIS_NOTRAP then you can't infer > from that that writing to it is OK though. Rather than meaning that a write > with

RE: [PATCH v1 1/2] Widening-Mul: Refine build_and_insert_cast when rhs is cast

2025-09-15 Thread Li, Pan2
Thanks Richard for comments. > && CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def)) Ack. > I think you need to verify the intermediate precision (that of 'val') > is also >= rhs_prec, otherwise we risk to lose the effect of a truncation. I see, will update it. > OK with such check added. Sur

RE: [PATCH] compare_tests: Improve non-unique tests report

2025-09-15 Thread Jiang, Haochen
> From: Jiang, Haochen > Sent: Monday, September 15, 2025 11:34 AM > > > From: Jiang, Haochen > > Sent: Monday, September 15, 2025 11:17 AM > > > > > From: Richard Earnshaw (lists) > > > Sent: Thursday, September 11, 2025 1:24 AM > > > > > > On 10/09/2025 14:06, Jeff Law wrote: > > > > > > > > >

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-09-15 Thread Alejandro Colomar
Hi Chris, Joseph, On Tue, Sep 09, 2025 at 08:56:28PM +0200, Alejandro Colomar wrote: > Hi Joseph, > > On Tue, Sep 09, 2025 at 12:04:47PM +, Joseph Myers wrote: > > On Tue, 9 Sep 2025, Alejandro Colomar wrote: > > > > > > I don't think we should support any of these. We tightened up various

[PATCH] forwprop: Handle memcpy for arguments with respect to copies

2025-09-15 Thread Andrew Pinski
This moves the code used in optimize_agr_copyprop_1 (r16-3887-g597b50abb0d) to handle this same case into its new function and use it inside optimize_agr_copyprop_arg. This allows to remove more copies that show up only in arguments. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog:

[PATCH] libstdc++: Fix more missing uses of iter_difference_t [PR119820]

2025-09-15 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: PR libstdc++/119820 * include/bits/ranges_algo.h (__shuffle_fn): Use ranges::distance to get difference type value to add to iterator. * include/std/format (__formatter_str::_M_format_range): Use ranges::next to increment iter

Re: [PATCH] Fortran: fix assignment to allocatable scalar polymorphic component [PR121616]

2025-09-15 Thread Jerry D
On 9/15/25 1:56 AM, Mikael Morin wrote: Le 14/09/2025 à 21:17, Harald Anlauf a écrit : Am 13.09.25 um 22:54 schrieb Mikael Morin: Le 12/09/2025 à 22:51, Harald Anlauf a écrit : Am 12.09.25 um 11:12 schrieb Mikael Morin: Le 11/09/2025 à 22:46, Harald Anlauf a écrit : Am 11.09.25 um 22:27 schr

Re: [PATCH] libstdc++: Fix more missing uses of iter_difference_t [PR119820]

2025-09-15 Thread Patrick Palka
On Mon, 15 Sep 2025, Jonathan Wakely wrote: > libstdc++-v3/ChangeLog: > > PR libstdc++/119820 > * include/bits/ranges_algo.h (__shuffle_fn): Use > ranges::distance to get difference type value to add to > iterator. > * include/std/format (__formatter_str::_M_format_r

Re: [PATCH] Fix SRA issue with -ftrivial-auto-var-init= [PR121894]

2025-09-15 Thread Qing Zhao
> On Sep 12, 2025, at 15:08, Qing Zhao wrote: > > In tree-sra.cc, for the following stmt (initialization in source code): > s = {}; > > for the above lhs "s", the field "grp_assignment_write" of the created > struct access is 1; > > however, for the following stmt (compiler added initializat

Re: [PATCH] c/c++: Treat __stack_chk_guard as an internal symbol

2025-09-15 Thread Florian Weimer
* H. J. Lu: > No, it doesn't work: > > [hjl@gnu-zen4-1 pr121911]$ cat bar.c > #include > #include > > const size_t __stack_chk_guard = 0x2d853605a4d9a09cUL; > > void > __stack_chk_fail (void) > { > exit (0); /* pass */ > } > > __attribute__ ((noipa, optimize ("stack-protector-all"))) > void >

Re: [PATCH 1/8] builtin: Add builtin types and function declarations for integer atomic fetch min/max

2025-09-15 Thread Matthew Malcomson
On 9/5/25 10:41, Jakub Jelinek wrote: External email: Use caution opening links or attachments On Fri, Sep 05, 2025 at 10:30:49AM +0100, Matthew Malcomson wrote: Ok -- TBH I don't have any extra details on this argument right now and your point on it's feasibility seems quite convincing. (T

Re: [PATCH] D: disable collect fork on Darwin

2025-09-15 Thread Iain Buclaw
Excerpts from Iain Buclaw's message of September 5, 2025 6:45 pm: > Excerpts from Iain Sandoe's message of September 3, 2025 9:59 pm: >> >> >>> On 3 Sep 2025, at 20:54, Iain Buclaw wrote: >>> >>> Excerpts from Iain Buclaw's message of September 3, 2025 9:19 pm: Excerpts from Rainer Orth's

Re: [PATCH v5 9/11] openmp: Add support for using custom mappers with iterators (C, C++)

2025-09-15 Thread Tobias Burnus
Kwok Cheung Yeung wrote: This patch adds support for custom mappers with iterators (C and C++ only, as the Fortran custom mapper support has not been committed yet, nor has support for nested mappers). It works by propagating clause iterators onto new clauses generated by mappers. As this oc

Re: [PATCH v2] diagnostics: Fix mojibake from displaying UTF-8 on Windows consoles

2025-09-15 Thread David Malcolm
On Fri, 2025-09-12 at 16:45 +0100, Peter Damianov wrote: > UTF-8 characters in diagnostic output (such as the warning emoji ⚠️ > used by fanalyzer) display as mojibake on Windows unless the utf8 > code page is being used > > This patch adds UTF-8 to UTF-16 conversion when outputting to a > console

Re: [PATCH][PR121602] aarch64: Force vector when folding svmul with all-ones op1.

2025-09-15 Thread Jennifer Schmitz
> On 1 Sep 2025, at 15:46, Tamar Christina wrote: > > External email: Use caution opening links or attachments > > >> -Original Message- >> From: Jennifer Schmitz >> Sent: Friday, August 29, 2025 1:17 PM >> To: GCC Patches >> Cc: Alex Coplan ; Kyrylo Tkachov >> ; Tamar Christina ;

Re: [PATCH] c/c++: Treat __stack_chk_guard as an internal symbol

2025-09-15 Thread Florian Weimer
* H. J. Lu: >> Is it possible to enable stack protector for individual functions if >> !flag_stack_protect? > > I don't think so. We only have > > @cindex @code{no_stack_protector} function attribute > @item no_stack_protector > This attribute prevents stack protection code for the function. > >

[COMMITTED 15/27] ada: Fix the condition of ghost level dependencies inside assignments

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus The assignee should depend on the level of all of the ghost entiies with the assignment. gcc/ada/ChangeLog: * ghost.adb (Check_Assignee_Levels): Fix the condition and improve error message handling. Tested on x86_64-pc-linux-gnu, committed on master. --- gc

[PATCH v2] simplify-rtx: Canonicalize subreg and lshiftrt order for AND operations

2025-09-15 Thread Kishan Parmar
Hi All, Changes from v1: * Corrected commit message. For a given rtx expression (and (lshiftrt (subreg X) shift) mask) combine pass tries to simplify the RTL form to (and (subreg (lshiftrt X shift)) mask) where the SUBREG wraps the result of the shift. This leaves the AND and the sh

RE: [PATCH][PR121602] aarch64: Force vector when folding svmul with all-ones op1.

2025-09-15 Thread Tamar Christina
> -Original Message- > From: Jennifer Schmitz > Sent: Monday, September 15, 2025 4:23 PM > To: Tamar Christina > Cc: GCC Patches ; Alex Coplan > ; Kyrylo Tkachov ; Richard > Earnshaw ; Andrew Pinski > Subject: Re: [PATCH][PR121602] aarch64: Force vector when folding svmul with > all-ones

[COMMITTED 16/27] ada: Refactor ghost argument consistency checks

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus Create a new method for checking and emitting errors on pragmas Unused, Unrefefrenced, Unreferenced_Objects, Inline and No_Return that support specifying multiple entities as arguments. Emit an error when one argument is ghost and the other is not and when one argument has a g

Re: [PATCH] fortran: allow character in conditional expression

2025-09-15 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: The first cond-expr patch has been committed as r16-3848-gaf53cfeb8352b1. This patch inspired me to work on an even clearer feature: allowing cond-expr to use characters. The change is small; we just need to conditionally fill the string_length. ... Maybe OK for trunk?

[COMMITTED 20/27] ada: Add Assertion_Policy checks for assertion levels

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus Implement SPARK RM 6.9(19) check: An Assertion_Policy pragma specifying an Assertion_Level policy shall not occur within a ghost subprogram or package associated to an assertion level which depends on this level. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Pragma): A

Re: [PATCH] libstdc++: Do not use _GLIBCXX_MAKE_MOVE_ITERATOR for C++17

2025-09-15 Thread Patrick Palka
On Mon, 15 Sep 2025, Jonathan Wakely wrote: > The _GLIBCXX_MAKE_MOVE_ITERATOR macro is needed for code that needs to > compile as C++98, where it just produces the original iterator. In > std::uninitialized_move and std::uninitialized_move_n we can just call > std::make_move_iterator directly. >

[PATCH] fortran: allow character in conditional expression

2025-09-15 Thread Yuao Ma
Hi all, The first cond-expr patch has been committed as r16-3848-gaf53cfeb8352b1. This patch inspired me to work on an even clearer feature: allowing cond-expr to use characters. The change is small; we just need to conditionally fill the string_length. I'd like to implement this before moving on

[PATCH] libstdc++: Do not use _GLIBCXX_MAKE_MOVE_ITERATOR for C++17

2025-09-15 Thread Jonathan Wakely
The _GLIBCXX_MAKE_MOVE_ITERATOR macro is needed for code that needs to compile as C++98, where it just produces the original iterator. In std::uninitialized_move and std::uninitialized_move_n we can just call std::make_move_iterator directly. libstdc++-v3/ChangeLog: * include/bits/stl_uni

Re: [PATCH v5 6/11] openmp: Add support for non-constant iterator parameters in map, to and from clauses

2025-09-15 Thread Tobias Burnus
Hi Kwok, Kwok Cheung Yeung wrote: Subject: [PATCH 06/11] openmp: Add support for non-constant iterator parameters in map, to and from clauses This patch enables support for using non-constant expressions when specifying iterators in the map clause of target constructs and to/from clauses of t

Re: [PATCH] tree-optimization/117760 - `a != b` implies that a or b is also non-zero

2025-09-15 Thread Richard Biener
On Thu, Sep 11, 2025 at 3:16 PM Matteo Nicoli wrote: > > I am writing this follow-up email to specify that I executed the tests > contained in this patch on aarch64-arm64-linux-gnu The changelog part of the commit message is formatted wrongly. * gcc/match.pd: added the following optimizations

[PATCH v4 1/2] AArch64: Add SME LUTv2 architecture extension

2025-09-15 Thread Karl Meakin
Add the SME LUTv2 architecture extension. Users can enable the extension by adding `+sme-lutv2` to `-march` or `-mcpu`, and test for its presence with the `__ARM_FEATURE_SME_LUTv2` macro. The intrinsics will be added in the next commit. gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch6

[COMMITTED 04/27] ada: Fix code generation when there is no No_Finalization restiction

2025-09-15 Thread Marc Poulhiès
From: Vadim Godunko Check whether library is elaborated is not generated when there is not standard library available on target. gcc/ada/ChangeLog: * bindgen.adb (Gen_Adafinal): Don't generate code when use of standard library suppressed. Tested on x86_64-pc-linux-gnu, committe

[PATCH] Unify last two vect_transform_slp_perm_load calls

2025-09-15 Thread Richard Biener
The following unifies the vect_transform_slp_perm_load call done in vectorizable_load with that eventually done in get_load_store_type. On the way it fixes the conditions on which we can allow VMAT_ELEMENTWISE or VMAT_GATHER_SCATTER when there's a SLP permutation (and we arrange to not code generat

[COMMITTED 22/27] ada: Match assertion levels by name

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus Since Assertion_Levels cannot be named after valid assertion names we no longer need the policies to be matched by entity. gcc/ada/ChangeLog: * sem_prag.adb (Get_Applicable_Policy): Match assertion levels by name. Tested on x86_64-pc-linux-gnu, committed on m

[COMMITTED 12/27] ada: Fix missing finalization for qualified expression in conditional expression

2025-09-15 Thread Marc Poulhiès
From: Eric Botcazou A qualified expression around a function call may cause a temporary to be created and, therefore, cannot be bypassed in Expand_Ctrl_Function_Call. gcc/ada/ChangeLog: * exp_util.ads (Unqualified_Unconditional_Parent): New function. * exp_util.adb (Unconditiona

[COMMITTED 27/27] ada: Fix internal error on aspect in complex object declaration

2025-09-15 Thread Marc Poulhiès
From: Eric Botcazou The sufficient conditions are that the aspect be deferred and the object be rewritten as a renaming because of the complex initialization expression. gcc/ada/ChangeLog: * gcc-interface/trans.cc (gnat_to_gnu) : Deal with objects whose elaboration is de

[COMMITTED 25/27] ada: Fix wrong finalization of aliased array of bounded vector

2025-09-15 Thread Marc Poulhiès
From: Eric Botcazou The problem is that Apply_Discriminant_Check introduces an unnecessary temporary for an assignment where both sides have the same constrained subtype but the left-hand side is an aliased component. This comes from an approximation in the implementation introduced long time ag

[COMMITTED 19/27] ada: Fix ghost condition for level dependencies for assignments

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * ghost.adb (Check_Assignment_Policies): The level of the assignee should depend on the level of the region. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 8 +--- 1 file changed, 5 insertions(+), 3 deletio

  1   2   >