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

2025-09-11 Thread Richard Biener
On Thu, Sep 11, 2025 at 6:06 PM Robin Dapp wrote: > > > Hmm, so the existing "punning" code for VMAT_STRIDED_SLP does > > > > tree vtype > > = vector_vector_composition_type (vectype, const_nunits / n, > > &ptype); > >

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

2025-09-11 Thread Sergey Fedorov
Thank you On Thu, Sep 11, 2025 at 2:21 AM H.J. Lu wrote: > On Mon, Sep 8, 2025 at 7:47 AM H.J. Lu wrote: > > > > -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 acce

Re: [PATCH v5 5/11] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran)

2025-09-11 Thread Tobias Burnus
Kwok Cheung Yeung wrote on July 9, 2025: Subject: [PATCH 05/11] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran) This adds Fortran support for iterators in 'to' and 'from' clauses in the 'target update' OpenMP directive. ... @@ -1418,16 +1419,67 @@ gf

Re: [r16-3760 Regression] FAIL: g++.target/i386/pr116896-1.C -std=gnu++23 scan-assembler-times \tjp\t 1 on Linux/x86_64

2025-09-11 Thread Robin Dapp
> FAIL: gcc.target/i386/pr116896.c scan-assembler-times \tjp\t 2 > FAIL: g++.target/i386/pr116896-1.C -std=gnu++20 scan-assembler-times \tjp\t > 1 > FAIL: g++.target/i386/pr116896-1.C -std=gnu++23 scan-assembler-times \tjp\t > 1 > FAIL: g++.target/i386/pr116896-1.C -std=gnu++26 scan-assembl

Re: [PATCH] libstdc++: Use _Drop_iter<_CharT> for formattable concept checking [PR121765]

2025-09-11 Thread Tomasz Kaminski
On Wed, Sep 10, 2025 at 10:54 AM Jonathan Wakely wrote: > On Wed, 10 Sept 2025 at 09:52, Jonathan Wakely wrote: > > > > On Thu, 4 Sept 2025 at 14:39, Tomasz Kaminski > wrote: > > >> + if constexpr (is_same_v<_Out, _Iter_for_t<_CharT>>) > > > > > > This would be better if we use _Drop_iter

[r16-3760 Regression] FAIL: g++.target/i386/pr116896-1.C -std=gnu++23 scan-assembler-times \tjp\t 1 on Linux/x86_64

2025-09-11 Thread Jiang, Haochen
On Linux/x86_64, 9ff5cadac4579fe714dc8de3a39eaef8534c64f7 is the first bad commit commit 9ff5cadac4579fe714dc8de3a39eaef8534c64f7 Author: Robin Dapp Date: Tue Sep 9 16:15:48 2025 +0200 ifcvt: Clarify if_info.original_cost. caused FAIL: gcc.target/i386/pr116896.c scan-assembler-times \tjp

[PATCH][RFC] ipa-free-lang-data: Don't walk into DECL_CHAIN when finding decls/types [PR121865]

2025-09-11 Thread Nathaniel Shead
Does this fix seem reasonable, or is there something I've missed? My change to g++.dg/lto/pr101396_0.C also causes it to fail link with some flags on my machine, with: FAIL: g++.dg/lto/pr101396 cp_lto_pr101396_0.o-cp_lto_pr101396_1.o link, -O0 -flto -flto-partition=none -fuse-linker-plugin FAIL:

[COMMITTED 30/31] ada: Minor comment tweaks

2025-09-11 Thread Marc Poulhiès
gcc/ada/ChangeLog: * env.c (__gnat_clearenv): Adjust comment. * libgnarl/a-intnam__bsd.ads: Fix copyright date. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/env.c | 3 ++- gcc/ada/libgnarl/a-intnam__bsd.ads | 2 +- 2 files changed, 3 inser

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

2025-09-11 Thread Tamar Christina
> -Original Message- > From: Robin Dapp > Sent: Thursday, September 11, 2025 1:03 PM > To: Richard Biener ; Tamar Christina > > Cc: rdapp@gmail.com; gcc-patches@gcc.gnu.org; > rdsandif...@googlemail.com > Subject: Re: New optabs and IFN required for early break [bikeshed] > > > So AV

[PATCH v2] libstdc++: Implement _Escaping_sink to avoid construction of string [PR119820]

2025-09-11 Thread Tomasz Kamiński
This patch implements _Escaping_sink that stores characters in a local (stack) buffer. When the buffer is full, the range of characters is escaped and written to the underlying sink. To support above, the __write_escaped_unicode_part function are defined. It takes __str and __prev_esc by reference

Re: [PATCH] Fortran: make STAT/LSTAT/FSTAT intrinsics generic [PR82480]

2025-09-11 Thread Steve Kargl
On Tue, Sep 09, 2025 at 08:49:51PM +0200, Harald Anlauf wrote: > Hi Jerry! > > Am 08.09.25 um 23:56 schrieb Jerry D: > > On 9/8/25 12:59 PM, Harald Anlauf wrote: > > > Dear all, > > > > > > this is the second (and hopefully final) patch to fix this PR for good. > > > This makes the GNU intrinsics

[COMMITTED 27/35] ada: Fix comment in Find_Type_Name

2025-09-11 Thread Marc Poulhiès
From: Ronan Desplanques The comment this patch changes was made incorrect by the possibility of completing an incomplete view with a private type declaration in Ada 2012. To avoid any possible confusion, this patch brings the comment up to date. gcc/ada/ChangeLog: * sem_ch3.adb (Find_Ty

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

2025-09-11 Thread Alexander Monakov
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-model is usable only for upgrading the model; if you pass -ftls-model=glob

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

2025-09-11 Thread Kees Cook
On Thu, Sep 11, 2025 at 09:29:35AM +0200, Peter Zijlstra wrote: > On Wed, Sep 10, 2025 at 08:05:11PM -0700, Kees Cook wrote: > > > > > +/* Check if a function needs KCFI preamble generation. > > > > + ALL functions get preambles when -fsanitize=kcfi is enabled, > > > > regardless > > > > + of

Re: [PATCH] tree-optimization/121703 - UBSAN error with moving from uninit data

2025-09-11 Thread Richard Biener
On Fri, 5 Sep 2025, Richard Biener wrote: > The PR reports > > vectorizer.h:276:3: runtime error: load of value 32695, which is not a valid > value for type 'internal_fn' > > which I believe is from > > slp_node->data = new vect_load_store_data (std::move (ls)); > > where 'ls' can be pa

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

2025-09-11 Thread liuhongt
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 should have used m_num_avx256_vec_perm[where] += count. Changed.

Re: [PATCH 3/3] libstdc++: Trap on std::shared_ptr reference count overflow [PR71945]

2025-09-11 Thread Jonathan Wakely
On Mon, 8 Sept 2025 at 14:38, Tomasz Kaminski wrote: > > > > On Mon, Sep 8, 2025 at 2:45 PM Jonathan Wakely wrote: >> >> This adds checks when incrementing the shared count and weak count and >> will trap if they would be >> be incremented past its maximum. The maximum value is the value at which

RE: [PATCH v4 3/3]middle-end: Use addhn for compression instead of inclusive OR when reducing comparison values

2025-09-11 Thread Tamar Christina
> 70a27555d900caf71932a2c794d9a77d06048b6a..b677a5308fb3498314cbbfc1 > 865eae6bf1c815b9 100644 > > --- a/gcc/doc/md.texi > > +++ b/gcc/doc/md.texi > > @@ -6087,6 +6087,25 @@ vectors with N signed/unsigned elements of size > S@. Find the absolute > > difference between operands 1 and 2 and widen t

Re: [PATCH] xtensa: Allow SImode GENERAL_REGS pseudos to spill into FP_REGS hardregs

2025-09-11 Thread Max Filippov
Hi Suwa-san, On Thu, Sep 11, 2025 at 1:48 PM Takayuki 'January June' Suwa wrote: > > If the Floating-Point Coprocessor option is configured and there are no > floating-point coprocessor instructions in the function, the unused > floating-point registers (f0 thru f15) can be good targets for spill

RE: [PATCH] AArch64: Add isnan expander [PR 66462]

2025-09-11 Thread Tamar Christina
> -Original Message- > From: Wilco Dijkstra > Sent: Thursday, September 4, 2025 4:32 PM > To: Kyrylo Tkachov ; Alex Coplan > ; Tamar Christina ; Andrew > Pinski ; Alice Carlotti > Cc: GCC Patches > Subject: [PATCH] AArch64: Add isnan expander [PR 66462] > > > Add an expander for isn

Re: [PATCH] xtensa: Allow SImode GENERAL_REGS pseudos to spill into FP_REGS hardregs

2025-09-11 Thread Takayuki 'January June' Suwa
Hi! On 2025/09/12 14:14, Max Filippov wrote: Hi Suwa-san, On Thu, Sep 11, 2025 at 1:48 PM Takayuki 'January June' Suwa wrote: If the Floating-Point Coprocessor option is configured and there are no floating-point coprocessor instructions in the function, the unused floating-point registers (

[r16-3810 Regression] FAIL: g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C -std=c++17 at line 21 (test for warnings, line 12) on Linux/x86_64

2025-09-11 Thread Jiang, Haochen
On Linux/x86_64, 6456da6bab8a2c43e7899afda991589065d96595 is the first bad commit commit 6456da6bab8a2c43e7899afda991589065d96595 Author: Jonathan Wakely Date: Thu Jul 17 22:02:45 2025 +0100 libstdc++: Make atomicity helpers use unsigned arithmetic [PR121148] caused FAIL: g++.dg/analyzer

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

2025-09-11 Thread Liao Shihua
Ok,I will  try to implement it in QEMU and send the second version of the patch. 在 2025/9/11 21:18, Jeff Law 写道: On 9/11/25 1:28 AM, Kito Cheng wrote: This Patch implements the Quad-precision Float extension for RISC-V, based on Kito's work five years ago in https://github.com/riscvarchive/

[COMMITTED 16/35] ada: Avoid renamed declaration becoming both ignored and checked

2025-09-11 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * ghost.adb (Mark_Ghost_Declaration_Or_Body): Mark ghost entity explicitly as ignored or checked. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 37 + 1 file changed, 33 inse

[COMMITTED 29/31] ada: Give a warning for huge imported objects

2025-09-11 Thread Marc Poulhiès
From: Eric Botcazou This is a follow-up to a recent change, where a warning was implemented for huge library-level objects. However it is not given if the objects are imported, although an indirection is also added for them under the hood to match the export side. gcc/ada/ChangeLog: *

Re: [C PATCH, v2] c: Warn when returning nested functions that require a non-local context.

2025-09-11 Thread Joseph Myers
On Sat, 6 Sep 2025, Martin Uecker wrote: > > This is the revised version adding the test to C_DECL_REGISTER. > This meant I also had to change one place where it is set on > function declarators before it becomes an error. > > Bootstrapped and regression tested on x86_64. > > Martin > > >

[COMMITTED 13/35] ada: Fix ghost policy detection for declarations

2025-09-11 Thread Marc Poulhiès
From: Viljar Indus Declarations should take the ghost policy from the region if they do not have an explicit ghost aspect/pragam themselves. gcc/ada/ChangeLog: * ghost.adb (Mark_And_Set_Ghost_Declaration): apply the ghost policy and level from the declaration only if the declara

[PATCH] libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890]

2025-09-11 Thread Jonathan Wakely
Whenever we use operator+ or similar operators on random access iterators we need to be careful to use the iterator's difference_type rather than some other integer type. It's not guaranteed that an expression with an arbitrary integer type, such as `it + 1u`, has the same effects as `it + iter_dif

Re: [PATCH][RFC] ipa-free-lang-data: Don't walk into DECL_CHAIN when finding decls/types [PR121865]

2025-09-11 Thread Richard Biener
On Wed, 10 Sep 2025, Nathaniel Shead wrote: > Does this fix seem reasonable, or is there something I've missed? > > My change to g++.dg/lto/pr101396_0.C also causes it to fail link with > some flags on my machine, with: > > FAIL: g++.dg/lto/pr101396 cp_lto_pr101396_0.o-cp_lto_pr101396_1.o link,

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

2025-09-11 Thread Iain Buclaw
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. Thanks, Iain

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

2025-09-11 Thread Luc Grosheintz
On 9/9/25 15:54, Tomasz Kaminski wrote: On Mon, Sep 8, 2025 at 10:14 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 v

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

2025-09-11 Thread Luc Grosheintz
On 9/11/25 17:05, Luc Grosheintz wrote: Static checks already cover this. but what if `_M_exents is completely dynamic, e.g.   std::extents{128, 4} I see, we can constexpr if the check away for fully static extents.

Re: [EXT] Re: [PATCH,RFC] RISC-V: Fix typo in tt-ascalon-d8's pipeline description [PR121878]

2025-09-11 Thread Peter Bergner
On 9/10/25 2:41 AM, Robin Dapp wrote: > So IMHO we shouldn't complicate it and the patch is OK. The change is > reasonable and reflects what the hardware does (one could argue it's even > better than the mode) - latency depends on the element size. Ok, given the bootstrap/regtest came back clea

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

2025-09-11 Thread H.J. Lu
After commit 8cad8f94b450be9b73d07bdeef7fa1778d3f2b96 Author: H.J. Lu Date: Fri Sep 5 15:40:51 2025 -0700 c: Update TLS model after processing a TLS variable GCC will upgrade local-dynamic TLS model to local-exec without -fPIC. Compile TLS LD tests with -fPIC to keep local-dynamic TLS mod

[PATCH] Fix load/store bias handling for extractlast.

2025-09-11 Thread Juergen Christ
The length returned by vect_get_loop_len is REALLEN + BIAS, but was assumed to be REALLEN - BIAS. If BIAS is -1, this leads to wrong code. Bootstrapped and regtested on s390. Ok for trunk? gcc/ChangeLog: * tree-vect-loop.cc (vectorizable_live_operation_1): Fix load/store bias h

[patch][wwwdocs] gcc-16/changes.html: Update Fortran section

2025-09-11 Thread Tobias Burnus
Hi all, attached is a patch to update the Fortran section of the GCC 16 release notes. I am sure that I missed some fine print and the most important changes are also some bug fixes, which are difficult to list. → https://gcc.gnu.org/gcc-16/changes.html Comments? Tobias PS: I am aware of addit

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

2025-09-11 Thread Luc Grosheintz
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. libstdc++-v3/ChangeLog: * include/std/mdspan (_ExtentsStorage::__base): New name for _S_base. (_ExtentsStorage

[PATCH] c++: Fix null deref in maybe_diagnose_standard_trait [PR121859]

2025-09-11 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- A static member template doesn't always have a DECL_INITIAL, as in the below testcase, and so checking its TREE_CODE performs a null-pointer dereference. I don't think we need to specially detect this case as traits we car

New optabs and IFN required for early break [bikeshed]

2025-09-11 Thread Tamar Christina
This email is to discuss the optabs and IFNs that I will need to finish off the early break optimizations in GCC 16 and to minimize respins on the final patches. Optabs only, These will be handled through expand rewriting them if the targets supports them: -- cbranch At the moment we model vect

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

2025-09-11 Thread Kito Cheng
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: > > * common/config/riscv/riscv-common

Re: [PATCH][RFC] ipa-free-lang-data: Don't walk into DECL_CHAIN when finding decls/types [PR121865]

2025-09-11 Thread Nathaniel Shead
On Thu, Sep 11, 2025 at 11:08:54AM +0200, Richard Biener wrote: > On Thu, 11 Sep 2025, Richard Biener wrote: > > > On Wed, 10 Sep 2025, Nathaniel Shead wrote: > > > > > Does this fix seem reasonable, or is there something I've missed? > > > > > > My change to g++.dg/lto/pr101396_0.C also causes

Re: [PATCH] gcov: Split atomic bitwise-or for some targets

2025-09-11 Thread Sebastian Huber
- Am 10. Jul 2025 um 7:53 schrieb Sebastian Huber sebastian.hu...@embedded-brains.de: > There are targets, which only offer 32-bit atomic operations (for > example 32-bit RISC-V). For these targets, split the 64-bit atomic > bitwise-or operation into two parts. Could someone please have a l

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

2025-09-11 Thread LIU Hao
在 2025-9-12 08:50, Jonathan Yong 写道: On 9/10/25 3:29 AM, 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

[PATCH] libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890]

2025-09-11 Thread Jonathan Wakely
Whenever we use operator+ or similar operators on random access iterators we need to be careful to use the iterator's difference_type rather than some other integer type. It's not guaranteed that an expression with an arbitrary integer type, such as `it + 1u`, has the same effects as `it + iter_dif

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

2025-09-11 Thread Mikael Morin
Le 11/09/2025 à 20:28, Harald Anlauf a écrit : Dear all, here's a - once found - seemingly simple and obvious fix for a memory corruption happening when intrinsic assignment is used to set a scalar allocatable polymorphic component of a derived type when the latter is instanciated as an array of

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

2025-09-11 Thread Jonathan Yong
On 9/10/25 3:29 AM, 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 on Windows. gcc/ChangeL

[COMMITTED 14/31] ada: Fix regression in Root_Type

2025-09-11 Thread Marc Poulhiès
From: Bob Duff Previous change, "Make pp and friends more robust (base type only)" introduced a bug in Root_Type. Etype (T) can, in fact, be Empty (but only in case of errors.) This patch fixes it. gcc/ada/ChangeLog: * einfo-utils.adb (Root_Type): Deal with missing Etype. (Root_

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

2025-09-11 Thread Matteo Nicoli
I am writing this follow-up email to specify that I executed the tests contained in this patch on aarch64-arm64-linux-gnu Best regards, Matteo > On Sep 9, 2025, at 10:39 PM, Matteo Nicoli wrote: > > Dear reviewers, > > I attached the patch for this Bugzilla issue: > https://gcc.gnu.org/bugz

Re: [PATCH V3 2/2] RISC-V: Support vnclip idiom testcase [PR120378]

2025-09-11 Thread Robin Dapp
The test part is still OK of course. -- Regards Robin

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

2025-09-11 Thread Jonathan Wakely
Using std::move(*it) is incorrect for iterators that use proxy refs, we should use ranges::iter_move(it) instead. libstdc++-v3/ChangeLog: PR libstdc++/121913 * include/bits/ranges_algo.h (__rotate_fn::operator()): Use ranges::iter_move(it) instead of std::move(*it).

[PATCH] xtensa: Allow SImode GENERAL_REGS pseudos to spill into FP_REGS hardregs

2025-09-11 Thread Takayuki 'January June' Suwa
If the Floating-Point Coprocessor option is configured and there are no floating-point coprocessor instructions in the function, the unused floating-point registers (f0 thru f15) can be good targets for spilling address (integer) registers. For reference, the ISA manual says that [RW]FR machine i

[COMMITTED 13/31] ada: Crash on b3a1004 with assertions enabled

2025-09-11 Thread Marc Poulhiès
From: Javier Miranda The compilation of files b3a10041.ads and b3a10042.adb crash when the compiler is built with assertions enabled. gcc/ada/ChangeLog: * freeze.adb (Freeze_Entity): Protect call to Associated_Storage_Pool since it cannot be used when the Etype is not set.

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

2025-09-11 Thread Trevor Gross
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` > > functions return `CMPtype`, the size of which is det

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

2025-09-11 Thread Harald Anlauf
Hi Jerry! Am 11.09.25 um 21:30 schrieb Jerry D: On 9/11/25 11:28 AM, Harald Anlauf wrote: Dear all, here's a - once found - seemingly simple and obvious fix for a memory corruption happening when intrinsic assignment is used to set a scalar allocatable polymorphic component of a derived type w

Re: [PATCH] x86-64: mingw: Pass and return _Float16 in vector registers [PR115054]

2025-09-11 Thread Trevor Gross
On Thu, Sep 11, 2025 at 1:09 PM Trevor Gross wrote: > (Returning i128 indirectly and f128 in xmm0 would also match the SysV > return ABI.) Slight clarification here the SysV ABI says that i128 can be represented as a 16-aligned struct: typedef struct { long low, high; } __int128;

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

2025-09-11 Thread Harald Anlauf
Dear all, here's a - once found - seemingly simple and obvious fix for a memory corruption happening when intrinsic assignment is used to set a scalar allocatable polymorphic component of a derived type when the latter is instanciated as an array of rank > 0. Just get the dimension attribute rig

Re: [PATCH] x86-64: mingw: Pass and return _Float16 in vector registers [PR115054]

2025-09-11 Thread Trevor Gross
On Wed Sep 10, 2025 at 2:41 AM EDT, LIU Hao wrote: > 在 2025-9-10 13:41, Trevor Gross 写道: >> Just following up here, how would you like me to proceed LH? >> > > I agree that `_Float16` should be passed in a vector register, because the > hardware expects it, like in > `vcvtph2ps xmm0, xmm1` and t

[COMMITTED 08/31] ada: Disable signals when calling pthread_create on QNX

2025-09-11 Thread Marc Poulhiès
From: Johannes Kliemann The QNX Certified Products Defect Notification from February 2025 mentions a potential memory leak when pthread_create is interrupted by a signal. It recommends to disable signals for this function call. gcc/ada/ChangeLog: * adaint.c: Add functions to disable and

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

2025-09-11 Thread Robin Dapp
Hmm, so the existing "punning" code for VMAT_STRIDED_SLP does tree vtype = vector_vector_composition_type (vectype, const_nunits / n, &ptype); if (vtype != NULL_TREE) {

Re: [PATCH v3 1/1] c, objc: Deprecate more than one list of forward declarations of parameters

2025-09-11 Thread Joseph Myers
On Thu, 11 Sep 2025, Alejandro Colomar wrote: > Warn about this: > > void f(int x; int x; int x); > > This would allow eventually adding another semicolon in function > prototypes to separate a different feature. I don't think that's a plausible future addition. The small visual differe

[PATCH v2] libstdc++: Rework handling of ISO week calendar and week index formatting.

2025-09-11 Thread Tomasz Kamiński
The handling of ISO week-calendar year specifiers (%G, %g) and ISO week number (%V) was merged into a single _M_g_G_V function, as the latter requires ISO year value, computed by the former. The values for %U and %W, which are based on the number of days since the first Sunday and Monday of the ye

[PATCH v2] RISC-V: Implement RISC-V profile macro support

2025-09-11 Thread Zhongyao Chen
From: Zhongyao Chen users can now write code like the following to adapt to the current RISC-V profile selected at compile time: ```c #ifdef __riscv_rva23u64 // Code specific to the rva23u64 profile #endif ``` Changes since v1: add testcases gcc/ * common/config/riscv/r

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

2025-09-11 Thread Kito Cheng
Seems like I also implement that on qemu many years ago: https://github.com/kito-cheng/riscv-qemu/tree/q-ext-dev Feel free to take it On Thu, Sep 11, 2025 at 9:54 PM Liao Shihua wrote: > > Ok,I will try to implement it in QEMU and send the second version of > the patch. > > 在 2025/9/11 21:18,

Re: [PATCH v2] libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890]

2025-09-11 Thread Patrick Palka
On Thu, 11 Sep 2025, Jonathan Wakely wrote: > Whenever we use operator+ or similar operators on random access > iterators we need to be careful to use the iterator's difference_type > rather than some other integer type. It's not guaranteed that an > expression with an arbitrary integer type, such

[PATCH v2] libstdc++: Fix algorithms to use iterators' difference_type for arithmetic [PR121890]

2025-09-11 Thread Jonathan Wakely
Whenever we use operator+ or similar operators on random access iterators we need to be careful to use the iterator's difference_type rather than some other integer type. It's not guaranteed that an expression with an arbitrary integer type, such as `it + 1u`, has the same effects as `it + iter_dif

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

2025-09-11 Thread Robin Dapp
Ah great! Does it just take a mask? could you point me to some docs? You mean just a mask and not a length? No, (almost) all our insns are length-masked. Specs are here: https://github.com/riscvarchive/riscv-v-spec/blob/master/v-spec.adoc#165-vector-compress-instruction -- Regards Robin

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

2025-09-11 Thread Luc Grosheintz
On 9/11/25 14:41, Tomasz Kaminski wrote: On Thu, Sep 11, 2025 at 1:50 PM Luc Grosheintz wrote: Changes since v1: - Use cmp_* when comparing two integers of differnt types. - Remove the FTM submdspan and replace it with an unofficial purely internal FTM called padded_layouts. -

[committed] libstdc++: Remove trailing whitespace in

2025-09-11 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/std/syncstream: Remove trailing whitespace. --- Pushed to trunk. diff --git a/libstdc++-v3/include/std/syncstream b/libstdc++-v3/include/std/syncstream index 92fbbdc760e7..1e1759714c69 100644 --- a/libstdc++-v3/include/std/syncstream +++ b/libstdc++-

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

2025-09-11 Thread Jeff Law
On 9/11/25 1:28 AM, Kito Cheng wrote: 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. Note that I do

Re: [PATCH 2/2] libstdc++: Use consteval for _S_noexcept() helper functions

2025-09-11 Thread Tomasz Kaminski
On Thu, Sep 11, 2025 at 2:18 PM Jonathan Wakely wrote: > These _S_noexcept() functions are only used in noexcept-specifiers and > never need to be called at runtime. They can be immediate functions, > i.e. consteval. > > libstdc++-v3/ChangeLog: > > * include/bits/iterator_concepts.h (_Ite

[PATCH 2/2] libstdc++: Use consteval for _S_noexcept() helper functions

2025-09-11 Thread Jonathan Wakely
These _S_noexcept() functions are only used in noexcept-specifiers and never need to be called at runtime. They can be immediate functions, i.e. consteval. libstdc++-v3/ChangeLog: * include/bits/iterator_concepts.h (_IterMove::_S_noexcept) (_IterSwap::_S_noexcept): Change constexp

[PATCH 1/2] libstdc++: Add always_inline to ranges iterator ops and access functions

2025-09-11 Thread Jonathan Wakely
Most of the basis operations for ranges such as ranges::begin and ranges::next are trivial one-line function bodies, so can be made always_inline to reduce the abstraction penalty for -O0 code. Now that we no longer need to support the -fconcepts-ts grammar, we can also move some [[nodiscard]] att

Re: [PATCH] tree-optimization/121703 - UBSAN error with moving from uninit data

2025-09-11 Thread Jonathan Wakely
On Fri, 5 Sept 2025 at 13:54, Richard Biener wrote: > > The PR reports > > vectorizer.h:276:3: runtime error: load of value 32695, which is not a valid > value for type 'internal_fn' > > which I believe is from > > slp_node->data = new vect_load_store_data (std::move (ls)); > > where 'ls' c

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

2025-09-11 Thread Robin Dapp
So AVX512 has vcompressp{d,s} and vexpandp{d,s} (but nothing for smaller integer element types). Those could be used for this but they have a vector result (and element zero would be the first active). But don't you possibly want the last inactive as well, dependent on whether this is a peeled/n

Re: [PATCH v2 4/5] libstdc++: Refactor __mdspan::__static_quotient.

2025-09-11 Thread Tomasz Kaminski
On Thu, Sep 11, 2025 at 1:48 PM Luc Grosheintz wrote: > For padded layouts we want to check that the product of the > padded stride with the remaining extents is representable. > > Creating a second overload, allows passing in subspans of the > static extents and retains the ergonomics for the co

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

2025-09-11 Thread Richard Biener
On Thu, 11 Sep 2025, Tamar Christina wrote: > This email is to discuss the optabs and IFNs that I will need to finish off > the > early break optimizations in GCC 16 and to minimize respins on the final > patches. > > Optabs only, These will be handled through expand rewriting them if the > ta

Re: [PATCH v2 2/5] libstdc++: Fix bug in layout mapping tests.

2025-09-11 Thread Tomasz Kaminski
On Thu, Sep 11, 2025 at 1:42 PM Luc Grosheintz wrote: > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/mdspan/layouts/mapping.cc > (test_stride_1d): Fix test. > > Signed-off-by: Luc Grosheintz > --- LGTM. > libstdc++-v3/testsuite/23_containers/mdspan/layouts/mapping.cc

[PATCH v2 2/5] libstdc++: Fix bug in layout mapping tests.

2025-09-11 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * testsuite/23_containers/mdspan/layouts/mapping.cc (test_stride_1d): Fix test. Signed-off-by: Luc Grosheintz --- libstdc++-v3/testsuite/23_containers/mdspan/layouts/mapping.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-

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

2025-09-11 Thread Luc Grosheintz
Changes since v1: - Use cmp_* when comparing two integers of differnt types. - Remove the FTM submdspan and replace it with an unofficial purely internal FTM called padded_layouts. - Make __get_static_stride consteval. - Make __is_*_padded_layout only available inside __glibcxx_padde

RE: [PATCH] AArch64: Add isfinite expander [PR 66462]

2025-09-11 Thread Tamar Christina
> -Original Message- > From: Wilco Dijkstra > Sent: Wednesday, September 10, 2025 5:25 PM > To: Tamar Christina ; GCC Patches patc...@gcc.gnu.org> > Cc: Kyrylo Tkachov ; Alex Coplan > ; Andrew Pinski ; Alice Carlotti > > Subject: Re: [PATCH] AArch64: Add isfinite expander [PR 66462] > >

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

2025-09-11 Thread Richard Biener
On Tue, Sep 9, 2025 at 10:39 PM Matteo Nicoli wrote: > > Dear Richard, > > You are right, there was a typo in my patch. I removed the duplicate */ and > updated the description of the test in the commit description. Thanks. I have bootstrapped and tested this on x86_64-unknown-linux-gnu (please

Re: [PATCH][PR104116] Add vectorization logic for floor_{mod,div}

2025-09-11 Thread Richard Biener
On Wed, 10 Sep 2025, Avinash Jayakar wrote: > Hi, > > The following patch implements the vectorization logic for FLOOR_MOD_EXPR and > FLOOR_DIV_EXPR. According to the logic mentioned in the PR, we have > For signed operands, > r = x %[fl] y;

Re: [PATCH V3 1/2] Match: Support SAT_TRUNC variant NARROW_CLIP

2025-09-11 Thread Richard Biener
On Mon, Sep 8, 2025 at 7:58 PM Edwin Lu wrote: > > This patch tries to add support for a variant of SAT_TRUNC where > negative numbers are clipped to 0 instead of NARROW_TYPE_MAX_VALUE. > This form is seen in x264, aka > > UT clip (T a) > { > return a & (UT)(-1) ? (-a) >> 31 : a; > } > > Where s

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

2025-09-11 Thread Richard Biener
On Mon, Sep 8, 2025 at 3:19 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 o

Re: [PATCH v3][PR119702] rs6000: Use vector addition when left shifting by 1

2025-09-11 Thread Surya Kumari Jangala
Hi Avinash, On 08/09/25 2:54 pm, Avinash Jayakar wrote: > Hi, > > This is the third version of the patch proposed for master aiming to fix > PR119702. Requesting review of this patch. > > The following sequence of assembly in powerpc64le > vspltisw 0,1 > vsld 2,2,0 > is replaced by

[PATCH] libstdc++: Rework handling of ISO week calendar and week index formatting.

2025-09-11 Thread Tomasz Kamiński
The handling of ISO week-calendar year specifiers (%G, %g) and ISO week number (%V) was merged into a single _M_g_G_V function, as the latter requires ISO year value, computed by the former. The values for %U and %W, which are based on the number of days since the first Sunday and Monday of the ye

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

2025-09-11 Thread Robin Dapp
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 it before emitting the gather/scatter. In the same way the cost

[COMMITTED 31/31] ada: add BACKLOG_MAX OS constant

2025-09-11 Thread Marc Poulhiès
BACKLOG_MAX represents the number of outstanding connections in the socket's listen queue. gcc/ada/ChangeLog: * libgnat/g-socket.adb (Listen_Socket): Change default value. * libgnat/g-socket.ads (Listen_Socket): Likewise. * s-oscons-tmplt.c (BACKLOG_MAX): New. Tested on x

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

2025-09-11 Thread Alejandro Colomar
Hi, Here's v3, this time a proper patch, tested for regressions, and with tests and ChangeLog entries. It only contains a trivial fix in the tests since v2. See a reply to v2 for the results of regression testing. You can check that the commit hash of those tests corresponds to the commit hash

[COMMITTED 19/31] ada: Tune description of Ghost_Assertion_Level

2025-09-11 Thread Marc Poulhiès
From: Piotr Trojanek Fix grammar in comment. gcc/ada/ChangeLog: * einfo.ads (Ghost_Assertion_Level): Fix comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo.ads | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/einfo.ads b/gcc/

[COMMITTED 25/31] ada: Perform predicate check before, not after, parameter copy back.

2025-09-11 Thread Marc Poulhiès
From: Steve Baird In the case of a call to a subprogram that has an out (or in-out) parameter that is passed by copy, the caller performs copy-back after the call returns. If the actual parameter is a view conversion to a subtype that has an enabled predicate, then the predicate check performed a

[COMMITTED 21/31] ada: Ignore ghost policy errors inside aspect Iterable

2025-09-11 Thread Marc Poulhiès
From: Viljar Indus It is OK to define a checked ghost type with an iterable aspect that has ignored Iterable functions. gcc/ada/ChangeLog: * ghost.adb (Check_Ghost_Policy): Avoid triggering a ghost policy error if the policy is referenced within the Iterable aspect. Tes

[COMMITTED 26/31] ada: Implement overflow checking for unsigned types

2025-09-11 Thread Marc Poulhiès
From: Eric Botcazou The implementation is essentially mirrored from the one for signed types. gcc/ada/ChangeLog: * gcc-interface/gigi.h (standard_datatypes): Add ADT_uns_mulv64_decl and ADT_uns_mulv128_decl. (uns_mulv64_decl): New macro. (uns_mulv128_decl): Likew

[COMMITTED 15/31] ada: Fix regression in Root_Type -- adjustment

2025-09-11 Thread Marc Poulhiès
From: Bob Duff Recent changes "Fix regression in Root_Type" and "Crash on b3a1004 with assertions enabled" are partially redundant; they are addressing the same bug. This patch adjusts the former in the case of Root_Type. But we leave Root_Type_If_Set alone; debugging printouts should survive bug

[COMMITTED 12/31] ada: Fix argument type of read() and write() on windows

2025-09-11 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * libgnat/s-crtl.ads: define unsigned * libgnat/s-crtl__mingw.adb (read, write): change arg type Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-crtl.ads| 3 +++ gcc/ada/libgnat/s-crtl__mingw.adb | 8

[COMMITTED 04/31] ada: Better warning when single letter package conflicts with predefined unit naming

2025-09-11 Thread Marc Poulhiès
From: Denis Mazzucato This patch improves the warning message when the actual file name of a child package with a single letter parent isn't the expected one because it may collide with a predefined unit name. The warning explain why in this specific case the expected name is not the standard one

[COMMITTED 09/31] ada: Make pp and friends more robust (base type only)

2025-09-11 Thread Marc Poulhiès
From: Bob Duff Prior to this fix, if pp(N) tried to print a "base type only" field, and Base_Type(N) was not yet set, it would raise an exception, which was confusing. This patch makes it simply ignore such fields. Similarly for Impl_Base_Type_Only and Root_Type_Only fields. We do this by having

[COMMITTED 10/31] ada: Crash on null aggregate of multidimensional type

2025-09-11 Thread Marc Poulhiès
From: Javier Miranda A compiler built with assertions enabled crashes processing a null aggregate of multidimensional type. gcc/ada/ChangeLog: * sem_aggr.adb (Report_Null_Array_Constraint_Error): Adjust code for reporting the error on enumeration types. (Resolve_Null_Arr

[COMMITTED 05/31] ada: Fix compile time evaluation needed for static unfoldings

2025-09-11 Thread Marc Poulhiès
From: Denis Mazzucato Unfolding of static expressions is needed when evaluating static bounds, even in the presence of strict analysis. Otherwise, we may wrongly identify static predicates as dynamic ones, and thus require unnecessary "others" default case. gcc/ada/ChangeLog: * sem_attr

[COMMITTED 02/31] ada: Improve documentation comment of Find_Type_Name

2025-09-11 Thread Marc Poulhiès
From: Ronan Desplanques The meaning of the return value of Find_Type_Name depends greatly on whether the declaration it's passed is a completion. This patch adds a description of this to the documentation comment of Find_Type_Name. gcc/ada/ChangeLog: * sem_ch3.ads (Find_Type_Name): Impr

  1   2   >