[PATCH 5/7 v2] RISC-V: Add support for the XAndesvsintload ISA

2025-06-27 Thread KuanLin Chen
Hi, This extension defines vector load instructions to move sign-extended or zero-extended INT4 data into 8-bit vector register elements. gcc/ChangeLog: * config/riscv/andes-vector-builtins-bases.cc (nds_nibbleload): New class. * config/riscv/andes-vector-builtins-bases.h

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

2025-06-27 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * include/std/mdspan (default_accessor): New class. * src/c++23/std.cc.in: Register default_accessor. * testsuite/23_containers/mdspan/accessors/default.cc: New test. * testsuite/23_containers/mdspan/accessors/default_neg.cc: New test. Signe

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

2025-06-27 Thread Luc Grosheintz
Previously the prerequisite that the arguments passed to operator() are a multi-dimensional index (of extents()) was not checked. This commit adds the __glibcxx_asserts and the required tests. libstdc++-v3/ChangeLog: * include/std/mdspan: Check prerequisites of layout_*::operator

[PATCH v2 0/5] Implement mdspan.

2025-06-27 Thread Luc Grosheintz
This is the second iteration of this patch series and the first also sent to gcc-patches. The individual patches can be restructured as desired. The final patch is a proposal to strengthen some exception guarantees to make mdspan nothrow movable. The standard doesn't require this; but I felt it m

[PATCH v4 0/1] Implement default_accessor.

2025-06-27 Thread Luc Grosheintz
This fourth iteration adds several additional tests to confirm the pointer convertiblity constraint of the ctor. Luc Grosheintz (1): libstdc++: Implement default_accessor from mdspan. libstdc++-v3/include/std/mdspan | 31 libstdc++-v3/src/c++23/std.cc.in |

[PATCH 6/7 v2] RISC-V: Add support for the XAndesvpackfph ISA extension.

2025-06-27 Thread KuanLin Chen
Hi Jeff, > You've added a new type (nds_vfpmad). You'll need to udpate all the > existing DFAs to handle insns with that type. Otherwise someone that > asks for code generation for your design, but a different tuning model > will get aborts. > It's generally considered OK to add them to a dummy

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

2025-06-27 Thread Luc Grosheintz
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. libstdc++-v3/ChangeLog: * testsuite/23_containers/mdsp

Re: [PATCH] libstdc++: Use runtime format for internal format calls in chrono [PR110739]

2025-06-27 Thread Tomasz Kaminski
On Fri, Jun 27, 2025 at 11:23 AM Jonathan Wakely wrote: > On Fri, 27 Jun 2025 at 10:10, Tomasz Kaminski wrote: > > > > > > > > On Fri, Jun 27, 2025 at 10:31 AM Tomasz Kamiński > wrote: > >> > >> This patch adjust all internal std::format call inside of > __formatter_chrono, > >> to use runtime

[PATCH] tree-optimization/120808 - SLP patterns with FMA/FMS

2025-06-27 Thread Richard Biener
The following amends the SLP addsub pattern to also match blends of .FMA/.FMS and form .FMADDSUB even when -ffp-contract=off. Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu. Richard. PR tree-optimization/120808 * tree-vect-slp-patterns.cc (vect_match_expression_p):

Re: [PATCH] libstdc++: Use runtime format for internal format calls in chrono [PR110739]

2025-06-27 Thread Jonathan Wakely
On Fri, 27 Jun 2025 at 11:01, Tomasz Kaminski wrote: > > > > On Fri, Jun 27, 2025 at 11:23 AM Jonathan Wakely wrote: >> >> On Fri, 27 Jun 2025 at 10:10, Tomasz Kaminski wrote: >> > >> > >> > >> > On Fri, Jun 27, 2025 at 10:31 AM Tomasz Kamiński >> > wrote: >> >> >> >> This patch adjust all int

Re: [PATCH] tree-optimization/120780: Support object size for containing objects

2025-06-27 Thread Siddhesh Poyarekar
On 2025-06-27 07:40, Siddhesh Poyarekar wrote: MEM_REF cast of a subobject to its containing object has negative offsets, which objsz sees as an invalid access. Support this use case by peeking into the structure to validate that the containing object indeed contains a type of the subobject at t

Re: [PATCH] libstdc++: Use runtime format for internal format calls in chrono [PR110739]

2025-06-27 Thread Tomasz Kaminski
On Fri, Jun 27, 2025 at 11:23 AM Jonathan Wakely wrote: > On Fri, 27 Jun 2025 at 10:10, Tomasz Kaminski wrote: > > > > > > > > On Fri, Jun 27, 2025 at 10:31 AM Tomasz Kamiński > wrote: > >> > >> This patch adjust all internal std::format call inside of > __formatter_chrono, > >> to use runtime

Re: [PATCH] tree-optimization/120780: Support object size for containing objects

2025-06-27 Thread Richard Biener
> Am 27.06.2025 um 13:40 schrieb Siddhesh Poyarekar : > > MEM_REF cast of a subobject to its containing object has negative > offsets, which objsz sees as an invalid access. Support this use case > by peeking into the structure to validate that the containing object > indeed contains a type o

Re: [PATCH] tree-optimization/120780: Support object size for containing objects

2025-06-27 Thread Jakub Jelinek
On Fri, Jun 27, 2025 at 02:00:26PM +0200, Richard Biener wrote: > > + gcc_assert (RECORD_OR_UNION_TYPE_P (container)); > > + > > + for (tree t = TYPE_FIELDS (container); t; t = DECL_CHAIN (t)) > > +{ > > + if (TREE_CODE (t) != FIELD_DECL) > > +continue; > > + > > + tree byte_off

Re: [PATCH] libstdc++: Fix warnings introduced by type-erasing for chrono commits [PR110739]

2025-06-27 Thread Jonathan Wakely
On 27/06/25 13:01 +0200, Tomasz Kamiński wrote: The r16-1709-g4b3cefed1a08344495fedec4982d85168bd8173f caused `-Woverflow` in empty_spec.cc file. This warning is not cause by any issue in shipping code, and results in taking to much shorcut when implementing a test-only custom representation type

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-27 Thread Alexander Monakov
On Fri, 27 Jun 2025, Richard Biener wrote: > > I am testing partial fixes for these issues. > > Can you check again after r16-1731-g08bdb6b4a32f1f? Certainly. There's no more fmaddsub-related testsuite failures, and only three tests need adjustment on x86. * gcc.target/i386/pr116979.c Here

Re: [committed] RISC-V: Add comment and reorder the the include files in riscv.md [NFC]

2025-06-27 Thread Kito Cheng
I found that isn't included in this patch after I committed that...I try to fix that soon but CI caught me :P https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7c67f7f8d4c8aadbe8efd733c29d13bfcbb0f50f On Thu, Jun 26, 2025 at 10:05 PM Robin Dapp wrote: > Hi Kito, > > > This patch adds a comment to t

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-06-27 Thread Qing Zhao
Hi, A status update on this patch: (Actually a good news!) > On Jun 10, 2025, at 11:32, Qing Zhao wrote: > > > >>> >>> It's difficult to do any meaningful pruning I think. Consider >>> >>> if (i == -1) >>> tem = a[i]; >>> >>> when we transform this to >>> >>> if (i == -1) >>> t

Re: [Fortran, Patch, PR120843, v1] Fix reject valid, because of inconformable coranks

2025-06-27 Thread Andre Vehreschild
I take this patch back. It seems to be incomplete. - Andre On Fri, 27 Jun 2025 14:45:36 +0200 Andre Vehreschild wrote: > Hi all, > > this patch fixes a reject valid when the coranks of two operands do not match > and no coindex is given. I.e. when only an implicit this_image co-ref is used. >

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-27 Thread Jan Hubicka
> Hi Honza, > > So merging the profiles will also lead to inconsistencies making the > > .part variant to seem more hot than it is... > > I am looking into this and will post the patch as a follow up patch. Thanks. Note that now with merging being done recursively to inline instances while offli

Re: [PATCH 7/8] libstdc++: Directly implement ranges::sample [PR100795]

2025-06-27 Thread Jonathan Wakely
On 26/06/25 23:12 -0400, Patrick Palka wrote: On Thu, 26 Jun 2025, Patrick Palka wrote: PR libstdc++/100795 libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__sample_fn::operator()): Reimplement the forward_iterator branch directly. * testsuite/25_algorith

Re: [PATCH v2 0/4] RISC-V: Combine vec_duplicate + vssubu.vv to vssubu.vx on GR2VR cost

2025-06-27 Thread Robin Dapp
OK. Hmm, I'm still seeing test failures in the CI. Could you check if those are valid? -- Regards Robin

[PATCH] sh: Recognize >> 31 in treg_set_expr_not_const01

2025-06-27 Thread Raphael Moreira Zinsly
A right shift of 31 will become 0 or 1, this can be checked for treg_set_expr_not_const01 to avoid matching addc_t_r as this can expand to a 3 insn sequence instead. This improves tests 023 to 026 from gcc.target/sh/pr54236-2.c, e.g.: test_023: shllr5 mov #0,r1 mov r4,r0 rts addcr1,

Re: [PATCH 8/8] libstdc++: Directly implement ranges::shuffle [PR100795]

2025-06-27 Thread Jonathan Wakely
On 26/06/25 22:25 -0400, Patrick Palka wrote: PR libstdc++/100795 OK for trunk. libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (shuffle_fn::operator()): Reimplement directly. * testsuite/25_algorithms/shuffle/constrained.cc (test02): --- libstdc++-v3/in

Re: [PATCH] sh: Recognize >> 31 in treg_set_expr_not_const01

2025-06-27 Thread Oleg Endo
On Fri, 2025-06-27 at 10:51 -0300, Raphael Moreira Zinsly wrote: > A right shift of 31 will become 0 or 1, this can be checked for > treg_set_expr_not_const01 to avoid matching addc_t_r as this > can expand to a 3 insn sequence instead. > This improves tests 023 to 026 from gcc.target/sh/pr54236-

Re: [PATCH v2 0/4] RISC-V: Combine vec_duplicate + vssubu.vv to vssubu.vx on GR2VR cost

2025-06-27 Thread Robin Dapp
Is there anyway we can retrigger the test somewhere ? If no I can send a v3 series with the commit reordered and see. I don't think there's a way other than re-submitting. But if you're sure you tested properly and the CI is mistaken we can go ahead. I just wanted to make sure as with the s

[PATCH v3 0/4] RISC-V: Combine vec_duplicate + vssubu.vv to vssubu.vx on GR2VR cost

2025-06-27 Thread pan2 . li
From: Pan Li This patch would like to introduce the combine of vec_dup + vssubu.vv into vssubu.vx on the cost value of GR2VR. The late-combine will take place if the cost of GR2VR is zero, or reject the combine if non-zero like 1, 2, 15 in test. There will be two cases for the combine: Case 0:

Re: [committed] i386: Introduce crc_revsi4 expanders [PR120719]

2025-06-27 Thread Andi Kleen
On Fri, Jun 27, 2025 at 08:11:29AM +0200, Uros Bizjak wrote: > On Fri, Jun 27, 2025 at 7:27 AM Andi Kleen wrote: > > > > Uros Bizjak writes: > > > > > Introduce crc_revsi4 expanders to generate CRC32 instruction when > > > using > > > __builtin_rev_crc32_data* builtins with 0x1EDC6F41 poylnomial

Re: [PATCH][RFC] c/96570 - diagnostics for conversions to/from time_t

2025-06-27 Thread Joseph Myers
On Fri, 27 Jun 2025, Richard Biener wrote: > > I think such a warning should be based on an attribute on the time_t type > > that means "warn for implicit truncation of this type" (I'm less clear on > > why warnings for implicit widening conversions *to* time_t are supposed to > > be useful), r

[PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-27 Thread Raphael Moreira Zinsly
Hi all, For targets that have expensive shifts this may not get a better sequence right now, specially for AVR and MSP430 according to our tests. Before I start looking for a fix on those targets I want to know if someone has any advise or other concerns with this transformation. Thanks, -- >8

[PATCH] s390: More vec-perm-const cases.

2025-06-27 Thread Juergen Christ
s390 missed constant vector permutation cases based on the vector pack instruction or changing the size of the vector elements during vector merge. This enables some more patterns that do not need to load a constant vector for permutation. Bootstrapped and regtested on s390. Okay for trunk? gcc

[PATCH 1/1] ivopts: Fix scan-assembler-not regexes for aarch64/sve test

2025-06-27 Thread Christopher Bazley
The test added by r16-1671-ge7ff8e8d77df74 passed despite using regular expressions that would never match real assembly language output from the compiler. Because the regular expressions were not expected to match, and didn't, this was not noticeable; however, it also made that part of the test us

[PATCH 0/1] ivopts: Fix scan-assembler-not regexes for aarch64/sve

2025-06-27 Thread Christopher Bazley
The test added by r16-1671-ge7ff8e8d77df74 passed despite using regular expressions that would never match real assembly language output from the compiler. Modified the test added by r16-1671-ge7ff8e8d77df74 to use scan-assembler-times instead of scan-assembler-not (because we expect to see the ol

Re: [PATCH] [RFC] RISC-V: Add extra check to help choosing multilib with equivalent arch.

2025-06-27 Thread yunzezhu
> From:Kito Cheng > Send Time:2025 Jun. 9 (Mon.) 17:33 > To:yunzezhu > CC:"gcc-patches" > Subject:Re: [PATCH] [RFC] RISC-V: Add extra check to help choosing multilib > with equivalent arch. > > > Oh, yeah, I got your point, I was just misreading, the march is > rv32imac rather than rv32imafc, t

Re: [PATCH] match: Unwrap non-lvalue as unary or binary operand

2025-06-27 Thread Mikael Morin
Le 23/06/2025 à 09:34, Richard Biener a écrit : On Sun, Jun 22, 2025 at 10:23 PM Mikael Morin wrote: From: Mikael Morin See the description in the ChangeLog entry below. The testcases are best effort; for some operators the fortran frontend generates a temporary variable, so the simplificat

Re: [PATCH 1/8] libstdc++: Directly implement ranges::heap algos [PR100795]

2025-06-27 Thread Jonathan Wakely
On 26/06/25 22:25 -0400, Patrick Palka wrote: ranges::push_heap, ranges::pop_heap, ranges::make_heap and ranges::sort_heap are currently defined in terms of the corresponding STL-style algorithms, but this is incorrect because the STL-style algorithms rely on the legacy iterator system, and so mi

Re: [PATCH 2/8] libstdc++: Directly implement ranges::sort [PR100795]

2025-06-27 Thread Jonathan Wakely
On 26/06/25 22:25 -0400, Patrick Palka wrote: As with the previous patch, this patch reimplements ranges::sort directly instead of incorrectly forwarding to std::sort. In addition to the compatibility changes listed in the previous patch we also: - use ranges::iter_swap instead of std::iter_sw

Re: [PATCH 3/8] libstdc++: Directly implement ranges::inplace_merge [PR100795]

2025-06-27 Thread Jonathan Wakely
On 26/06/25 22:25 -0400, Patrick Palka wrote: As with the previous patch, this patch reimplements ranges::inplace_merge directly instead of incorrectly forwarding to std::inplace_merge. In addition to the compatibility changes listed in the previous patch we also: - explicitly cast the differe

[PATCH v2] tree-optimization/120780: Support object size for containing objects

2025-06-27 Thread Siddhesh Poyarekar
MEM_REF cast of a subobject to its containing object has negative offsets, which objsz sees as an invalid access. Support this use case by peeking into the structure to validate that the containing object indeed contains a type of the subobject at that offset and if present, adjust the wholesize f

Re: [PATCH] tree-optimization/120780: Support object size for containing objects

2025-06-27 Thread Siddhesh Poyarekar
On 2025-06-27 08:05, Jakub Jelinek wrote: On Fri, Jun 27, 2025 at 02:00:26PM +0200, Richard Biener wrote: + gcc_assert (RECORD_OR_UNION_TYPE_P (container)); + + for (tree t = TYPE_FIELDS (container); t; t = DECL_CHAIN (t)) +{ + if (TREE_CODE (t) != FIELD_DECL) +continue; + +

[Fortran, Patch, PR120843, v1] Fix reject valid, because of inconformable coranks

2025-06-27 Thread Andre Vehreschild
Hi all, this patch fixes a reject valid when the coranks of two operands do not match and no coindex is given. I.e. when only an implicit this_image co-ref is used. Regtests ok on x86_64-pc-linux-gnu / F41. Ok for mainline? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot d

RE: [PATCH V3] x86: Enable separate shrink wrapping

2025-06-27 Thread Cui, Lili
> -Original Message- > From: Cui, Lili > Sent: Friday, June 27, 2025 5:04 PM > To: H.J. Lu > Cc: ubiz...@gmail.com; gcc-patches@gcc.gnu.org; Liu, Hongtao > ; richard.guent...@gmail.com; Michael Matz > ; Sam James ; kenjin4...@gmail.com > Subject: RE: [PATCH V3] x86: Enable separate shrin

Re: [PATCH, V2, 1 of 3] Add -mcpu=future support.

2025-06-27 Thread Segher Boessenkool
Hi! On Wed, Jun 25, 2025 at 02:50:14PM -0400, Michael Meissner wrote: > This is patch #1 of 3 that adds the support that can be used in developing GCC > support for potential future PowerPC processors. With all 3 patches, the > tuning > for the 'future' processor is the same as power10 and power

Re: [PATCH v2] tree-optimization/120780: Support object size for containing objects

2025-06-27 Thread Siddhesh Poyarekar
On 2025-06-27 08:39, Siddhesh Poyarekar wrote: MEM_REF cast of a subobject to its containing object has negative offsets, which objsz sees as an invalid access. Support this use case by peeking into the structure to validate that the containing object indeed contains a type of the subobject at t

Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-27 Thread Andrew Pinski
On Fri, Jun 27, 2025, 11:06 AM Raphael Moreira Zinsly < rzin...@ventanamicro.com> wrote: > Hi all, > > For targets that have expensive shifts this may not get a better > sequence right now, specially for AVR and MSP430 according to > our tests. > Before I start looking for a fix on those targets I

Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-27 Thread Andrew Pinski
On Fri, Jun 27, 2025, 11:06 AM Raphael Moreira Zinsly < rzin...@ventanamicro.com> wrote: > Hi all, > > For targets that have expensive shifts this may not get a better > sequence right now, specially for AVR and MSP430 according to > our tests. > Before I start looking for a fix on those targets I

[pushed] c++: fix decltype_p handling for binary expressions

2025-06-27 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- With Jakub's constexpr virtual base patch, 23_containers/vector/bool/cmp_c++20.cc failed the assert I add to fixed_type_or_null, meaning that it returned the wrong value. Let's fix the result as well as adding the assert, and fix cp_parser_

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-06-27 Thread Kees Cook
On Fri, Jun 27, 2025 at 01:38:51PM +, Qing Zhao wrote: > The good news is: With the above simple heuristic and a simple back tracing > of the CFG, all the > current testing cases for the following PRs passed without any issue: > > PR109071 > PR88771 > PR85788 > PR108770 > PR106762 > PR11

Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-27 Thread Jeff Law
On 6/27/25 12:30 PM, Andrew Pinski wrote: On Fri, Jun 27, 2025, 11:06 AM Raphael Moreira Zinsly mailto:rzin...@ventanamicro.com>> wrote: Hi all, For targets that have expensive shifts this may not get a better sequence right now, specially for AVR and MSP430 according to

Re: [PATCH, part2] Fortran: follow-up fix to checking of renamed-on-use interface name [PR120784]

2025-06-27 Thread Jerry D
On 6/27/25 1:48 PM, Harald Anlauf wrote: Dear all, my original patch caused a regression on previously working code where an imported interface was *not* renamed-on-use, as the related new logic did not expect a local_name to be an empty string. Funnily, there was no previously existing test in

Re: [PATCH, part2] Fortran: follow-up fix to checking of renamed-on-use interface name [PR120784]

2025-06-27 Thread Harald Anlauf
Am 27.06.25 um 22:57 schrieb Jerry D: On 6/27/25 1:48 PM, Harald Anlauf wrote: Dear all, my original patch caused a regression on previously working code where an imported interface was *not* renamed-on-use, as the related new logic did not expect a local_name to be an empty string. Funnily, t

Re: [PATCH] c++, v3: Implement C++26 P3533R2 - constexpr virtual inheritance [PR120777]

2025-06-27 Thread Jakub Jelinek
On Fri, Jun 27, 2025 at 05:17:55PM -0400, Jason Merrill wrote: > I've pushed those changes. Great. > > /* For a non-pointer simple base reference, express it as a > > COMPONENT_REF > >without taking its address (and so causing lambda capture, 91933). > > */ > > - if (code == PLUS_

[PATCH] libcpp: Fix up cpp_maybe_module_directive [PR120845]

2025-06-27 Thread Jakub Jelinek
Hi! My changes for "Module Declarations Shouldn’t be Macros" paper broke the following testcase. The backup handling intentionally tries to drop CPP_PRAGMA_EOL token if things go wrong, which is desirable for the case where we haven't committed to the module preprocessing directive (i.e. changed

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

2025-06-27 Thread Jakub Jelinek
Hi! The following testcase is miscompiled since the introduction of UBSan, cp_build_array_ref COND_EXPR handling replaces (cond ? a : b)[idx] with cond ? a[idx] : b[idx], but if there are SAVE_EXPRs inside of idx, they will be evaluated just in one of the branches and the other uses uninitialized

Re: [PATCH] c++, v3: Implement C++26 P3533R2 - constexpr virtual inheritance [PR120777]

2025-06-27 Thread Jason Merrill
On 6/27/25 5:17 PM, Jason Merrill wrote: On 6/26/25 1:30 PM, Jakub Jelinek wrote: On Thu, Jun 26, 2025 at 01:33:08PM +0200, Jakub Jelinek wrote: I get some regressions (which I didn't get with the earlier patch, but it isn't obvious by what it has been caused): It ICEs were caused by the cano

Re: [PATCH] c++, v3: Implement C++26 P3533R2 - constexpr virtual inheritance [PR120777]

2025-06-27 Thread Jason Merrill
On 6/26/25 1:30 PM, Jakub Jelinek wrote: On Thu, Jun 26, 2025 at 01:33:08PM +0200, Jakub Jelinek wrote: I get some regressions (which I didn't get with the earlier patch, but it isn't obvious by what it has been caused): It ICEs were caused by the canonicalize_obj_off change and indeed The IC

Re: [PATCH 1/4] c++: Add flag to detect underlying representative of bitfield decls

2025-06-27 Thread Jason Merrill
On 6/27/25 5:03 AM, Nathaniel Shead wrote: On Wed, Jun 25, 2025 at 01:05:39PM -0400, Jason Merrill wrote: On 5/21/25 10:14 PM, Nathaniel Shead wrote: This patch isn't currently necessary with how I've currently done the follow-up patches, but is needed for avoiding any potential issues in the f

[PATCH, part2] Fortran: follow-up fix to checking of renamed-on-use interface name [PR120784]

2025-06-27 Thread Harald Anlauf
Dear all, my original patch caused a regression on previously working code where an imported interface was *not* renamed-on-use, as the related new logic did not expect a local_name to be an empty string. Funnily, there was no previously existing test in the testsuite... The attached fixes this

[PR sanitizer/119356] Cherry pick bugfix from LLVM sanitizer runtime

2025-06-27 Thread Jeff Law
The cherry-picked patch fixes sanitizer builds with musl libc. Which should fix both ppc and riscv issues using the sanitizer with musl. Pushed to the trunk. Jeff commit 5111ea055f5699ad47605890fb45af5c3db1de4f Author: Jeff Law Date: Fri Jun 27 15:11:41 2025 -0600 [sanitizer_common]

Re: [PATCH] c++/modules: Ensure type of partial spec VAR_DECL is consistent with its template [PR120644]

2025-06-27 Thread Jason Merrill
On 6/27/25 3:28 AM, Nathaniel Shead wrote: On Wed, Jun 25, 2025 at 11:52:14AM -0400, Jason Merrill wrote: On 6/25/25 9:02 AM, Nathaniel Shead wrote: On Tue, Jun 24, 2025 at 12:10:09PM -0400, Patrick Palka wrote: On Tue, 24 Jun 2025, Jason Merrill wrote: On 6/23/25 5:41 PM, Nathaniel Shead wr

Re: [PATCH v2] c++: fix ICE with [[deprecated]] [PR120756]

2025-06-27 Thread Jason Merrill
On 6/26/25 4:12 PM, Marek Polacek wrote: On Wed, Jun 25, 2025 at 03:13:25PM -0400, Jason Merrill wrote: On 6/25/25 1:28 PM, Marek Polacek wrote: @@ -24604,7 +24604,7 @@ resolve_nondeduced_context (tree orig_expr, tsubst_flags_t complain) } if (good == 1) { - ma

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

2025-06-27 Thread Jason Merrill
On 6/27/25 5:58 PM, Jakub Jelinek wrote: Hi! The following testcase is miscompiled since the introduction of UBSan, cp_build_array_ref COND_EXPR handling replaces (cond ? a : b)[idx] with cond ? a[idx] : b[idx], but if there are SAVE_EXPRs inside of idx, they will be evaluated just in one of the

[PATCH] Add "void debug (tree)"

2025-06-27 Thread H.J. Lu
Add "void debug (tree)" to support: (gdb) call debug (expr) unit-size user align:256 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffe99cebd0 fields XF x.c:2:15 size unit-size align:128 warn_if_not_align:0

Re: [PATCH 15/17] coroutines: Removed unused private member in cp_coroutine_transform

2025-06-27 Thread Jason Merrill
On 6/25/25 10:22 AM, Iain Sandoe wrote: On 25 Jun 2025, at 15:17, Martin Jambor wrote: Hi, when building GCC with clang, it warns that the private member suffix in class cp_coroutine_transform (defined in gcc/cp/coroutines.h) is not used which indeed looks like it is the case. This patch t

[PATCH] Update alignment for argument on stack

2025-06-27 Thread H.J. Lu
Since a backend may ignore user type alignment for arguments passed on stack, update alignment for arguments passed on stack when copying MEM's memory attributes. gcc/ PR target/120839 * emit-rtl.cc (set_mem_attrs): Update alignment for argument on stack. gcc/testsuite/ PR target/120839 * gcc.t

Re: [PATCH] Add "void debug (tree)"

2025-06-27 Thread H.J. Lu
On Sat, Jun 28, 2025 at 12:03 PM Jeff Law wrote: > > > > On 6/27/25 5:34 PM, H.J. Lu wrote: > > Add "void debug (tree)" to support: > > > > (gdb) call debug (expr) > >> type > size > > unit-size > > user align:256 warn_if_not_align:0 symtab:0 alias-set -1 >

Re: [PATCH 04/17] ranger: Mark several member functions as final override

2025-06-27 Thread Aldy Hernandez
Martin Jambor writes: > Hi, > > When GCC is built with clang, it emits warnings that several member > functions of various ranger classes override a virtual function of an > ancestor but are not marked with the override keyword. After > inspecting the cases, I found that all these classes had ot

RE: [PATCH v3 0/4] RISC-V: Combine vec_duplicate + vssubu.vv to vssubu.vx on GR2VR cost

2025-06-27 Thread Li, Pan2
The CI reported 2 failures but seems unrelated and passed locally, thus will commit this before the end of next Monday(6/30) if no more concerns. > FAIL: gcc.dg/vect/pr115669.c -flto -ffat-lto-objects (test for excess errors) Executing on host: /home/lipan/gnu-toolchain/build/build-riscv64-unkn

Re: [PATCH V3] x86: Enable separate shrink wrapping

2025-06-27 Thread H.J. Lu
On Sat, Jun 28, 2025 at 12:24 AM Cui, Lili wrote: > > > > > -Original Message- > > From: Cui, Lili > > Sent: Friday, June 27, 2025 5:04 PM > > To: H.J. Lu > > Cc: ubiz...@gmail.com; gcc-patches@gcc.gnu.org; Liu, Hongtao > > ; richard.guent...@gmail.com; Michael Matz > > ; Sam James ; kenj

[PATCH] gcc: middle-end opt for trigonometric pi-based functions builtins

2025-06-27 Thread Yuao Ma
Hi Jakub, > signbit is documented to be a macro, so please don't declare > int signbit (double); > function in the testcase and instead of signbit use __builtin_signbit. This is indeed my negligence. Done. If everything looks good, could you please help me merge this patch? Thank you! Yuao 0

Re: [AutoFDO] Fix get_original_name to strip only names that are generated after auto-profile

2025-06-27 Thread Jan Hubicka
HI, I have tested your patch on exchange2 and noticed multiple problems: 1) with LTO the translation from dwarf names to symbol names is disabled since we free lang data sooner. I moved the offline pass upstream which however also may make us miss clones intorduced betwen free lang dat

Re: [PATCH] Add "void debug (tree)"

2025-06-27 Thread Jeff Law
On 6/27/25 5:34 PM, H.J. Lu wrote: Add "void debug (tree)" to support: (gdb) call debug (expr) unit-size user align:256 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffe99cebd0 fields XF x.c:2:15 size unit-

<    1   2