Re: [PATCH] libstdc++: Replace use of std::min in ranges::uninitialized_xxx algos [PR101587]

2025-03-26 Thread Tomasz Kaminski
On Wed, Mar 26, 2025 at 12:51 PM Jonathan Wakely wrote: > Because ranges can have any signed integer-like type as difference_type, > it's not valid to use std::min(diff1, diff2). Instead of calling > std::min with an explicit template argument, this adds a new __min > helper that determines the c

[PATCH] testsuite: i386: Fix gcc.target/i386/pr82142?.c etc. on Solaris/x86

2025-03-26 Thread Rainer Orth
Three tests FAIL on Solaris/x86 in similar ways: FAIL: gcc.target/i386/pr111673.c check-function-bodies advance FAIL: gcc.target/i386/pr82142a.c check-function-bodies assignzero FAIL: gcc.target/i386/pr82142b.c check-function-bodies assignzero All tests FAIL as is because they lack either or both

Re: [PATCH v3] Don't instrument exit edges after musttail

2025-03-26 Thread Richard Biener
> Am 26.03.2025 um 08:45 schrieb Jakub Jelinek : > > On Tue, Mar 25, 2025 at 04:44:45PM +0100, Jakub Jelinek wrote: >> On Tue, Mar 25, 2025 at 08:33:41AM -0700, Andi Kleen wrote: 2025-03-25 Jakub Jelinek Andi Kleen PR gcov-profile/118442 * profile.cc

Re: [PATCH] widening_mul: Fix up further r14-8680 widening mul issues [PR119417]

2025-03-26 Thread Richard Biener
> Am 26.03.2025 um 09:15 schrieb Jakub Jelinek : > > Hi! > > The following testcase is miscompiled since r14-8680 PR113560 changes. > I've already tried to fix some of the issues caused by that change in > r14-8823 PR113759, but apparently didn't get it right. > > The problem is that the r14

Re: [PATCH] i386: Fix up pr55583.c testcase [PR119465]

2025-03-26 Thread Uros Bizjak
On Wed, Mar 26, 2025 at 9:23 AM Jakub Jelinek wrote: > > Hi! > > In r15-4289 H.J. fixed up the pr55583.c testcase to use unsigned long long > or long long instead of unsigned long or long. That change looks correct to > me because the > void test64r () { b = ((u64)b >> n) | (a << (64 - n)); } > e

Re: [PATCH] [cobol] move global data to symbol_table_init

2025-03-26 Thread Jakub Jelinek
On Fri, Mar 21, 2025 at 10:08:05AM +0100, Richard Biener wrote: > On Thu, 20 Mar 2025, Richard Biener wrote: > > > The following avoids early runtime initialization of cbl_field_t > > objects which, when using tree to represent the current _Float128 > > data, segfaults as tree data like float128_t

Re: [PATCH] doc: say "compatible types" for -fstrict-aliasing

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 10:41:52AM +, Sam James wrote: > Include the term used in the standard to ease further research for users. > > gcc/ChangeLog: > > * doc/invoke.texi: Use "compatible types" term. > --- > gcc/doc/invoke.texi | 8 > 1 file changed, 4 insertions(+), 4 delet

Re: [PATCH 1/2] gcov: branch, conds, calls in function summaries

2025-03-26 Thread Jan Hubicka
> The gcov function summaries only output the covered lines, not the > branches and calls. Since the function summaries is an opt-in it > probably makes sense to also include branch coverage, calls, and > condition coverage. > > $ gcc --coverage -fpath-coverage hello.c -o hello > $ ./hello > > Be

Re: [PATCH v2 1/2] PR118442: Don't instrument exit edges after musttail

2025-03-26 Thread Jan Hubicka
> > Hmm. I do wonder whether your earlier patch was more "correct" in the > sense that a tail call does not return to the calling function but its caller. > That means it should not have a fallthru edge, so our representation > with feeding a return value to a function-local return stmt isn't a g

Re: [PATCH] icf: For ADDR_EXPR verify even types the ADDR_EXPR points at rather than just the value [PR119006]

2025-03-26 Thread Jakub Jelinek
On Tue, Mar 11, 2025 at 04:56:32PM +0100, Jakub Jelinek wrote: > On Fri, Feb 28, 2025 at 10:06:49AM +0100, Richard Biener wrote: > > > I've done 3 x86_64-linux and i686-linux bootstraps/regtests, each time > > > with the 3rd patch to gather statistics on number of successful ICF > > > function > >

Re: [PATCH 2/2] Add prime path coverage to gcc/gcov

2025-03-26 Thread Jan Hubicka
Hello, I apologize for late reply here. I went thru the paper in gereater detail. While I originally though the usual path-profiling can be reasonably merged with the prime math profiling, so it is useful both for optimizaiton and coverage testing, I think it is better to not do that - the require

[PATCH] c++: Fix FAIL: g++.dg/tree-ssa/initlist-opt1.C

2025-03-26 Thread Jonathan Wakely
My r15-8904-ge200f53a555651 changed the std::vector initializer-list constructor so that it calls a new _M_range_initialize_n function instead of _M_range_initialize. Change the scan-tree-dump pattern in this g++.dg test to match the new gimple output. gcc/testsuite/ChangeLog: * g++.dg/tr

Re: [PATCH] doc: say "compatible types" for -fstrict-aliasing

2025-03-26 Thread Alexander Monakov
On Wed, 26 Mar 2025, Sam James wrote: > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -14552,10 +14552,10 @@ Allow the compiler to assume the strictest aliasing > rules applicable to > the language being compiled. For C (and C++), this activates > optimizations based on the type

[PATCH 01] aarch64: Changed CRC test.

2025-03-26 Thread Mariam Arutunian
Fixed the iteration number in crc-crc32c-data16.c test from 8 to 16 to match the test name. From d5f5bab516e45da6fa8a65dac106add2b4e4602f Mon Sep 17 00:00:00 2001 From: Mariam Arutunian Date: Wed, 26 Mar 2025 16:03:54 +0400 Subject: [PATCH] Fixed the iteration number in crc-crc32c-data16.c test fr

Re: [PATCH] libstdc++: Check presence of iterator_category for flat_sets insert_range [PR119415]

2025-03-26 Thread Patrick Palka
On Wed, 26 Mar 2025, Tomasz Kamiński wrote: > As pointed out by Hewill Kang (reporter) in the issue, checking if iterator > of the incoming range satisfies __cpp17_input_iterator, may still lead > to hard errors inside of insert_range for iterators that satisfies > that concept, but specialize ite

Re: [PATCH][RFC] [cobol] change cbl_field_data_t::etc_t::value from _Float128 to tree

2025-03-26 Thread James K. Lowden
On Tue, 25 Mar 2025 13:01:59 -0400 "James K. Lowden" wrote: > In fact, we shouldn't use floating point for numeric literals. I'm sorry, I should have been more precise. Section 8.3.3.3 of the ISO spec defines both fixed- and floating-point numeric literals. "A fixed-point numeric lite

Re: [PATCH] c++: Properly fold .* [PR114525]

2025-03-26 Thread Jason Merrill
On 3/25/25 1:50 PM, Marek Polacek wrote: On Tue, Mar 25, 2025 at 05:18:23PM +, Simon Martin wrote: We've been miscompiling the following since r0-51314-gd6b4ea8592e338 (I did not go compile something that old, and identified this change via git blame, so might be wrong) === cut here === str

[committed] i386: Require in peephole2 that memory is offsettable [PR119450]

2025-03-26 Thread Jakub Jelinek
Hi! The following testcase ICEs because a peephole2 attempts to offset memory which is not offsettable (in particular address is a ZERO_EXTEND in this case). Because peephole2s don't support constraints, I've added a check for this in the peephole2's condition. Bootstrapped/regtested on x86_64-l

[PATCH] widening_mul: Fix up further r14-8680 widening mul issues [PR119417]

2025-03-26 Thread Jakub Jelinek
Hi! The following testcase is miscompiled since r14-8680 PR113560 changes. I've already tried to fix some of the issues caused by that change in r14-8823 PR113759, but apparently didn't get it right. The problem is that the r14-8680 changes sometimes set *type_out to a narrower type than the *new

Re: [PATCH] libstdc++: Check presence of iterator_category for flat_sets insert_range [PR119415]

2025-03-26 Thread Jonathan Wakely
On Wed, 26 Mar 2025 at 07:26, Tomasz Kamiński wrote: > > As pointed out by Hewill Kang (reporter) in the issue, checking if iterator > of the incoming range satisfies __cpp17_input_iterator, may still lead > to hard errors inside of insert_range for iterators that satisfies > that concept, but spe

[PATCH] rs6000: Ignore OPTION_MASK_SAVE_TOC_INDIRECT differences in inlining decisions [PR119327]

2025-03-26 Thread Jakub Jelinek
Hi! The following testcase FAILs because the always_inline function can't be inlined. The rs6000 backend has similarly to other targets a hook which rejects inlining which would bring in new ISAs which aren't there in the caller. And this hook rejects this because of OPTION_MASK_SAVE_TOC_INDIRECT

[PATCH] i386: Fix up pr55583.c testcase [PR119465]

2025-03-26 Thread Jakub Jelinek
Hi! In r15-4289 H.J. fixed up the pr55583.c testcase to use unsigned long long or long long instead of unsigned long or long. That change looks correct to me because the void test64r () { b = ((u64)b >> n) | (a << (64 - n)); } etc. functions otherwise aren't really 64-bit rotates, but something t

[PATCH] libstdc++: Check presence of iterator_category for flat_sets insert_range [PR119415]

2025-03-26 Thread Tomasz Kamiński
As pointed out by Hewill Kang (reporter) in the issue, checking if iterator of the incoming range satisfies __cpp17_input_iterator, may still lead to hard errors inside of insert_range for iterators that satisfies that concept, but specialize iterator_traits without iterator_category typedef (std::

Re: [PATCH] gimple: Verify that lhs of an assign is NOT a function [PR118796]

2025-03-26 Thread Richard Biener
On Wed, Mar 26, 2025 at 7:22 AM Andrew Pinski wrote: > > On Tue, Mar 25, 2025 at 10:59 PM Richard Biener > wrote: > > > > > > > > > Am 26.03.2025 um 04:47 schrieb Andrew Pinski : > > > > > > This adds a simple verification so that the LHS of an assignment is > > > not a function decl. SRA and FR

Re: [PATCH] Locality cloning pass (was: Introduce -flto-partition=locality)

2025-03-26 Thread Kyrylo Tkachov
Ping. Thanks, Kyrill > On 6 Mar 2025, at 09:25, Kyrylo Tkachov wrote: > > Hi all, > > Implement partitioning and cloning in the callgraph to help locality. > A new -fipa-reorder-for-locality flag is used to enable this. > The majority of the logic is in the new IPA pass in ipa-locality-cloning

Re: [PATCH v3] Don't instrument exit edges after musttail

2025-03-26 Thread Jakub Jelinek
On Tue, Mar 25, 2025 at 04:44:45PM +0100, Jakub Jelinek wrote: > On Tue, Mar 25, 2025 at 08:33:41AM -0700, Andi Kleen wrote: > > > 2025-03-25 Jakub Jelinek > > > Andi Kleen > > > > > > PR gcov-profile/118442 > > > * profile.cc (branch_prob): Ignore EDGE_FAKE edges from musttail call

Re: [PATCH] testsuite: add testcase for recent alias fix

2025-03-26 Thread Sam James
Martin Jambor writes: > Hi, > > On Tue, Mar 25 2025, Sam James wrote: >> r15-7961-gdc47161c1f32c3 fixes a typo in ao_compare::compare_ao_refs >> but there wasn't a testcase available at the time. Now there is. >> >> Thanks to Andrew for the testcase. >> >> gcc/testsuite/ChangeLog: >> PR test

[COMMITTED 118/146] gccrs: Add missing name resolution to static items in blocks

2025-03-26 Thread arthur . cohen
From: Philip Herron We need to add name resolution and hir lowering for items as part of blocks in order to typecheck and compile them correctly. Fixes Rust-GCC#3350 gcc/rust/ChangeLog: * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): hir lowering * hir/rust-ast-lower-stm

[PATCH 4/6] testsuite: fix dg-message typos

2025-03-26 Thread Sam James
gcc/testsuite/ChangeLog: * g++.dg/diagnostic/unclosed-extern-c.C: Fix 'dg-message' typo. * g++.dg/warn/Wno-attributes-1.C: Ditto. --- gcc/testsuite/g++.dg/diagnostic/unclosed-extern-c.C | 2 +- gcc/testsuite/g++.dg/warn/Wno-attributes-1.C| 6 +++--- 2 files changed, 4 inse

Re: [PATCH 1/2] c++/modules: Fix tsubst of global module friend classes [PR118920]

2025-03-26 Thread Jason Merrill
On 3/26/25 9:23 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When doing tsubst_friend_class, we need to first check if any imported module has already created a (hidden) declaration for the class so that we don't end up with conflicting de

[PATCH 2/6] testsuite: fix dg-bogus typo

2025-03-26 Thread Sam James
The dg-bogus directive here is trying to match -Warray-bounds or -Wstringop-overflow, but it got the casing wrong on the latter. gcc.dg/pr89350.c gets this right. gcc/testsuite/ChangeLog: PR middle-end/93437 * g++.dg/warn/Wstringop-overflow-5.C: Fix -Wstringop-overflow casing. --

Re: [PATCH] i386: Set attr "addr" as "gpr16" for constraint "jm". [PR 119425]

2025-03-26 Thread Hongtao Liu
On Wed, Mar 26, 2025 at 9:50 AM Hu, Lin1 wrote: > > Hi, all > > This patch aims to ensure each alternative with constraint "jm" should > set addr "gpr16", otherwise maybe raise ICE in reload pass. > > Bootstrapped and Regtested for x86_64-pc-linux-gnu{-m32,-m64}, ok for trunk? Ok. > > BRs, > Lin >

<    1   2