Re: [PATCH] RISC-V: testsuite: Skip tests providing -march/-mcpu for ILP32E/ILP64E ABIs

2025-07-01 Thread Kito Cheng
OK :) On Wed, Jul 2, 2025 at 12:22 PM Dimitar Dimitrov wrote: > > Some test cases explicitly set -march or -mcpu with extensions which > are not compatible with the E ABI variants. This leads to spurious > errors when toolchain has been configured for RV32E base ISA and > ILP32E ABI: > cc1: er

[PATCH v3 4/4] RISC-V: Add test cases for unsigned scalar SAT_MUL from uint128_t

2025-07-01 Thread pan2 . li
From: Pan Li Add run and tree-optimized check for unsigned scalar SAT_MUL from uint128_t. gcc/testsuite/ChangeLog: * gcc.target/riscv/sat/sat_arith.h: Add test helper macros. * gcc.target/riscv/sat/sat_arith_data.h: Add test data for run test. * gcc.target/riscv/

[PATCH v3 3/4] RISC-V: Implement unsigned scalar SAT_MUL from uint128_t

2025-07-01 Thread pan2 . li
From: Pan Li This patch would like to implement the SAT_MUL scalar unsigned from uint128_t, aka: NT __attribute__((noinline)) sat_u_mul_##NT##_fmt_1 (NT a, NT b) { uint128_t x = (uint128_t)a * (uint128_t)b; NT max = -1; if (x > (uint128_t)(max)) return max; else

[PATCH v3 0/4] Support unsigned scalar SAT_MUL from uint128_t

2025-07-01 Thread pan2 . li
From: Pan Li This patch series would like to support the unsigned SAT_MUL with the help of uint128_t. Aka: NT __attribute__((noinline)) sat_u_mul_##NT##_fmt_1 (NT a, NT b) { uint128_t x = (uint128_t)a * (uint128_t)b; NT max = -1; if (x > (uint128_t)(max)) return max; else return

[PATCH v3 2/4] Widening-Mul: Support unsigned scalar SAT_MUL form 1

2025-07-01 Thread pan2 . li
From: Pan Li This patch would like to try to match the SAT_MUL during widening-mul pass, aka below pattern. NT __attribute__((noinline)) sat_u_mul_##NT##_fmt_1 (NT a, NT b) { uint128_t x = (uint128_t)a * (uint128_t)b; NT max = -1; if (x > (uint128_t)(max)) return max;

[PATCH v3 1/4] Internal-fn: Introduce new IFN_SAT_MUL for unsigned int

2025-07-01 Thread pan2 . li
From: Pan Li This patch would like to add the middle-end presentation for the unsigend saturation mul. Aka set the result of mul to the max when overflow. Take uint8_t as example, we will have: * SAT_MUL (1, 127) => 127. * SAT_MUL (2, 127) => 254. * SAT_MUL (3, 127) => 255. * SAT_MUL (25

Re: [PATCH 1/1] [RFC][AutoFDO] Propagate information to outline copies if not inlined

2025-07-01 Thread Dhruv Chawla
On 02/07/25 07:26, Kugan Vivekanandarajah wrote: Given the latest few patches that you have committed, is this patch necessary anymore? I have not fully understood the new logic as I was on holiday last week, but it looks like the propagation is occurring correctly now? I think you are ref

[PATCH] RISC-V: testsuite: Skip tests providing -march/-mcpu for ILP32E/ILP64E ABIs

2025-07-01 Thread Dimitar Dimitrov
Some test cases explicitly set -march or -mcpu with extensions which are not compatible with the E ABI variants. This leads to spurious errors when toolchain has been configured for RV32E base ISA and ILP32E ABI: cc1: error: ILP32E ABI does not support the 'D' extension Also, test gcc.target/ri

[PATCH] tail-call: Allow tail recusion for classes with RVO (TREE_ADDRESSABLE set) [PR120871]

2025-07-01 Thread Andrew Pinski
With struct returns, we normally get a decl on the LHS of the call expression that will be tail called and we can match things up there easy. With TREE_ADDRESSABLE set on the type, things get more complex. Instead we get: ``` *_6(D) = get_s (1); [return slot optimization] ... return _6(D); ```

Re: [RFC PATCH v2 3/3] Add -ftarget-clones-table option support

2025-07-01 Thread Yangyu Chen
> On 30 Jun 2025, at 17:55, Alfie Richards wrote: > > On 29/06/2025 19:57, Yangyu Chen wrote: >> This patch adds support for target_clones table option. The >> target_clones table option allows users to specify multiple versions >> of a function and select the version at runtime based on the s

RE: [PATCH] i386: Change Diamond Rapids feature detect when model number could not be distinguished

2025-07-01 Thread Liu, Hongtao
> -Original Message- > From: Jiang, Haochen > Sent: Wednesday, July 2, 2025 11:10 AM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com > Subject: [PATCH] i386: Change Diamond Rapids feature detect when model > number could not be distinguished > > Hi all, > > We wil

[PATCH] i386: Change Diamond Rapids feature detect when model number could not be distinguished

2025-07-01 Thread Haochen Jiang
Hi all, We will use AMX-FP8 for DMR since it is a smaller and more unique feature. Ok for trunk and backport to GCC 15? Thx, Haochen gcc/ChangeLog: * config/i386/driver-i386.cc (host_detect_local_cpu): Change to AMX-FP8 for Diamond Rapids. --- gcc/config/i386/driver-i386.cc |

RE: [PATCH v2 2/2] RISC-V: Add testcases for signed scalar SAT_ADD IMM form 2

2025-07-01 Thread Li, Pan2
Ok, but please use "Add" instead of "add" in change log before commit, I suppose xuli can help to commit patches. > * gcc.target/riscv/sat/sat_arith.h: add signed scalar SAT_ADD IMM form2. Pan -Original Message- From: Ciyan Pan Sent: Tuesday, July 1, 2025 2:19 PM To: gcc-patches@gcc.g

Re: [PATCH 1/1] [RFC][AutoFDO] Propagate information to outline copies if not inlined

2025-07-01 Thread Kugan Vivekanandarajah
> > Given the latest few patches that you have committed, is this patch necessary > anymore? I have not fully understood the new logic as I was on holiday last > week, but it looks like the propagation is occurring correctly now? > I think you are referring to the patch “Avoid some lost AFDO p

[PATCH] check-function-bodies: Support "^[0-9]+:"

2025-07-01 Thread H.J. Lu
While working on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120881 I tried to use check-function-bodies to verify that 1: call mcount generated by "-pg" is placed at the function entry. Add "^[0-9]+:" to check-function-bodies to allow: 1: call mcount PR testsuite/120881 * lib/scanasm.exp (

[PATCH v2] configury: replace autoconf obsolete macros [PR103459]

2025-07-01 Thread Pietro Monteiro
Autoreconf -Wall complains about obsolete macros, so replace them according to the autoconf documentation[0]. This patch doesn't fully fix all warnings because I focused on doing simple fixes and keeping the changes to the generated files to a minimum. Bootstrapped and retested on x86_64-linux-gn

Re: [PATCH] configury: replace autoconf obsolete macros [PR/103459]

2025-07-01 Thread Pietro Monteiro
On Fri, Jun 13, 2025, at 5:01 PM, Joseph Myers wrote: > On Fri, 13 Jun 2025, Pietro Monteiro wrote: > >> > Adding this \ at end of file looks suspect. >> > >> > OK with that ChangeLog entry fixed and the stray \ at end of file removed >> > (assuming the same output files are still generated after

[PATCH] libstdc++: Members missing in std::numeric_limits

2025-07-01 Thread Mateusz Zych
Hello libstdc++ Team! I have recently found a bug in libstdc++, that is, the std::numeric_limits<> template specializations for integer-class types are missing some of static data members, which results in compilation errors of valid C++ code: - Compiler Explorer: https://godbolt.org/z/E7z4WYf

[PATCH] libstdc++: make range view ctors explicit (P2711) [PR119744]

2025-07-01 Thread Nathan Myers
Make range view constructors explicit, per P2711. Technically, this is a breaking change, but it is unlikely to break any production code, as reliance on non-explicit construction is unidiomatic.. libstdc++-v3/ChangeLog PR libstdc++/119744 * include/std/ranges: view ctors become ex

[PATCH] libstdc++: construct bitset from string_view (P2697) [PR119742]

2025-07-01 Thread Nathan Myers
Add a bitset constructor from string_view, with other arguments matching the constructor from string. Test in ways that exercise code paths not checked in existing tests for other constructors. Fix existing tests that would fail to detect incorrect exception behavior. libstdc++-v3/ChangeLog:

Re: [PATCH] c++, libstdc++, v2: Implement C++26 P2830R10 - Constexpr Type Ordering

2025-07-01 Thread Jason Merrill
On 6/26/25 6:33 AM, Jakub Jelinek wrote: On Wed, Jun 25, 2025 at 10:58:59PM +0200, Maciej Cencora wrote: update of std module is missing. Here is an updated patch which adds the std module part and while I was changing the patch, I've also added value_type/type and the 2 operators to std::type

Re: [PATCH] c-family: Check backend for argument alignment on stack

2025-07-01 Thread H.J. Lu
On Tue, Jul 1, 2025 at 9:37 PM Jason Merrill wrote: > > On 6/30/25 7:03 PM, H.J. Lu wrote: > > On Mon, Jun 30, 2025 at 10:36 PM Jason Merrill wrote: > >> > >> On 6/28/25 7:00 AM, H.J. Lu wrote: > >>> Since a backend may ignore user type alignment for arguments passed on > >>> stack, check backend

Re: [PATCH v4 2/6] dwarf: create annotation DIEs for btf tags

2025-07-01 Thread David Faust
On 7/1/25 01:02, Richard Biener wrote: > On Mon, Jun 30, 2025 at 9:12 PM David Faust wrote: >> >> >> >> On 6/30/25 06:11, Richard Biener wrote: +static void +gen_btf_decl_tag_dies (tree t, dw_die_ref target, dw_die_ref context_die) +{ + if (t == NULL_TREE || !DECL_P (t) ||

Re: [PATCH v2 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-07-01 Thread Jonathan Wakely
On Tue, 1 Jul 2025 at 11:32, Tomasz Kaminski wrote: > > Hi, > More of the review will be later, but I have noticed that you have added > preconditions checks > to the layouts, and then avoid checking them inside the operator[] of the > mdspan. This is general > sounds good. > > However, the prec

Re: [PATCH] libstdc++: Make debug iterator pointer sequence const [PR116369]

2025-07-01 Thread Jonathan Wakely
On Mon, 16 Jun 2025 at 18:36, François Dumont wrote: > > I eventually wonder if it is such a big deal to add the new symbols for > _GLIBCXX_DEBUG mode. I like this version much more than the one trying to duplicate symbols with asm. > Here is the patch doing this. It avoids to add many const_c

Re: [PATCH] c++: Fix FMV return type ambiguation

2025-07-01 Thread Jason Merrill
On 6/30/25 4:25 AM, Alfie Richards wrote: Hi Jeff, Yes agreed, I've respun this to be standalone and moved the relevant test from another patch to this. Sending again for reapproval in an abbundance of caution. Regr tested on Aarch64 and x86. Thanks, Alfie -- >8 -- Add logic for the case of

Re: [PATCH] libstdc++: Make debug iterator pointer sequence const [PR116369]

2025-07-01 Thread Jonathan Wakely
On Mon, 23 Jun 2025 at 18:19, François Dumont wrote: > > Hi > > Even if you have no time to review this for now could you only answer the > question below that is to say: > > Should the current _GLIBCXX_INLINE_VERSION abi be preserved ? No, that's not necessary > > Thanks > > On 16/06/2025 19:

Re: [PATCH] Fortran: fix minor issues with coarrays

2025-07-01 Thread Harald Anlauf
Am 01.07.25 um 21:54 schrieb Jerry D: On 7/1/25 12:51 PM, Harald Anlauf wrote: Dear all, the attached patch fixes the following minor issues found by running f951 under valgrind for the just added new testcases coindexed_6.f90 and coindexed_7.f90: - minor front-end memleaks with non-freed stri

Re: [PATCH] Fortran: fix minor issues with coarrays

2025-07-01 Thread Jerry D
On 7/1/25 12:51 PM, Harald Anlauf wrote: Dear all, the attached patch fixes the following minor issues found by running f951 under valgrind for the just added new testcases coindexed_6.f90 and coindexed_7.f90: - minor front-end memleaks with non-freed strings and lost GMP variables  (these are

[PATCH] Fortran: fix minor issues with coarrays

2025-07-01 Thread Harald Anlauf
Dear all, the attached patch fixes the following minor issues found by running f951 under valgrind for the just added new testcases coindexed_6.f90 and coindexed_7.f90: - minor front-end memleaks with non-freed strings and lost GMP variables (these are simple and obvious fixes) - an inconsiste

Re: [PATCH] testsuite, powerpc: Fix vsx-vectorize-* after alignment peeling [PR118567]

2025-07-01 Thread Segher Boessenkool
Hi! On Tue, Jul 01, 2025 at 08:39:26PM +0200, Jakub Jelinek wrote: > On Tue, Jul 01, 2025 at 12:04:04PM -0500, Segher Boessenkool wrote: > > On Mon, Feb 17, 2025 at 02:28:50PM +, Alex Coplan wrote: > > > After the recent alignment peeling enhancements in the vectorizer we > > > started vectori

[Ada] Fix PR ada/120705

2025-07-01 Thread Eric Botcazou
This fixes an assertion failure for the Finalizable aspect applied on a tagged type with discriminant-dependent component. Tested on x86-64/Linux, applied on the mainline and 15 branch. 2025-07-01 Eric Botcazou PR ada/120705 * exp_ch6.adb (Needs_BIP_Collection): Always retur

Re: [PATCH v2] RISC-V: Updated march , that aligned with mips-p8700

2025-07-01 Thread Maciej W. Rozycki
On Tue, 1 Jul 2025, Umesh Kalappa wrote: > *config/riscv/riscv-cores.def(RISCV_CORE):Updated the supported march. > *config/riscv/riscv-ext-mips.def(DEFINE_RISCV_EXT): >New file added for mips conditional mov extension. > *config/riscv/riscv-ext.def: Likewise. > *co

[PATCH] AArch64: Use correct cost for shifted halfword load/stores

2025-07-01 Thread Wilco Dijkstra
Since all Armv9 cores support shifted LDRH/STRH, use the correct cost of zero for these. Passes regress, OK for commit? gcc: * config/aarch64/tuning_models/generic_armv9_a.h (generic_armv9_a_addrcost_table): Use zero cost for himode. --- diff --git a/gcc/config/aarch64/tuning_mo

Re: [PATCH] testsuite, powerpc: Fix vsx-vectorize-* after alignment peeling [PR118567]

2025-07-01 Thread Jakub Jelinek
On Tue, Jul 01, 2025 at 12:04:04PM -0500, Segher Boessenkool wrote: > On Mon, Feb 17, 2025 at 02:28:50PM +, Alex Coplan wrote: > > After the recent alignment peeling enhancements in the vectorizer we > > started vectorizing the "checking" loops (that check for the right > > result) in gcc.targe

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-07-01 Thread Jason Merrill
On 7/1/25 10:57 AM, Florian Weimer wrote: * Jason Merrill: On 6/30/25 5:22 PM, Florian Weimer wrote: * Jason Merrill: On 6/28/25 3:17 PM, Florian Weimer wrote: * Jason Merrill: Since r10-6069[1] we control the call to __cxa_finalize with DEFAULT_USE_CXA_ATEXIT, so there's no need to also

Re: [PATCH] testsuite: Fix up gcc.target/powerpc/builtin_altivec_tr_stxvr_runnable.c test [PR120919]

2025-07-01 Thread Segher Boessenkool
Hi! On Tue, Jul 01, 2025 at 05:16:45PM +0200, Jakub Jelinek wrote: > This test seems to fail when testing with > RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" > on power10. Please mention near the start of the commit message (like, in the subject already!) that the testcase did

Re: [PATCH] testsuite, powerpc: Fix vsx-vectorize-* after alignment peeling [PR118567]

2025-07-01 Thread Segher Boessenkool
Hi! On Mon, Feb 17, 2025 at 02:28:50PM +, Alex Coplan wrote: > After the recent alignment peeling enhancements in the vectorizer we > started vectorizing the "checking" loops (that check for the right > result) in gcc.target/powerpc/vsx-vectorize-*.c, thus skewing the > expected counts of var

[PATCH v2] RISC-V: Updated march , that aligned with mips-p8700

2025-07-01 Thread Umesh Kalappa
Refactored ccmov insn rtl template to use code_iterator and fixed the indentation. No regressions are found for "runtest --tool gcc --target_board='riscv-sim/-mabi=lp64d/-mtune=mips-p8700/-O2 ' riscv.exp" *config/riscv/riscv-cores.def(RISCV_CORE):Updated the supported march. *con

[PATCH 2/2] aarch64: Drop const_int from aarch64_maskload_else_operand

2025-07-01 Thread Alex Coplan
The "else operand" to maskload should always be a const_vector, never a const_int. This was just an issue I noticed while looking through the code, I don't have a testcase which shows a concrete problem due to this. Testing of that change alone showed ICEs with load lanes vectorization and SVE.

[PATCH 1/2] doc: Clarify mode of else operand for vec_mask_load_lanesmn

2025-07-01 Thread Alex Coplan
This extends the documentation of the vec_mask_load_lanes optab to explicitly state that the mode of the else operand is n, i.e. the mode of a single subvector. OK to install? Thanks, Alex gcc/ChangeLog: * doc/md.texi (Standard Names): Clarify mode of else operand for vec_mask_l

[PATCH] testsuite: Fix up gcc.target/powerpc/builtin_altivec_tr_stxvr_runnable.c test [PR120919]

2025-07-01 Thread Jakub Jelinek
Hi! This test seems to fail when testing with RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" on power10. In my reading of the test and the instructions emitted by the builtins, it invokes UB 4 times, each time overwriting one byte after some variable (sc, then ss, then si and the

Re: [PATCH] s390: Add -fno-stack-protector to 3 tests

2025-07-01 Thread Jakub Jelinek
On Tue, Jul 01, 2025 at 03:47:53PM +0200, Stefan Schulze Frielinghaus wrote: > In the past years I have started to use more and more function body > checks whenever gcc emits optimal code for a function. With that I > wanted to make sure that we do not regress like introducing unnecessary > extend

Re: [PATCH v7 7/9] AArch64: precommit test for CMPBR instructions

2025-07-01 Thread Richard Sandiford
Richard Sandiford writes: > Karl Meakin writes: >> +// If the branch destination is out of range (1KiB), we have to generate an >> +// extra B instruction (which can handle larger displacements) and branch >> around >> +// it >> +int far_branch(i32 x, i32 y) { >> + volatile int z = 0; >> + if

RE: [COMMITTED] cobol: Normalize generating and using function_decls.

2025-07-01 Thread Robert Dubner
Oi. Rainer, I have lost track of when %zu is okay, and when it isn't. Jim has been making adjustments to printf formatting; I haven't been paying close attention. The statement you report came about because I made the wrong choice when deconflicting a merge of my stuff and Jim's, and I must

Re: [PATCH] aarch64: Enable selective LDAPUR generation for cores with RCPC2

2025-07-01 Thread Richard Sandiford
Soumya AR writes: > From 2a2c3e3683aaf3041524df166fc6f8cf20895a0b Mon Sep 17 00:00:00 2001 > From: Soumya AR > Date: Mon, 30 Jun 2025 12:17:30 -0700 > Subject: [PATCH] aarch64: Enable selective LDAPUR generation for cores with > RCPC2 > > This patch adds the ability to fold the address computati

[PATCH, V3] Add -mcpu=future to the PowerPC

2025-07-01 Thread Michael Meissner
This patch adds the support that can be used in developing GCC support for potential future PowerPC processors. These changes are being added so that hardware designers can evaluate potential new features to be added to the PowerPC processors in the future. It may be these features will be incorp

RE: [COMMITTED] cobol: Normalize generating and using function_decls.

2025-07-01 Thread Robert Dubner
> -Original Message- > From: Rainer Orth > Sent: Monday, June 30, 2025 10:27 > To: Robert Dubner > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [COMMITTED] cobol: Normalize generating and using > function_decls. > > Hi Robert, > > > These changes have been shown to generate more sensible co

[COMMITTED] cobol: Repair printf format of size_t.

2025-07-01 Thread Robert Dubner
>From 4e8cb6fb26abc2601850577d13bbc669beee0290 Mon Sep 17 00:00:00 2001 From: Robert Dubner Date: Tue, 1 Jul 2025 12:02:21 -0400 Subject: [PATCH] cobol: Repair printf format of size_t. gcc/cobol/ChangeLog: * parse.y: printf() of size_t is %zu, not %ld. --- gcc/cobol/parse.y | 2 +- 1 fi

Re: [PATCH] aarch64: Enable selective LDAPUR generation for cores with RCPC2

2025-07-01 Thread Kyrylo Tkachov
> On 1 Jul 2025, at 17:36, Richard Sandiford wrote: > > Soumya AR writes: >> From 2a2c3e3683aaf3041524df166fc6f8cf20895a0b Mon Sep 17 00:00:00 2001 >> From: Soumya AR >> Date: Mon, 30 Jun 2025 12:17:30 -0700 >> Subject: [PATCH] aarch64: Enable selective LDAPUR generation for cores with >> RCP

[COMMITTED] cobol: Update test case for intrinsic function syntax.

2025-07-01 Thread Robert Dubner
A recent update to the COBOL syntax checker resulted in this test case failing, so it needed to be fixed. >From f6c187a4f34b6925196279fd623f9f1396385a18 Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Tue, 1 Jul 2025 11:07:18 -0400 Subject: [PATCH] cobol: Update test ca

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-07-01 Thread Qing Zhao
> On Jul 1, 2025, at 03:14, Richard Biener wrote: > > On Mon, Jun 30, 2025 at 10:37 PM Qing Zhao wrote: >> >> Hi, David, >> >> Thank you for the info. >> >> Yes, this does sound like a general issue in this area. >> >> Is there any mechanism in GCC currently that records such original sour

Re: [PATCH v2] libstdc++: Lift locale initialization in main chrono format loop [PR110739]

2025-07-01 Thread Tomasz Kaminski
On Tue, Jul 1, 2025 at 4:57 PM Tomasz Kamiński wrote: > This patch lifts locale initialization from locale-specific handling > methods > into _M_format_to function, and pass the locale by const reference. > To avoid unnecessary computation of locale::classic(), we use > _Optional_locale, > and em

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-07-01 Thread Florian Weimer
* Jason Merrill: > On 6/30/25 5:22 PM, Florian Weimer wrote: >> * Jason Merrill: >> >>> On 6/28/25 3:17 PM, Florian Weimer wrote: * Jason Merrill: > Since r10-6069[1] we control the call to __cxa_finalize with > DEFAULT_USE_CXA_ATEXIT, so there's no need to also declare it as a

[PATCH v2] libstdc++: Lift locale initialization in main chrono format loop [PR110739]

2025-07-01 Thread Tomasz Kamiński
This patch lifts locale initialization from locale-specific handling methods into _M_format_to function, and pass the locale by const reference. To avoid unnecessary computation of locale::classic(), we use _Optional_locale, and emplace into it only for localized formatting (_M_spec._M_localized) o

[RFC PATCH 1/1] microblaze: add atomic test and set support

2025-07-01 Thread Neal Frager
This patch adds atomic test and set support for the microblaze arch. Fixes: pr118280 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118280 Test case added to testsuite/gcc.dg/atomic/atomic-pr118280.c Signed-off-by: Aayush Misra Signed-off-by: Neal Frager --- gcc/ChangeLog

Re: [PATCH v7 2/3] Use the counted_by attribute of pointers in builtinin-object-size.

2025-07-01 Thread Qing Zhao
Thanks a lot for the review. I will push the patch set. Qing > On Jul 1, 2025, at 02:34, Richard Biener wrote: > > On Tue, Jun 24, 2025 at 10:30 PM Qing Zhao wrote: >> >> gcc/ChangeLog: >> >>* tree-object-size.cc (access_with_size_object_size): Update comments >>for pointers

Re: [PATCH v2 4/5] libstdc++: Implement mdspan and tests.

2025-07-01 Thread Tomasz Kaminski
On Fri, Jun 27, 2025 at 11:37 AM Luc Grosheintz wrote: > Implements the class mdspan as described in N4950, i.e. without P3029. > It also adds tests for mdspan. > > libstdc++-v3/ChangeLog: > > * include/std/mdspan (mdspan): New class. > * src/c++23/std.cc.in: Add std::mdspan. >

[PATCH] Handle non default git configurations with mklog

2025-07-01 Thread Pierre-Emmanuel Patry
Mklog parses the diff content from prepare-commit-msg hook but fails when git has been configured with some options (eg. mnemonicPrefix). Forcing the default values for the prefixes and the algorithm would set a distinct diff configuration supported by mklog and prevent most failures. contrib/Chan

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-07-01 Thread Jason Merrill
On 6/30/25 5:22 PM, Florian Weimer wrote: * Jason Merrill: On 6/28/25 3:17 PM, Florian Weimer wrote: * Jason Merrill: Since r10-6069[1] we control the call to __cxa_finalize with DEFAULT_USE_CXA_ATEXIT, so there's no need to also declare it as a weak reference; if the target has __cxa_atexit

Re: [PATCH v2 3/5] libstdc++: Restructure mdspan tests to reuse IntLike.

2025-07-01 Thread Tomasz Kaminski
On Fri, Jun 27, 2025 at 11:16 AM Luc Grosheintz wrote: > The class IntLike is used for testing extents with user-defined classes > that convert to int. This commit places the class into a separate header > file. This allows it to be reused across different parts of the mdspan > related testsuite.

Re: [PATCH v2 2/5] libstdc++: Check prerequite of extents::extents.

2025-07-01 Thread Tomasz Kaminski
On Fri, Jun 27, 2025 at 11:29 AM Luc Grosheintz wrote: > Previously the prerequite of the extents ctors that > > static_extent(i) == dynamic_extent || extent(i) == other.extent(i). > > was not checked. This commit add the __glibcxx_assert and test it. > > libstdc++-v3/ChangeLog: > > *

Re: [PATCH] s390: Add -fno-stack-protector to 3 tests

2025-07-01 Thread Stefan Schulze Frielinghaus
Hi Jakub, On Tue, Jul 01, 2025 at 02:50:04PM +0200, Jakub Jelinek wrote: > Hi! > > In Fedora/RHEL we usually test with > make check RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" > because -fstack-protector-strong is used when building pretty much all the > packages. > > In the

Re: [PATCH] testsuite: i386: Fix gcc.target/i386/preserve-none-1.c on Solaris/x86

2025-07-01 Thread H.J. Lu
On Tue, Jul 1, 2025 at 4:47 PM Rainer Orth wrote: > > The new gcc.target/i386/preserve-none-1.c test currently FAILs on > Solaris/x86: > > FAIL: gcc.target/i386/preserve-none-1.c scan-assembler-not movq > > It needs -fomit-frame-pointer which this patch adds. > > Tested on i386-pc-solaris2.11 and

Re: [PATCH v2 4/5] libstdc++: Implement mdspan and tests.

2025-07-01 Thread Tomasz Kaminski
On Tue, Jul 1, 2025 at 3:44 PM Luc Grosheintz wrote: > > > On 7/1/25 12:44, Tomasz Kaminski wrote: > > Few initial comments. I will do a full-review with checks against wording > > later today or tomorrow. > > > > On Fri, Jun 27, 2025 at 11:37 AM Luc Grosheintz < > luc.groshei...@gmail.com> > > w

Re: [PATCH v2 5/5] libstdc++: Make mdspan nothrow movable.

2025-07-01 Thread Tomasz Kaminski
Put them into main mdspan commit. No harm in having them. On Tue, Jul 1, 2025 at 3:21 PM Luc Grosheintz wrote: > You're right, I remember checking this; but it appears I conned > myself. I've reverted the change to , do you want to keep > the tests? > > On 7/1/25 12:35, Tomasz Kaminski wrote: >

Re: [PATCH v2 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-07-01 Thread Luc Grosheintz
On 7/1/25 12:30, Tomasz Kaminski wrote: Hi, More of the review will be later, but I have noticed that you have added preconditions checks to the layouts, and then avoid checking them inside the operator[] of the mdspan. This is general sounds good. However, the precondition on mdspan::operator

Re: [PATCH 1/1] [RFC][AutoFDO] Propagate information to outline copies if not inlined

2025-07-01 Thread Dhruv Chawla
On 17/06/25 18:35, Jan Hubicka wrote: External email: Use caution opening links or attachments From: Dhruv Chawla This patch modifies afdo_set_bb_count to propagate profile information to outline copies of functions if they are not inlined. This information gets lost otherwise. Signed-off-b

Re: [PATCH v2 4/5] libstdc++: Implement mdspan and tests.

2025-07-01 Thread Luc Grosheintz
On 7/1/25 12:44, Tomasz Kaminski wrote: Few initial comments. I will do a full-review with checks against wording later today or tomorrow. On Fri, Jun 27, 2025 at 11:37 AM Luc Grosheintz wrote: Implements the class mdspan as described in N4950, i.e. without P3029. It also adds tests for md

Re: [PATCH] testsuite, powerpc: Fix vsx-vectorize-* after alignment peeling [PR118567]

2025-07-01 Thread Alex Coplan
On 27/02/2025 11:28, Alex Coplan wrote: > On 17/02/2025 14:28, Alex Coplan wrote: > > Hi, > > > > After the recent alignment peeling enhancements in the vectorizer we > > started vectorizing the "checking" loops (that check for the right > > result) in gcc.target/powerpc/vsx-vectorize-*.c, thus s

Re: [PATCH] c-family: Check backend for argument alignment on stack

2025-07-01 Thread Jason Merrill
On 6/30/25 7:03 PM, H.J. Lu wrote: On Mon, Jun 30, 2025 at 10:36 PM Jason Merrill wrote: On 6/28/25 7:00 AM, H.J. Lu wrote: Since a backend may ignore user type alignment for arguments passed on stack, check backend for argument alignment on stack when evaluating __alignof. I assume that's

Re: [PATCH v2 5/5] libstdc++: Make mdspan nothrow movable.

2025-07-01 Thread Luc Grosheintz
You're right, I remember checking this; but it appears I conned myself. I've reverted the change to , do you want to keep the tests? On 7/1/25 12:35, Tomasz Kaminski wrote: Hi, I do not think that the change is necessary, as for the functions default on the first declaration (as in the case for

Re: [PATCH v2] vect: Misalign checks for gather/scatter.

2025-07-01 Thread Richard Biener
On Fri, 27 Jun 2025, Robin Dapp wrote: > Hi, > > Changes from v1: > - Add gather_scatter argument to support_vector_misalignment. > - Don't rely on DR_BASE_ALIGNMENT. > - Add IFN helpers and use them. > - Add gather/scatter helper macros. > - Clarify is_packed handling in docs. > > This patch ad

Re: [PATCH] c++, v4: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-07-01 Thread Jason Merrill
On 7/1/25 3:10 AM, Jakub Jelinek wrote: On Mon, Jun 30, 2025 at 04:56:47PM -0400, Jason Merrill wrote: On 6/30/25 4:24 PM, Jakub Jelinek wrote: On Mon, Jun 30, 2025 at 03:55:46PM -0400, Jason Merrill wrote: Might go with my earlier !TREE_SIDE_EFFECTS && tree_invariant_p suggestion? If you me

[PATCH] s390: Add -fno-stack-protector to 3 tests

2025-07-01 Thread Jakub Jelinek
Hi! In Fedora/RHEL we usually test with make check RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" because -fstack-protector-strong is used when building pretty much all the packages. In the past Marek Polacek has committed tweaks to various tests to make them PASS in such testin

Re: [PATCH v3] AArch64 SIMD: convert mvn+shrn into mvni+subhn

2025-07-01 Thread Richard Sandiford
Remi Machet writes: > Attached is the updated patch for the aarch64 conversion of some > mvn+shrn patterns into a mvni+subhn. Hopefully attachment fixes the tab > issues, the cover letter was updated to better explain what the patch > does, code was changed to use emit_move_insn, and testcase w

[PING][PATCH v2 0/1] aarch64: Add support for unpacked SVE FP comparisons

2025-07-01 Thread Spencer Abson
Gentle ping for this patch. Thanks, Spencer On Mon, Jun 16, 2025 at 08:13:02PM +, Spencer Abson wrote: > Here is a V2 of patch 04/14 from the unpacked FP patch series [1], with the > changes discussed in that thread applied. The tests are also now based on VLA > codegen. > > Bootstrapped &

[COMMITTED 23/42] ada: use __builtin_alloca for alloca on vxworks

2025-07-01 Thread Marc Poulhiès
From: Alexandre Oliva Several adaint.c functions call alloca, but vxworks doesn't declare it. Use the GCC builtin. gcc/ada/ChangeLog: * adaint.c [__vxworks] (alloca): Redirect to builtin. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/adaint.c | 4 1 file chang

Re: [PATCH v7 4/9] AArch64: add constants for branch displacements

2025-07-01 Thread Richard Sandiford
Karl Meakin writes: > Extract the hardcoded values for the minimum PC-relative displacements > into named constants and document them. > > gcc/ChangeLog: > > * config/aarch64/aarch64.md (BRANCH_LEN_P_128MiB): New constant. > (BRANCH_LEN_N_128MiB): Likewise. > (BRANCH_LEN_P_1MiB):

[COMMITTED 07/42] ada: Clarify numeric parsing code

2025-07-01 Thread Marc Poulhiès
From: Ronan Desplanques This patch rephrases some code in System.Value_R to make it easier to read. gcc/ada/ChangeLog: * libgnat/s-valuer.adb (Scan_Decimal_Digits, Scan_Integral_Digits): Minor rephrasing. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat

[COMMITTED 24/42] ada: Replace references for GLADE with PolyORB

2025-07-01 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * doc/gnat_rm/implementation_advice.rst: remove GLADE * doc/gnat_rm/implementation_defined_characteristics.rst: remove GLADE * doc/gnat_rm/specialized_needs_annexes.rst: remove GLADE * doc/gnat_rm/the_gnat_library.rst: remove GLA

Re: [PATCH v2 1/5] libstdc++: Check prerequisites of layout_*::operator().

2025-07-01 Thread Tomasz Kaminski
Hi, More of the review will be later, but I have noticed that you have added preconditions checks to the layouts, and then avoid checking them inside the operator[] of the mdspan. This is general sounds good. However, the precondition on mdspan::operator[] is now hardened: https://eel.is/c++draft/

Re: [Fortran, Patch, PR120847 (was: PR120846), v1] Fix ICE when a function is called more than once in a coarray expression.

2025-07-01 Thread Andre Vehreschild
Hi Harald, thanks for review. Committed as gcc-16-1891-gee31ab9b195. Sorry for the typo in the email title. I should have proof read that before sending. I will set me a reminder to backport in a week to gcc-15. Thanks again, Andre On Mon, 30 Jun 2025 21:44:03 +0200 Harald Anlauf wrot

[COMMITTED 40/42] ada: Remove unused variables from the binder generation routine

2025-07-01 Thread Marc Poulhiès
From: Piotr Trojanek Remove leftovers from zero cost exception handling; semantics is unaffected. gcc/ada/ChangeLog: * ali.ads (Unit_Record): Fix grammar in comment. * bindgen.adb (Num_Elab_Calls, Num_Primary_Stacks): Remove counters that were only incremented and never

Re: [PATCH v2 4/5] libstdc++: Implement mdspan and tests.

2025-07-01 Thread Tomasz Kaminski
Few initial comments. I will do a full-review with checks against wording later today or tomorrow. On Fri, Jun 27, 2025 at 11:37 AM Luc Grosheintz wrote: > Implements the class mdspan as described in N4950, i.e. without P3029. > It also adds tests for mdspan. > > libstdc++-v3/ChangeLog: > >

Re: [PATCH v2 5/5] libstdc++: Make mdspan nothrow movable.

2025-07-01 Thread Tomasz Kaminski
Hi, I do not think that the change is necessary, as for the functions default on the first declaration (as in the case for the constructors/assigments for mdpsan) have noexcept specifier deduced from it body. In other words, I think the test should pass, without adding the complicated noexcept con

[COMMITTED 38/42] ada: Fix couple of issues in System.Value_D.Integer_To_Decimal function

2025-07-01 Thread Marc Poulhiès
From: Eric Botcazou The first issue is that the function would wrongly raise Constraint_Error on the edge case where Val = 2**(Int'Size - 1) and Minus is not set. The second issue is that the function takes a long time to deal with huge negative exponents. The change also contains minor consist

[COMMITTED 03/42] ada: Remove wrong optimization in frontend inlining of procedure calls

2025-07-01 Thread Marc Poulhiès
From: Piotr Trojanek When using obsolete frontend inlining (switch -gnatN), we must always rewrite the procedure call into a single block node. Otherwise, the copy-back of parameters passed by-copy is inserted before the inlined procedure body, which causes wrong code to be generated. gcc/ada/Ch

Re: [PATCH] tailc: Handle musttail in case of non-cleaned-up cleanups, especially ASan related [PR120608]

2025-07-01 Thread Jakub Jelinek
On Tue, Jul 01, 2025 at 10:55:00AM +0200, Jakub Jelinek wrote: > I've actually tried > --- gcc/passes.def2025-06-30 22:16:11.258688529 +0200 > +++ gcc/passes.def2025-07-01 10:47:37.020634803 +0200 > @@ -444,9 +444,9 @@ along with GCC; see the file COPYING3. >NEXT_PASS (pass_lower_switch

[COMMITTED 39/42] ada: Disallow underscore before exponent

2025-07-01 Thread Marc Poulhiès
From: Tonu Naks Underscore is allowed only between digits. The current implementattion was considering 'E' as a digit even if it was not in the range of Base and could denote exponent only. gcc/ada/ChangeLog: * libgnat/s-valuer.adb (Scan_Decimal_Digits, Scan_Integral_Digits): fi

Re: [PATCH v7 7/9] AArch64: precommit test for CMPBR instructions

2025-07-01 Thread Richard Sandiford
Karl Meakin writes: > Commit the test file `cmpbr.c` before rules for generating the new > instructions are added, so that the changes in codegen are more obvious > in the next commit. > > gcc/testsuite/ChangeLog: > > * lib/target-supports.exp: Add `cmpbr` to the list of extensions. >

Re: [PATCH 1/1] libstdc++: Implement default_accessor from mdspan.

2025-07-01 Thread Tomasz Kaminski
On Mon, Jun 30, 2025 at 4:27 PM Jonathan Wakely wrote: > On Mon, 30 Jun 2025 at 11:48, Tomasz Kaminski wrote: > > > > > > > > On Mon, Jun 30, 2025 at 9:58 AM Tomasz Kaminski > wrote: > >> > >> > >> > >> On Mon, Jun 30, 2025 at 9:25 AM Luc Grosheintz < > luc.groshei...@gmail.com> wrote: > >>> >

Re: [PATCH] libstdc++: Implement ranges::shift_left/right from P2440R1

2025-07-01 Thread Jonathan Wakely
On Mon, 30 Jun 2025 at 22:16, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > > Btw, any thoughts on PR105611 which reports std::shift_left/right's use > of the three-parameter version of ranges::next (on legacy iterators) is > sketchy? Should we define a th

[PATCH] testsuite: i386: Fix gcc.target/i386/preserve-none-1.c on Solaris/x86

2025-07-01 Thread Rainer Orth
The new gcc.target/i386/preserve-none-1.c test currently FAILs on Solaris/x86: FAIL: gcc.target/i386/preserve-none-1.c scan-assembler-not movq It needs -fomit-frame-pointer which this patch adds. Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. Ok for trunk? Rainer -- -

[committed] testsuite: Fix up pr119318.c test for big-endian [PR120082]

2025-07-01 Thread Jakub Jelinek
Hi! The test is not endianess clean, x[0] is supposed to be ((__int128)0x19)<<32 on little endian - 0x19 is in the second vector elt - but ((__int128)0x19)<<64 on big endian. I've added also verification of int and __int128 sizes just in case we have say 16-bit or 64-bit int target with __int128

Re: [PATCH v7 8/9] AArch64: rules for CMPBR instructions

2025-07-01 Thread Richard Sandiford
Karl Meakin writes: > @@ -763,6 +784,68 @@ (define_expand "cbranchcc4" >"" > ) > > +;; Emit a `CB (register)` or `CB (immediate)` instruction. > +;; The immediate range depends on the comparison code. > +;; Comparisons against immediates outside this range fall back to > +;; CMP + B. > +(de

Re: [PATCH] tailc: Handle musttail in case of non-cleaned-up cleanups, especially ASan related [PR120608]

2025-07-01 Thread Richard Biener
On Tue, 1 Jul 2025, Jakub Jelinek wrote: > On Tue, Jul 01, 2025 at 10:43:09AM +0200, Richard Biener wrote: > > > The following patch fixes that by > > > 1) moving the musttail pass 2 passes earlier (this is mostly just > > >for -O0/-Og, for normal optimization levels musttail calls are > > >

Re: [PATCH] tailc: Handle musttail in case of non-cleaned-up cleanups, especially ASan related [PR120608]

2025-07-01 Thread Jakub Jelinek
On Tue, Jul 01, 2025 at 11:23:48AM +0200, Richard Biener wrote: > > Given that empty_eh_cleanup handles already almost everything, just > > didn't know how to handle the resx to internal step which was quite > > trivial, I thought it will be easier not to reorder cleanup_eh pass, > > especially for

Re: [PATCH] aarch64: Sync `aarch64-sys-regs.def' with Binutils.

2025-07-01 Thread Kyrylo Tkachov
> On 17 Jun 2025, at 12:19, Kyrylo Tkachov wrote: > > > >> On 4 Apr 2025, at 20:28, ezra.sito...@arm.com wrote: >> >> From: Ezra Sitorus >> >> This patch updates `aarch64-sys-regs.def', bringing it into sync with >> the Binutils source after this change: >> https://sourceware.org/pipermail

[COMMITTED 35/42] ada: Warn on untagged record type equality

2025-07-01 Thread Marc Poulhiès
From: Javier Miranda The frontend reports a warning when no component of an untagged record type U is a record type, and the type C of some of its components has defined its user-defined equality operator "=". The warning is reported because it may be surprising that, following RM 4.5.2 (24/3),

  1   2   >