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

2025-09-17 Thread Robin Dapp
OK. -- Regards Robin

Re: [PATCH v2] Ignore tls_model attribute in TLS access optimization

2025-09-17 Thread Alexander Monakov
On Tue, 9 Sep 2025, H.J. Lu wrote: > diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi > index 2922d9e9839..75b7b865902 100644 > --- a/gcc/doc/extend.texi > +++ b/gcc/doc/extend.texi > @@ -7559,11 +7559,14 @@ information. > @cindex @code{tls_model} variable attribute > @item tls_model ("@

Re: [PATCH v1] libstdc++: Implement std::layout_left_padded.

2025-09-17 Thread Luc Grosheintz
On 9/8/25 10:12 PM, Luc Grosheintz wrote: I decided to deviate once (described in detail in the commit message). Without this deviation writing tests is very clumsy and sometimes not possible, e.g. when mixing uint8_t and dynamic padding values to check mandates w.r.t. representability. Previo

[COMMITTED 20/31] ada: Check ghost level dependencies inside assignments

2025-09-17 Thread Marc Poulhiès
From: Viljar Indus Check that entities on the RHS are ghost level dependent on the entities on the LHS of the assignemnt. gcc/ada/ChangeLog: * ghost.adb (Is_OK_Statement): Check the levels of the assignee with the levels of the entity are ghost level dependent. (Check_As

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

2025-09-17 Thread Richard Biener
On Mon, 15 Sep 2025, Jakub Jelinek wrote: > 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 n

Re: Patch ping: [PATCH] c, c++: Allow &__real__ static_var in constant expressions [PR121678]

2025-09-17 Thread Joseph Myers
On Tue, 9 Sep 2025, Jakub Jelinek wrote: > On Wed, Aug 27, 2025 at 01:54:23PM +0200, Jason Merrill wrote: > > On 8/27/25 4:13 AM, Jakub Jelinek wrote: > > > When looking at constexpr references, I've noticed staticp handles > > > COMPONENT_REFs and ARRAY_REFs (the latter if the index is INTEGER_CS

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-09-17 Thread Yeoul Na
> On Sep 16, 2025, at 4:32 PM, Bill Wendling wrote: > > On Tue, Sep 16, 2025 at 11:39 AM Yeoul Na > wrote: >> Hi folks, >> > Hi Yeoul, > >> I wanted to share some updates from our WG14 meeting in Brno, where we >> presented our proposal on dependent attributes. >>

Re: [PATCH 2/2 v2] libstdc++: Implement P1494 and P3641 Partial program correctness [PR119060]

2025-09-17 Thread Jonathan Wakely
On Mon, 8 Sept 2025 at 07:42, Jonathan Wakely wrote: > > > > On Sun, 7 Sept 2025, 20:46 Iain Sandoe, wrote: >> >> Thanks to reviewers for feedback. >> >> Version 2 changes; >> use version.def to add the library versioning information. >> >> --- 8< --- >> >> This implements the library parts of P

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

2025-09-17 Thread Li, Pan2
Will commit the series if no more comments for test in next 24H. Pan -Original Message- From: Li, Pan2 Sent: Tuesday, September 16, 2025 11:20 AM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.com; Chen, Ken ; Liu, Hon

[PATCH 1v1/2] [aarch64] [testsuite] accept ldr after failed ira-remat

2025-09-17 Thread Alexandre Oliva
When -fPIE is enabled (by default), nonlocal_goto tests fail because ira drops reg equivalences for function invariants such as stack addresses, and then, instead of the expected add instructions, we get ldr to restore the pseudo holding the address, as it ends up living in a stack slot across a

Re: [PATCH 1/2 v2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-17 Thread Ville Voutilainen
On Mon, 8 Sept 2025 at 13:54, Richard Biener wrote: > That said, I see no point in std::observable_checkpoint to be represented > in the IL at all if all it is is to cater to FUD around what compilers might > think is a correct transform? It's not just to cater to FUD. I have seen Clang remove a

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

2025-09-17 Thread Avinash Jayakar
Hi, Below is a patch for fixing PR121700 proposed for master. Kindly review. Regtesting on powerpc64le is still running. Will update the status soon in this thread. Thank you, Avinash Jayakar rs6000: Update scalar cost of {TRUNC,FLOOR}_MOD_EXPR[PR121700] The default cost model with O2 flag is

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

2025-09-17 Thread Richard Biener
On Wed, Sep 17, 2025 at 2:40 AM Andrew Pinski wrote: > > On Tue, Sep 16, 2025 at 5:54 AM Richard Biener > wrote: > > > > On Tue, Sep 16, 2025 at 6:34 AM Andrew Pinski > > wrote: > > > > > > After copy propagation for aggregates patches we might end up with > > > now: > > > ``` > > > tmp = a; > >

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

2025-09-17 Thread Mikael Morin
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 schrieb Mikael Morin: Le 11/09/2025 à 20:28,

Re: [PATCH 1/2 v2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-17 Thread Richard Biener
On Mon, Sep 8, 2025 at 2:22 PM Iain Sandoe wrote: > > > > > On 8 Sep 2025, at 12:46, Richard Biener wrote: > > > > On Mon, Sep 8, 2025 at 1:04 PM Ville Voutilainen > > wrote: > >> > >> On Mon, 8 Sept 2025 at 13:54, Richard Biener > >> wrote: > >>> That said, I see no point in std::observable_c

Re: [PATCH] Bail out early during gimplify_asm_expr [PR121391]

2025-09-17 Thread Andrew Pinski
On Tue, Aug 26, 2025 at 10:42 PM Stefan Schulze Frielinghaus wrote: > > Bootstrapped and regtested on x86_64 and s390. Ok for mainline? > > -- >8 -- > > In case an asm operand is an error node, constraints etc. are still > validated. Furthermore, all other operands are gimplified, although an >

Re: [PATCH] sparc: Compile TLS LD tests with -fPIC

2025-09-17 Thread Eric Botcazou
> Compile TLS LD tests with -fPIC to keep local-dynamic TLS model. > > PR testsuite/121888 > * gcc.target/sparc/tls-ld-int16.c: Compile with -fPIC. > * gcc.target/sparc/tls-ld-int16.c: Likewise. > * gcc.target/sparc/tls-ld-int32.c: Likewise. > * gcc.target/sparc/tls-l

RE: New optabs and IFN required for early break [bikeshed]

2025-09-17 Thread Richard Biener
On Fri, 12 Sep 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, September 12, 2025 1:40 PM > > To: Tamar Christina > > Cc: Robin Dapp ; GCC Patches > patc...@gcc.gnu.org>; rdsandif...@googlemail.com > > Subject: RE: New optabs and IFN requir

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

2025-09-17 Thread Li, Pan2
Thanks Robin for comments. > Hmm, yes, integer promotion would make sense. Then I guess the variables are > already in the optimized dump? For uint16_t rs1 input, we have optimized dump similar as below unsigned int _6; vector([4,4]) unsigned int _27; _6 = (unsigned int) rs1_15(D); _27 = [vec_

[PATCH] libstdc++: Explicitly pass -Wsystem-headers to tests that need it

2025-09-17 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does thsi look OK for trunk and perhaps 15/14? -- >8 -- When running libstdc++ tests using an installed gcc (as opposed to an in-tree gcc), warnings from within system headers are suppressed, so tests that check for such warnings need to pass -Wsystem-headers explic

Re: [PATCH] tree-optimization: fabs(a+0.0) -> fabs(a) for non trapping case

2025-09-17 Thread Matteo Nicoli
Thank you Richard, I misunderstood your request to “always state how you tested a patch”. I improved the test description in the patch comment, instead. I tested the patch on both x86_64-pc-linux-gnu and aarch64-arm64-linux-gnu. Since I have another patch under review, I’ll write a follow-up em

Re: [PATCH v2 1/7] mangle: Introduce C typeinfo mangling API

2025-09-17 Thread Kees Cook
On Tue, Sep 09, 2025 at 12:12:11AM +0200, Martin Uecker wrote: > I meant a string that is valid (and also human readable) > C representation of the type, not a mangled version. Oh! Yes, that would be very nice too. :) > If I am not mistaken, it would currently not agree between C and C. > > type

Re: [PATCH v4] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-17 Thread Matthias Kretz
Pushed to trunk with fixed commit message (PR was missing) and one '*' removed from comment. Will backport later. Matthias Kretz [Monday, 8 September 2025, 12:51:13 CEST]: > * renamed the test to abi/pr121801.C > > * changed the comment to include std::bfloat16_t and another space. > > ---

Re: [PATCH v2] bitint: Lower the partial limbs of extended _BitInts with m_limb_type

2025-09-17 Thread Yang Yujie
On Tue, Sep 09, 2025 at 02:09:55PM +0800, Yang Yujie wrote: > Lower the partial limbs of extended _BitInts like the full limbs for most > operations, so that explicit extensions can be inserted only where they > are really needed. > > gcc/ChangeLog: > > * gimple-lower-bitint.cc (struct biti

Re: [PATCH v2 2/3] c: Update TLS model after processing a TLS variable

2025-09-17 Thread H.J. Lu
On Fri, Sep 12, 2025 at 7:50 AM Joseph Myers wrote: > This breaks building glibc with linker errors for some configurations in > build-many-glibcs.py (loongarch64-linux-gnuf64 loongarch64-linux-gnusf > m68k-linux-gnu-coldfire m68k-linux-gnu-coldfire-soft or1k-linux-gnu). > > Representative linker

[COMMITTED 35/35] ada: Warning for composite equality that calls an abstract equality function

2025-09-17 Thread Marc Poulhiès
From: Gary Dismukes When equality is tested for a composite type that has any record components whose type has an abstract equality function that will be called as part of the enclosing type's equality, Program_Error will be raised. We now issue a warning on the equality test, mentioning the com

Re: [PATCH] libstdc++: ranges::rotate should use ranges::iter_move [PR121913]

2025-09-17 Thread Patrick Palka
On Tue, 16 Sep 2025, Jonathan Wakely wrote: > The r16-3835-g7801236069a95c change to use ranges::iter_move should also > have used iter_value_t<_Iter> to ensure we get an object of the value > type, not a proxy reference. > > libstdc++-v3/ChangeLog: > > PR libstdc++/121913 > * includ

Re: [PATCH v1] libstdc++: Rename _S-prefixed identifiers in .

2025-09-17 Thread Jonathan Wakely
On Wed, 10 Sept 2025 at 07:49, Luc Grosheintz wrote: > > In libstdc++ the prefix _S is used for static members only. In > there's several type aliases that also used the prefix _S. They now use > double underscore instead. Thanks for revisiting these. > > libstdc++-v3/ChangeLog: > > * i

[PATCH v11 02/13] x86: fmv: Refactor FMV name mangling.

2025-09-17 Thread alfie.richards
From: Alfie Richards This patch is an overhaul of how FMV name mangling works. Previously mangling logic was duplicated in several places across both target specific and independent code. This patch changes this such that all mangling is done in targetm.mangle_decl_assembler_name (including for t

Re: [PATCH] D, Darwin: Check for __fork before trying to use it.

2025-09-17 Thread Iain Buclaw
Excerpts from Iain Buclaw's message of September 8, 2025 6:27 pm: > Excerpts from Iain Sandoe's message of September 6, 2025 9:27 pm: >> Tested on x86_64-darwin21 (has __fork) and x86_64-darwin10 (does not). >> OK for trunk? >> thanks >> Iain >> > > Looks OK. > FYI, sent the D source file chang

[PATCH v3] MIPS: Fix the issue with the '-fpatchable-function-entry=' feature.

2025-09-17 Thread Lulu Cheng
From: ChengLulu PR target/99217 gcc/ChangeLog: * config/mips/mips.cc (mips_start_function_definition): Implements the functionality of '-fpatchable-function-entry='. (mips_print_patchable_function_entry): Define empty function. (TARGET_ASM_PRINT_PATCHABLE

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

2025-09-17 Thread Jeff Law
On 9/10/25 4:23 AM, Iain Sandoe wrote: Now we have this facility - and it is firing on my testboxes (since i use this script to post-process [per .sum file for stability]) - I looked through a few of the reported cases and they seem genuiene - but particularly in respect of dg-final ones, ha

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

2025-09-17 Thread Richard Biener
On Mon, Sep 15, 2025 at 8:53 PM Robin Dapp wrote: > > 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

Re: [PATCH v3 1/7] typeinfo: Introduce KCFI typeinfo mangling API

2025-09-17 Thread Kees Cook
On Wed, Sep 17, 2025 at 05:56:17PM +, Qing Zhao wrote: > Hi, > > > On Sep 13, 2025, at 19:23, Kees Cook wrote: > > > > To support the KCFI typeid and future type-based allocators, > > Could you please explain a little bit more on the “future type-based > allocators”? Sure, here's a link

Re: [PATCH] libstdc++, v2: Implement C++23 P2590R2 - Explicit lifetime management

2025-09-17 Thread Jonathan Wakely
On Fri, 29 Aug 2025 at 10:01, Jakub Jelinek wrote: > > On Fri, Aug 29, 2025 at 10:56:45AM +0200, Tomasz Kaminski wrote: > > Yes, that is even better. C++ made me biased towards not using > > preprocessing, > > so I miss simple solutions. > > Anyway, went with your requires case + added tests for s

Re: [PATCH v3 2/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-09-17 Thread Kees Cook
On Wed, Sep 17, 2025 at 01:42:32PM +, Qing Zhao wrote: > This version of the middle-end change is much simpler and cleaner-:). Thanks! I think it's getter closer (hopefully). :) > > On Sep 13, 2025, at 19:23, Kees Cook wrote: > > +- KCFI check-call instrumentation must survive tail call opti

Re: [PATCH v3] [x86] Exclude fake cross-lane permutation from avx256_avoid_vec_perm.

2025-09-17 Thread Richard Biener
On Mon, Sep 8, 2025 at 10:15 AM liuhongt wrote: > > SLP may take a broadcast as kind of vec_perm, the patch checks the > permutation index to exclude those false positive. > > > > > so the vectorizer costs sth withy count == 0? I'll see to fix that, > > > > but this also > > > > means the code sh

[PATCH] forwprop: Don't loop on the stmt when optimize_aggr_zeroprop or optimize_agr_copyprop return true

2025-09-17 Thread Andrew Pinski
Since now optimize_aggr_zeroprop and optimize_agr_copyprop work by forward walk to prop the zero/aggregate and does not change the statement at hand, there is no reason to repeat the loop if they do anything. This will prevent problems like PR 121962 from happening again as we will never loop.

Re: [Ada] Fix PR ada/121532

2025-09-17 Thread Eric Botcazou
> This PR is about spurious failures of the ACATS-4 test cxai033, which uses > tasking. This tentatively applies the same tweak as in other similar cases. Applied to cxai03[4-6] as well. PR ada/121532 * ada/acats-4/tests/cxa/cxai034.a: Use Long_Switch_To_New_Task constan

Re: [PATCH 2/2] c++/modules: Cleanup import handling [PR99682]

2025-09-17 Thread Jason Merrill
On 9/10/25 1:15 AM, Nathaniel Shead wrote: On Tue, Sep 09, 2025 at 07:38:46PM +0200, Jason Merrill wrote: On 9/9/25 4:49 PM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? (If you prefer I could also split up each fix into separate commits.) -- >8 -- T

Re: [PATCH 1/2 v2] c++: Implement P1494 and P3641 Partial program correctness [PR119060].

2025-09-17 Thread Richard Biener
On Mon, Sep 8, 2025 at 3:54 PM Iain Sandoe wrote: > > > > > On 8 Sep 2025, at 14:40, Richard Biener wrote: > > > > On Mon, Sep 8, 2025 at 3:16 PM Jakub Jelinek wrote: > >> > >> On Mon, Sep 08, 2025 at 03:05:58PM +0200, Richard Biener wrote: > >>> is reduced to __builtin_abort () (for C++). That

Re: [PATCH] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-17 Thread Jason Merrill
On 9/8/25 4:29 PM, Jakub Jelinek wrote: On Mon, Sep 08, 2025 at 04:03:21PM +0200, Jason Merrill wrote: On 9/8/25 8:11 AM, Matthias Kretz wrote: Andrew Pinski [Friday, 5 September 2025, 22:57:02 CEST]: It seems that Clang and GCC disagree on mangling 80-Bit long double: https://compiler-explor

[PATCH v2] pr107421.f90: Require PIE and pass -fPIE for non-x86 targets

2025-09-17 Thread H.J. Lu
-mno-direct-extern-access is used to disable direct access to external symbol from executable with and without PIE for x86. Require PIE and pass -fPIE to disable direct access to external symbol for other targets. PR fortran/107421 PR testsuite/121848 * gfortran.dg/gomp/pr

[pushed: r16-3941] c++: improve nesting in print_z_candidate [PR121966]

2025-09-17 Thread David Malcolm
Comment #2 of PR c++/121966 notes that the "inherited here" messages should be nested *within* the note they describe. Implemented by this patch, which also nests other notes emitted for rejection_reason within the first note of print_z_candidate. Successfully bootstrapped & regrtested on x86_64-

[pushed: r16-3940] c++: fix count of z candidates for non-viable candidates [PR121966]

2025-09-17 Thread David Malcolm
In r15-6116-gd3dd24acd74605 I updated print_z_candidates to show the number of candidates, and a number for each candidate. PR c++/121966 notes that the printed count is sometimes higher than what's actually printed: I missed the case where candidates in the list aren't printed due to not being vi

[pushed: r16-3938] sarif-replay: fix uninitialized m_debug_physical_locations

2025-09-17 Thread David Malcolm
In r16-2766-g7969e4859ed007 I added a new field to replay_opts but forgot to initialize it in set_defaults. Fixed thusly. Spotted thanks to valgrind. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-3938-gddabda614fed35. gcc/ChangeLog: * sarif-replay

[pushed: r16-3939] testsuite: add 'std-' prefix to c++ analyzer test cases

2025-09-17 Thread David Malcolm
Successfully regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-3939-g76fd69ef3dfa00. gcc/testsuite/ChangeLog: * g++.dg/analyzer/unique_ptr-1.C: Rename to... * g++.dg/analyzer/std-unique_ptr-1.C: ...this. * g++.dg/analyzer/unique_ptr-2.C: Rename to... * g++.d

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

2025-09-17 Thread Robin Dapp
When trying to unify the vector_vector_composition variants I noticed that there are even more alignment checks than when I last looked ;) I think we would need to store at least the "punning type" as well as the element type in ls_data. The computed alignment_support_scheme as well as the misal

Re: [PATCH v3 4/7] aarch64: Add AArch64 Kernel Control Flow Integrity implementation

2025-09-17 Thread Kees Cook
On Sat, Sep 13, 2025 at 04:43:29PM -0700, Andrew Pinski wrote: > On Sat, Sep 13, 2025 at 4:28 PM Kees Cook wrote: > > > > Implement AArch64-specific KCFI backend. > > > > - Trap debugging through ESR (Exception Syndrome Register) encoding > > in BRK instruction immediate values. > > > > - Scratc

Re: [PATCH v3 7/7] kcfi: Add regression test suite

2025-09-17 Thread Kees Cook
On Sat, Sep 13, 2025 at 04:51:21PM -0700, Andrew Pinski wrote: > On Sat, Sep 13, 2025 at 4:36 PM Kees Cook wrote: > > +/* Should have KCFI instrumentation for all indirect calls. */ > > + > > +/* x86_64: Complete KCFI check sequence should be present. */ > > +/* { dg-final { scan-assembler {movl

[COMMITTED 07/31] ada: Refine condition for reporting warnings on components with abstract equality

2025-09-17 Thread Marc Poulhiès
From: Gary Dismukes The initial implementation of the warning resulted in unwanted false positives for types that have a user-defined equality function (in which case abstract equality on components will typically not ever be invoked). The conditions for reporting the warning are refined by this

[COMMITTED 17/31] ada: Compiler crash on container aggregate association with nonstatic key choice

2025-09-17 Thread Marc Poulhiès
From: Gary Dismukes The compiler blows up on a container aggregate with a container element association that has a key_choice given by a nonstatic key expression. This happens in the size computation for the aggregate due to calling Update_Choices with the nonstatic expression. The fix is simply

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

2025-09-17 Thread Robin Dapp
> On Wed, Sep 17, 2025 at 9:22 AM Robin Dapp wrote: >> >> > We are supposed to not get into >> > >> > if (mask_element != index) >> > noop_p = false; >> >> I guess the problem is the vectype mismatch. We're checking the permutation >> for e.g. V16QI = {0, 1, 2, 3, 8, 9, 10, 11, ...}

Re: [WIP] C++ vs. -ftrivial-auto-var-init=

2025-09-17 Thread Jason Merrill
On 9/8/25 4:39 PM, Qing Zhao wrote: On Sep 6, 2025, at 10:10, Jason Merrill wrote: On 9/4/25 10:42 PM, Qing Zhao wrote: On Sep 4, 2025, at 16:15, Jakub Jelinek wrote: On Thu, Sep 04, 2025 at 07:47:17PM +, Qing Zhao wrote: On Sep 4, 2025, at 11:01, Jakub Jelinek wrote: On Thu, Sep 0

Re: [PATCH] uninclude: Add lib/gcc//include as an possible include dir

2025-09-17 Thread Andrew Pinski
On Tue, Sep 16, 2025 at 11:45 PM Richard Biener wrote: > > On Wed, Sep 17, 2025 at 3:18 AM Andrew Pinski > wrote: > > > > While running uninclude on PR99912's preprocessed source uninclude > > didn't uninclude some of the x86_64 target headers. This was because > > `lib/gcc//include` was not noti

[COMMITTED 11/31] ada: Allow implicit packing of arrays when larger than needed

2025-09-17 Thread Marc Poulhiès
From: Bob Duff For Implicit_Packing, do not require the Size clause to exactly match the packed size. For example, an array of 7 Booleans will fit in 7 bits if packed, or 7*8=56 bits if not packed. This patch allows "for T'Size use 8;" to force packing in Implicit_Packing mode; previously, the c

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

2025-09-17 Thread Hongtao Liu
On Wed, Sep 17, 2025 at 2:08 PM Hongtao Liu wrote: > > On Tue, Sep 16, 2025 at 3:53 PM Liu, Hongtao wrote: > > > > > > > > > -Original Message- > > > From: Richard Biener > > > Sent: Tuesday, September 16, 2025 3:03 PM > > > To: Liu, Hongtao > > > Cc: gcc-patches@gcc.gnu.org; hjl.to...@

[PATCH v2] forwprop: Handle memcpy for copy prop [PR121418, PR121417]

2025-09-17 Thread Andrew Pinski
It turns out easy to add support for memcpy copy prop when the memcpy has changed into `MEM` copy. Instead of rejecting right out we need to figure out that `a` and `MEM[&a]` are equivalent in terms of address and size. And then create a VIEW_CONVER_EXPR from the original src to the new type. Note

[PATCH] fix whitespace of: [PATCH v4] c++: Fix mangling of _Float16 template args [PR121801]

2025-09-17 Thread Matthias Kretz
Oh great, while replacing the '*' I messed up the indent. It's now using spaces where it should use a Tab. OK for trunk like this? --- 8< -- Signed-off-by: Matthias Kretz gcc/cp/ChangeLog: * mangle.cc (write_real_cst): Replace 8 spaces with Tab. --- gcc/cp/man

Re: [PATCH] libstdc++: Document C++20 atomic_ref implementation-defined behavior.

2025-09-17 Thread Jonathan Wakely
On Mon, 08 Sep 2025 at 11:29 +0200, Tomasz Kamiński wrote: Also introduce Implementation Specific Behavior section for C++20. libstdc++-v3/ChangeLog: * doc/html/index.html: Regenerated. * doc/html/manual/index.html: Regenerated. * doc/html/manual/intro.html: Regenerated.

[PATCH FYI] [ppc] [vxworks] allow code model selection

2025-09-17 Thread Alexandre Oliva
Bring code model selection logic to vxworks.h as well. Tested with ppc- and ppc64-vxworks7r2. Approved off-list by Olivier Hainque. I'll put it in unless where are objections. for gcc/ChangeLog * config/rs6000/vxworks.h (TARGET_CMODEL, SET_CMODEL): Define. --- gcc/config/rs6000/vxwo

[COMMITTED 17/27] ada: Update ghost code SPARK RM rules

2025-09-17 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * contracts.adb: Update SPARK RM reference numbers. * freeze.adb: Likewise. * ghost.adb: Likewise. * ghost.ads: Likewise. * sem_ch12.adb: Likewise. * sem_ch3.adb: Likewise. * sem_ch6.adb: Likewise.

[COMMITTED 08/27] ada: Improve ghost region creation for pragmas

2025-09-17 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * atree.adb (Mark_New_Ghost_Node): Set Is_Implicit_Ghost for all newly created nodes. * gen_il-fields.ads (Is_Implicit_Ghost): New attribute. * gen_il-gen-gen_entities.adb (Entity_Kind): Add Is_Implicit_Ghost attribute

Re: [Patch][RFC?] libgomp: Init hash table for 'indirect'-clause of 'declare target' on the host [PR114445, PR119857]

2025-09-17 Thread Tobias Burnus
Now pushed as r16-3925-gda5803c794d16d. There is some follow-up cleanup needed to at least free the memory on the host, but possibly also to handle multiple image loads/unloads. See PRs for detail: PR114445, PR119857 – and PR114690. I will close PRs and update the description, such that likel

[PATCHv14] libstdc++: New generate_canonical impl (P0952, LWG2524) [PR119739]

2025-09-17 Thread Nathan Myers
Changes in v14: * Remove dependence on __STRICT_ANSI__, which is turned on by "-std=c++26". Changes in v13: * Spell __STRICT_ANSI__ correctly. Changes in v12: * use __builtin_popcountg() which works on all unsigned integer types. Changes in v11: * Add doxygen entry for generate_canonical.

[PATCH] c++: non-dep cmp op rewritten from <=> returning int [PR121779]

2025-09-17 Thread Patrick Palka
Bootstrapped and regttested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Apparently an explicitly defined operator<=> isn't required to return std::foo_ordering, so build_min_non_dep_op_overload needs to be able to handle a (x <=> y) @ 0 expression where the @ resolved to a built

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

2025-09-17 Thread Joseph Myers
On Mon, 8 Sep 2025, Alejandro Colomar wrote: > BTW, I'm wondering about the following: > > alx@debian:~/tmp$ cat fwd.c > void j(void; int x); > void k(void; void); > void l(void; ...); > alx@debian:~/tmp$ gcc fwd.c > fwd.c:1:8: error: parameter ‘({anonymous})’

Re: [PATCH v2] doc: Correct the return type of float comparison

2025-09-17 Thread Joseph Myers
On Thu, 11 Sep 2025, Trevor Gross wrote: > On Tue, Sep 2, 2025 at 1:39 PM Joseph Myers wrote: > > > > On Wed, 28 May 2025, Trevor Gross wrote: > > > > > Documentation for `__cmpsf2` and similar functions currently indicate a > > > return type of `int`. This is not correct however; the `libgcc` >

[PATCH] libstdc++: Document remaining C++20 implementation-defined behavior.

2025-09-17 Thread Tomasz Kamiński
I have double checked that implementation-defined behavior in the [compliance] (whether the implementation is freestanding) and [stringbuf.const] (initialization of sequence pointers) are indeed null, and there are no corresponding entires in eariel standards. libstdc++-v3/ChangeLog: * d

Re: [PATCH v4 1/2] libstdc++: Implement constant_wrapper, cw from P2781R9.

2025-09-17 Thread Tomasz Kaminski
Pushed to trunk. On Fri, Sep 5, 2025 at 3:03 PM Tomasz Kaminski wrote: > > > On Fri, Sep 5, 2025 at 2:25 PM Jonathan Wakely wrote: > >> On Fri, 5 Sept 2025 at 08:14, Tomasz Kamiński >> wrote: >> > >> > From: Luc Grosheintz >> > >> > This is a partial implementation of P2781R9. It adds std::cw

[COMMITTED 24/31] ada: Create a ghost region for pragma annotate

2025-09-17 Thread Marc Poulhiès
From: Viljar Indus Create a ghost region for pragma annotate so that we are able to analyze the entity references correctly inside the pragma. gcc/ada/ChangeLog: * sem_prag.adb: Create a ghost region for pragma annotate before analyzing its arguments. Tested on x86_64-pc-linux-

Re: [PATCH] tree-optimization/121844 - IVOPTs and asm goto in latch

2025-09-17 Thread Jakub Jelinek
On Mon, Sep 08, 2025 at 02:38:48PM +0200, Richard Biener wrote: > When there's an asm goto in the latch of a loop we may not use > IP_END IVs since instantiating those would (need to) split the > latch edge which in turn invalidates IP_NORMAL position handling. > This is a revision of the PR107997

Re: [PATCH] Ignore tls_model attribute in TLS access optimization

2025-09-17 Thread H.J. Lu
On Mon, Sep 8, 2025 at 11:50 PM Alexander Monakov wrote: > > > On Mon, 8 Sep 2025, H.J. Lu wrote: > > > Don't check tls_model attribute when optimizing TLS access since > > > > 1. -ftls-model=initial-exec also can specify tls_model without tls_model > > attribute. > > There's a difference: -ftls-m

Re: [PATCH] fortran: implement conditional expression for fortran 2023

2025-09-17 Thread Yuao Ma
Hi Tobias, On Mon, Sep 8, 2025 at 10:54 PM Tobias Burnus wrote: > * * * > > >>> + if (true_expr->rank != false_expr->rank) > >>> +{ > >>> + gfc_error ("true_expr at %L and false_expr at %L in conditional " > >>> +"expression must have the same rank", > >>> +

Re: [PATCH] RISC-V: Implement Quad-precision Float extension

2025-09-17 Thread Kito Cheng
> This Patch implements the Quad-precision Float extension for RISC-V, based on > Kito's work five years ago in > https://github.com/riscvarchive/riscv-gcc/tree/q-ext Thanks for bringing this back, I almost forgot this still has not merged yet. > diff --git a/gcc/config/riscv/iterators.md b/gcc/

[COMMITTED 19/35] ada: Replace Preelaborable_Initialization pragmas with equivalent aspect specs

2025-09-17 Thread Marc Poulhiès
From: Denis Mazzucato All Preelaborable_Initialization pragmas in the language-defined units are replaced by the equivalent Preelaborable_Initialization aspect. gcc/ada/ChangeLog: * targparm.adb (Get_Target_Parameters): Address type declaration doesn't ends anymore with a semico

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

2025-09-17 Thread Richard Biener
On Wed, Sep 17, 2025 at 1:15 PM Robin Dapp wrote: > > > On Wed, Sep 17, 2025 at 9:22 AM Robin Dapp wrote: > >> > >> > We are supposed to not get into > >> > > >> > if (mask_element != index) > >> > noop_p = false; > >> > >> I guess the problem is the vectype mismatch. We're checkin

Re: [PATCH v3 1/7] typeinfo: Introduce KCFI typeinfo mangling API

2025-09-17 Thread Qing Zhao
Hi, > On Sep 13, 2025, at 19:23, Kees Cook wrote: > > To support the KCFI typeid and future type-based allocators, Could you please explain a little bit more on the “future type-based allocators”? And why these two new builtins are necessary for this purpose? > which need > to convert uniqu

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

2025-09-17 Thread Qing Zhao
> On Sep 17, 2025, at 12:11, Jakub Jelinek wrote: > > On Wed, Sep 17, 2025 at 05:59:34PM +0200, Martin Jambor wrote: >> Hi, >> >> On Fri, Sep 12 2025, Qing Zhao wrote: >>> In tree-sra.cc, for the following stmt (initialization in source code): >>> s = {}; >>> >>> for the above lhs "s", the f

[PATCH] fortran: Allow vector math functions only with fast-math [PR 118955]

2025-09-17 Thread Wilco Dijkstra
Vector math functions are currently always enabled in Fortran. This is incorrect since vector math functions are designed to be Ofast only. Add a new 'fastmath' option which only accepts vector functions if fast-math is enabled: !GCC$ builtin (sin) attributes simd (notinbranch) if('fastmath') P

Re: [patch, Fortran] Implement -fexternal-blas64, PR 121161

2025-09-17 Thread Thomas Koenig
Hi Steve, On Tue, Sep 16, 2025 at 10:10:16PM +0200, Thomas Koenig wrote: Hello world, the attached patch implements a new option, -fexternal-blas64, so people can use 64-bit libraries for external BLAS, like Intel MKL. Regression-tested. OK for trunk? Thanks. I've read through the patch,

[PATCH] libstdc++/ranges: Fix more wrong value type init from reference type [PR111861]

2025-09-17 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15/14? -- >8 -- As in r16-3912-g412a1f78b53709, this fixes some other spots where we wrongly use a deduced type and non-direct-initialization when intending to initialize a value type from an iterator's reference type. PR libstdc

Re: [PATCH] Bail out early during gimplify_asm_expr [PR121391]

2025-09-17 Thread Jeff Law
On 9/10/25 03:12, Stefan Schulze Frielinghaus wrote: Ping. On Wed, Aug 27, 2025 at 07:40:38AM +0200, Stefan Schulze Frielinghaus wrote: Bootstrapped and regtested on x86_64 and s390. Ok for mainline? -- >8 -- In case an asm operand is an error node, constraints etc. are still validated.

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

2025-09-17 Thread Jakub Jelinek
On Wed, Sep 17, 2025 at 05:59:34PM +0200, Martin Jambor wrote: > Hi, > > On Fri, Sep 12 2025, 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

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

2025-09-17 Thread Qing Zhao
> On Sep 17, 2025, at 11:59, Martin Jambor wrote: > > Hi, > > On Fri, Sep 12 2025, 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; >> >>

[RFC PATCH] c++, gimplify: Implement C++26 P2795R5 - Erroneous behavior for uninitialized reads [PR114457]

2025-09-17 Thread Jakub Jelinek
Hi! Here is my current version of the C++26 P2795R5 support. This now includes redirecting of forward/backward gotos which cross vacuous initializations for -std=c++26 and -ftrivial-auto-var-init={zero,pattern} by adding an artificial if (0) { lab1: v1 = .DEFERRED_INIT (...); lab2: v2 = .DEFERRED

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

2025-09-17 Thread Martin Jambor
Hi, On Fri, Sep 12 2025, 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 initialization): > s =

[PATCH] c++, contracts: Abstract interfaces to constexpr [NFC].

2025-09-17 Thread Iain Sandoe
Another small preparation patch for C++26 upstreaming. Tested on x86_64-darwin, powerpc64le-linux, OK for trunk? thanks Iain --- 8< --- We want to move to having different representations of the contract semantic for C++26, since that wants values outside the range that can be accommodated using

[PATCH] dwarf: Save bit stride information array type entry [PR121964]

2025-09-17 Thread Yury Khrustalev
Lack of DW_AT_bit_stride in a DW_TAG_array_type entry causes GDB to infer incorrect element size for vector types. The causes incorrect display of SVE predicate variables as well as out of bounds memory access when reading contents of SVE predicates from memory in GDB. PR debug/121964 gcc

Re: [PATCH] libstdc++/ranges: Fix more wrong value type init from reference type [PR111861]

2025-09-17 Thread Jonathan Wakely
On Wed, 17 Sept 2025 at 16:08, Patrick Palka wrote: > > On Wed, 17 Sep 2025, Jonathan Wakely wrote: > > > On Wed, 17 Sept 2025 at 15:19, Patrick Palka wrote: > > > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15/14? > > > > > > -- >8 -- > > > > > > As in r16-3912-g412a1f78b537

Re: [PATCH] libstdc++/ranges: Fix more wrong value type init from reference type [PR111861]

2025-09-17 Thread Patrick Palka
On Wed, 17 Sep 2025, Jonathan Wakely wrote: > On Wed, 17 Sept 2025 at 15:19, Patrick Palka wrote: > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15/14? > > > > -- >8 -- > > > > As in r16-3912-g412a1f78b53709, this fixes some other spots where we > > wrongly use a deduced type

Re: [PATCHv10] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-09-17 Thread Jonathan Wakely
On Mon, 15 Sep 2025 at 09:39 -0400, Nathan Myers wrote: Changes in v10: * Merge external updates * Use long literals "202306L" in #if guards * Remove redundant #include * Test constexpr not_fn * Fix return type declarations in synopsis.cc test * Fix error text for __cpp_lib_not_fn check in test

[pushed] testsuite, objective-c: Fix duplicate test names in 'special'.

2025-09-17 Thread Iain Sandoe
This is expected, as noted below, to produce a temporary report of missing/new tests for the instances in this subdirectory, since the names have, intentionally, been changed to resolve the duplication. Tested on x86_64 darwin, powerpc64le linux, pushed to trunk, thanks, Iain --- 8< --- For mac

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

2025-09-17 Thread Yuao Ma
Hi Tobias, On Wed, Sep 17, 2025 at 3:33 AM Tobias Burnus wrote: > > Hi Yuao, > > Yuao Ma wrote: > > On Tue, Sep 16, 2025 at 5:11 PM Tobias Burnus wrote: > > PS: Already with the current code, we may run into the issue of passing > an actual argument like '(cond ? "abc" : "cdfg")' to 'class(*)' –

Re: [PATCH] libstdc++/ranges: Fix more wrong value type init from reference type [PR111861]

2025-09-17 Thread Jonathan Wakely
On Wed, 17 Sept 2025 at 15:19, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15/14? > > -- >8 -- > > As in r16-3912-g412a1f78b53709, this fixes some other spots where we > wrongly use a deduced type and non-direct-initialization when intending > to initialize

Re: [PATCH v3 2/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-09-17 Thread Qing Zhao
Hi, Kees, This version of the middle-end change is much simpler and cleaner-:). See my comments and questions below: > On Sep 13, 2025, at 19:23, Kees Cook wrote: > > Implements the Linux Kernel Control Flow Integrity ABI, which provides a > function prototype based forward edge control flow in

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

2025-09-17 Thread Robin Dapp
> For a non-STMT_VINFO_STRIDED_P access the DR_GROUP_SIZE is > basically the DR_STRIDE, because the DR group models contiguous memory. You meant DR_STEP? So if step/stride = 100 and we access the first two elements at 0, 1, the third is at 100 and the gap is 98? In my case we have strided_p = t

[PATCH] [gimplefe] fix SSA operand creation

2025-09-17 Thread Richard Biener
When transitioning gcc.dg/torture/pr84830.c to a GIMPLE testcase to feed the IL into PRE that caused the original issue (and verify it's still there with the fix reverted), I noticed we put up SSA operands before having fully parsed the function and thus with not all variables having the final TREE

[PATCH v11 00/13] c: c++: FMV refactor, C FMV support and ACLE compliance

2025-09-17 Thread alfie.richards
From: Alfie Richards Hi all, I am only resubmitting the relevant patches here to reduce noise. Changes since V10: - Addressed Josephs feedback on C patch. - Removed 2 lines of nonsense from patch 2 noticed by Richard E. - Addressed Jasons feedback on C++ patches. Reviews needed: - 02/13 x86: f

[PATCH v11 07/13] c++: Refactor FMV frontend conflict and merging logic and hooks.

2025-09-17 Thread alfie.richards
From: Alfie Richards This change refactors FMV handling in the frontend to allows greater reasoning about versions in shared code. This is needed for allowing target_clones and target_versions to be used together in a function set, as there is then two distinct concerns when encountering two dec

  1   2   >