[committed] libphobos: Add module declaration to rt.invariant

2025-04-04 Thread Iain Buclaw
Hi, This patch adds a module declaration to the rt/invariant.d module, preventing conflicts with a user-provided `invariant.d' module. Bootstrapped and regression tested on x86_64-linux-gnu/-m32, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * runtime.def (INVARIANT):

[COMMITTED 108/146] gccrs: rust/intrinsic: add try intrinsic and panic strategy options

2025-04-04 Thread arthur . cohen
From: liushuyu gcc/rust/ChangeLog: * backend/rust-compile-intrinsic.cc: add `try` intrinsic handler. * lang.opt: add `-frust-panic` option. * rust-lang.cc: enable exception handler code generation. * rust-session-manager.cc: add getter and setter for panic

[COMMITTED 040/144] gccrs: Make sure CompileExpr::visit is reached

2025-04-04 Thread arthur . cohen
From: jjasmine gcc/rust/ChangeLog: * hir/tree/rust-hir.cc (InlineAsm::accept_vis): Make sure CompileExpr::visit is reached * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise gcc/testsuite/ChangeLog: * rust/compile/inline_asm_compile_

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-04 Thread Qing Zhao
> On Apr 4, 2025, at 12:40, Jakub Jelinek wrote: > > On Fri, Apr 04, 2025 at 04:25:11PM +, Qing Zhao wrote: >>> It is not just the parser, it is also the human reader who should be >>> able to clearly distinguish this (which is why I still prefer >>> designators syntax because this makes it

[COMMITTED 002/144] gccrs: Add rustc test directory for testsuite adaptor

2025-04-04 Thread arthur . cohen
From: Muhammad Mahad gcc/testsuite/ChangeLog: * rust/rustc/README.md: information about rustc external directory. * rust/rustc/rustc.exp: New test. Signed-off-by: Muhammad Mahad --- gcc/testsuite/rust/rustc/README.md | 4 gcc/testsuite/rust/rustc/rustc.exp | 35 +

Re: [PATCH] cobol: Do not overload int64_t, overload long and long long.

2025-04-04 Thread NightStrike
On Thu, Mar 20, 2025 at 15:41 Iain Sandoe wrote: > > > > On 20 Mar 2025, at 19:28, Robert Dubner wrote: > > > > Although I am confused about how _int64_t can be anything but a 64-bit > > signed integer, and because it is my understanding that long and long > long > > really *do* change from plat

[COMMITTED 017/144] gccrs: Add location to BIR::Statement of kind RETURN

2025-04-04 Thread arthur . cohen
From: Kushal Pal This commit adds location_t to BIR::Statement where type is RETURN. gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Add location parameter. * checks/errors/borrowck/rust-bir-builder.h: Likewise.

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

2025-04-04 Thread Robert Dubner
It's time to slow down a bit and give me a chance to catch up. First, all those tests are not arbitrary. I was getting the correct answers before, and it was not an insignificant effort to get them correct in the first place. If we don't get the same answers, then something isn't the same as it

RE: [PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean

2025-04-04 Thread Robert Dubner
Yes. Back in about 75 minutes. > -Original Message- > From: Jakub Jelinek > Sent: Wednesday, March 19, 2025 13:18 > To: Robert Dubner > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean > > On Wed, Mar 19, 2025 at 1

Re: [PATCH] PR middle-end/119442: expr.cc: Fix vec_duplicate into vector boolean modes

2025-04-04 Thread Richard Biener
On Mon, Mar 31, 2025 at 3:07 PM Mark Wielaard wrote: > > On Mon, 2025-03-31 at 09:12 +, Kyrylo Tkachov wrote: > > > > > On 31 Mar 2025, at 09:43, Richard Biener > > > wrote: > > > > > > On Mon, Mar 31, 2025 at 9:41 AM Richard Biener > > > wrote: > > > > > > > > On Mon, Mar 31, 2025 at 9:36 

[pushed] c++: lambda in requires outside template [PR99546]

2025-04-04 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Since r10-7441 we set processing_template_decl in a requires-expression so that we can use tsubst_expr to evaluate the requirements, but that confuses lambdas terribly; begin_lambda_type silently returns error_mark_node and we continue into

[PATCH] libstdc++: Make operator== for std::tuple convert to bool [PR119545]

2025-04-04 Thread Jonathan Wakely
The boolean-testable requirements don't require the type to be copyable, so we need to convert to bool before it might need to be copied. libstdc++-v3/ChangeLog: PR libstdc++/119545 * include/std/tuple (operator==): Convert comparison results to bool. * testsuite/2

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

2025-04-04 Thread Jonathan Wakely
On Fri, 4 Apr 2025 at 10:56, Jonathan Wakely wrote: > > On Fri, 4 Apr 2025 at 10:32, Tomasz Kaminski wrote: > > > > > > > > On Fri, Apr 4, 2025 at 11:10 AM Jonathan Wakely wrote: > >> > >> In r15-8980-gf4b6acfc36fb1f I introduced a new function object for > >> finding the smaller of two distance

Re: [PATCH] rtlanal, i386: Adjust pattern_cost and x86 constant cost [PR115910]

2025-04-04 Thread Richard Biener
> Am 02.04.2025 um 18:31 schrieb Jakub Jelinek : > > Hi! > > Below is an attempt to fix up RTX costing P1 caused by r15-775 > https://gcc.gnu.org/pipermail/gcc-patches/2024-May/thread.html#652446 > @@ -21562,7 +21562,8 @@ ix86_rtx_costs (rtx x, machine_mode mode, int > outer_code_i, int opno

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-04 Thread Bill Wendling
On Thu, Apr 3, 2025 at 9:54 AM Kees Cook wrote: > On Wed, Apr 02, 2025 at 09:16:47PM +, Qing Zhao wrote: > > Hi, Bill, > > > > Thanks for the summary. > > > > I think that this is good. > > > > Two more questions: > > > > 1. Shall we keep the same name of the attribute counted_by for the 2nd n

Subject: [PATCH] cobol: gcobc wrapper fixes and additions

2025-04-04 Thread Simon Sobisch
Note: the check_GNU_style.sh script raises several errors - but it would raise them on the complete script, so I've opted to stay with its style. Side-note: Using this updated wrapper allows to runt the NIST test runner from a configured GnuCOBOL source tree using make  COBC=/usr/local/gcobol-d

Re: [PATCH] gcc-gitref.cgi: Redirect to cgit instead of gitweb

2025-04-04 Thread Mark Wielaard
Hi Gerald, (Adding Arsen to CC, see below) On Sat, Apr 05, 2025 at 12:02:44AM +0200, Gerald Pfeifer wrote: > On Fri, 4 Apr 2025, Mark Wielaard wrote: > > So I really don't have time to rewrite this to use some other cgi > > mechanism. Would you mind if we go with the current version? > > Apologi

Re: [PATCH] wwwdocs: Clarify DCO name/identity and (anonymous) pseudonym policy

2025-04-04 Thread Sam James
NightStrike writes: > How is an online only name different from an anonymous pseudonym? It doesn’t > seem to me that your changes actually > clarify anything. To me, they make it more ambiguous. The idea is to not have something throwaway (please also don't toppost).

[PATCH] c++: Rename -fmodules-ts to -fmodules in diagnostics

2025-04-04 Thread Nathaniel Shead
Tested on x86_64-pc-linux-gnu, OK for trunk if full bootstrap + regtest succeeds? -- >8 -- This replaces some usages of the old -fmodules-ts flag with the new -fmodules flag made in r15-5112-gd9c3c3c85665b2. gcc/cp/ChangeLog: * parser.cc (cp_parser_diagnose_invalid_type_name): Replace

Re: [PATCH] cse, v3: Fix up delete_trivially_dead_insns [PR119594]

2025-04-04 Thread Jakub Jelinek
On Fri, Apr 04, 2025 at 07:51:54PM +0200, Jakub Jelinek wrote: > On Fri, Apr 04, 2025 at 03:06:52PM +0100, Richard Sandiford wrote: > > > 2025-04-04 Jakub Jelinek > > > > > > PR rtl-optimization/119594 > > > * cse.cc (count_reg_usage): If INCR is 0, increment by 1 counts > > > of encounter

Re: [PATCH] tree-optimization/119532 - ICE with fixed-point tail recursion

2025-04-04 Thread Richard Biener
On Mon, 31 Mar 2025, Jakub Jelinek wrote: > On Mon, Mar 31, 2025 at 11:12:45AM +0200, Richard Biener wrote: > > The following disables tail recursion optimization when fixed-point > > types are involved as we cannot generate -1 for all fixed-point > > types. > > > > Bootstrapped and tested on x86

Re: [PATCH 06/10] testsuite: aarch64: arm: Add -mfpu=auto to arm_v8_2a_bf16_neon_ok

2025-04-04 Thread Christophe Lyon
On Fri, 21 Mar 2025 at 11:18, Richard Earnshaw (lists) wrote: > > On 20/03/2025 16:15, Christophe Lyon wrote: > > Depending on if/how the testing flags are overridden, the first value > > we try("") might not do what we want. > > > > For instance, if the whole testsuite is executed with > > (A) -m

Re: [PATCH] wwwdocs: Clarify DCO name/identity and (anonymous) pseudonym policy

2025-04-04 Thread Mark Wielaard
Hi NightStrike, On Fri, Apr 04, 2025 at 05:42:03PM -0400, NightStrike wrote: > How is an online only name different from an anonymous pseudonym? It > doesn’t seem to me that your changes actually clarify anything. To me, they > make it more ambiguous. The difference is intent. An established (onl

Re: [committed] cobol: Eliminate cobolworx UAT errors when compiling with -Os

2025-04-04 Thread Simon Sobisch
Nice that you have that covered, and thanks for sharing your way there. I just want to offer an additional thing to consider: different environments have a different byte-size for the return code (most common on COBOL for PC is 4, but 2 and 8 also exist). Micro Focus COBOL and GnuCOBOL have a

[committed] cobol: Set compile-time and run-time signable_e bits the same

2025-04-04 Thread Robert Dubner
>From 6602fc076a883cf0cd20a37655a6bd9c146a2770 Mon Sep 17 00:00:00 2001 From: Bob Dubner Date: Fri, 4 Apr 2025 18:33:42 -0400 Subject: [PATCH] cobol: Set compile-time and run-time signable_e bits the same for RETURN-CODE. This fix reverts the recent cobol_langhook_post_options change setting fla

[PATCH 1/2] c++: maybe_dependent_member_ref and stripped alias [PR118626]

2025-04-04 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? This isn't a regression and potentially impacts C++17 code, but it also makes alias CTAD unusable for our std::variant currently. -- >8 -- Here during maybe_dependent_member_ref (as part of CTAD rewriting for the var

Re: [PATCH] toplevel, Makefile: Add missing CXX_FOR_TARGET export [PR88319].

2025-04-04 Thread Jeff Law
On 3/23/25 2:13 PM, Iain Sandoe wrote: do you think it’s worth backporting (after some bake time)? Feels pretty marginal to me, but I wouldn't object if you want to. jeff

Re: [PATCH RFA] ipa: target clone and mangling alias [PR114992]

2025-04-04 Thread Jan Hubicka
> On Thu, 20 Mar 2025, Jason Merrill wrote: > > > Tested x86_64-pc-linux-gnu. OK for trunk and backports? > > > > -- 8< -- > > > > Since the mangling of the second lambda changed (previously we counted all > > lambdas, now we only count lambdas with the same signature), we > > generate_mangling

Re: [PATCH] libstdc++: Fix handling of field width for wide strings and characters [PR119593]

2025-04-04 Thread Jonathan Wakely
On Thu, 3 Apr 2025 at 09:55, Tomasz Kamiński wrote: > > This patch corrects handling of UTF-32LE and UTF32-BE in > __unicode::__literal_encoding_is_unicode<_CharT>, so they are > recognized as unicode and functions produces correct result for wchar_t. > > Use `__unicode::__field_width` to compute

[PATCH 3/3] libstdc++: Fix localized %c formatting for non-UTC times [PR117214]

2025-04-04 Thread Jonathan Wakely
The previous commit fixed most cases of %c formatting, but it incorrectly prints times using the system's local time zone. This only matters if the locale's %c format includes %Z, but some do. To print a correct value for %Z we can set tm.tm_zone to either "UTC" or the abbreviation passed to the f

Re: [PATCH 1/4] combine: Allow 2->2 combinations, but with a tweak [PR116398]

2025-04-04 Thread Jeff Law
On 4/4/25 3:21 AM, Richard Sandiford wrote: One of the problems in PR101523 was that, after each successful 2->2 combination attempt, try_combine would restart combination attempts at i2 even if i2 hadn't changed. This led to quadratic behaviour as the same failed combinations between i2 and

Re: [PATCH] libstdc++: Add unreachable checks to begin/end [PR111499]

2025-04-04 Thread Andrew Pinski
On Fri, Apr 4, 2025 at 3:37 PM Andrew Pinski wrote: > > To help along cases where begin and end are passed on to another function > and then uses std::distance on them. In the case of the testcases added, > std::lexicographical_compare_three_way (for C++20). We now able to opimize > `vector < know

[pushed] c++: __FUNCTION__ in lambda return type [PR118629]

2025-04-04 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In this testcase, the use of __FUNCTION__ is within a function parameter scope, the lambda's. And P1787 changed __func__ to live in the parameter scope. But [basic.scope.pdecl] says that the point of declaration of __func__ is immediately

Re: [PATCH] c++: structural equality and partially inst typedef [PR119379]

2025-04-04 Thread Jason Merrill
On 3/21/25 3:58 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- Complex alias templates (and their dependent specializations) use structural equality because we want to treat them as transparent in some contexts but not ot

Re: [committed] cobol: Eliminate cobolworx UAT errors when compiling with -Os

2025-04-04 Thread Sam James
Robert Dubner writes: > Anybody who might have gotten interested should stand down. Glad I could be of help ;) You had it sorted before I even got to see the first email. > > As usual, that analysis got me thinking. > > I got focused on where var_decl_return_code was being used. (I was wrong.

[PATCH] c++/modules: Propagate bits to DECL_MAYBE_DELETED dups [PR119462]

2025-04-04 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- In the linked PR, we're importing over a DECL_MAYBE_DELETED decl with a decl that has already been instantiated. This patch ensures that the needed bits are propagated across and that DECL_MAYBE_DELETED is cleared from the

combine: Re-enable 2->2 combinations, with limits [PR116398]

2025-04-04 Thread Richard Sandiford
This series is an update of: https://gcc.gnu.org/pipermail/gcc-patches/2025-April/679924.html As discussed in that thread, the changes since last time are to make distribute_links start from the last use, where easy, and to avoid an unnecessary insn walk for split_i2i3. The first three patches

[PATCH 4/4] combine: Limit insn searchs for 2->2 combinations [PR116398]

2025-04-04 Thread Richard Sandiford
As noted in the previous patch, combine still takes >30% of compile time in the original testcase for PR101523. The problem is that try_combine uses linear insn searches for some dataflow queries, so in the worst case, an unlimited number of 2->2 combinations for the same i2 can lead to quadratic

[PATCH 3/4] combine: Optimise distribute_links search [PR116398]

2025-04-04 Thread Richard Sandiford
Another problem in PR101523 was that, after each successful 2->2 combination attempt, distribute_links would search further and further for the next combinable use of the i2 destination. Each search would start at i2 itself, making the search quadratic in the worst case. In a 2->2 combination, if

[PATCH v3] libstdc++: Provide formatter for vector::reference [PR109162]

2025-04-04 Thread Tomasz Kamiński
This patch implement formatter for vector::reference which is part of P2286R8. To indicate partial support we define __glibcxx_format_ranges macro value 1, without defining __cpp_lib_format_ranges. To avoid including the whole content of the header, we introduce new bits/formatfwd.h forward decl

[PATCH 2/4] combine: Avoid split_i2i3 search if i2 is unchanged [PR116398]

2025-04-04 Thread Richard Sandiford
When combining a single-set i2 into a multi-set i3, combine first tries to match the new multi-set in-place. If that fails, combine considers splitting the multi-set so that one set goes in i2 and the other set stays in i3. That moves a destination from i3 to i2 and so combine needs to update any

[wwwdocs] Document some more libstdc++ additions in gcc-15

2025-04-04 Thread Jonathan Wakely
--- Changes for https://gcc.gnu.org/gcc-15/changes.html#libstdcxx Are we missing anything else significant? htdocs/gcc-15/changes.html | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index c80ecc50..b23c7e74 100

Re: [PATCH v2] libstdc++: Replace use of __mindist in ranges::uninitialized_xxx algos [PR101587]

2025-04-04 Thread Tomasz Kaminski
On Fri, Apr 4, 2025 at 12:51 PM Jonathan Wakely wrote: > In r15-8980-gf4b6acfc36fb1f I introduced a new function object for > finding the smaller of two distances. In bugzilla Hewill Kang pointed > out that we still need to explicitly convert the result back to the > right difference type, becaus

Re: [PATCH 2/2] libgomp: Add AArch64 SVE target tests to libgomp.

2025-04-04 Thread Jakub Jelinek
On Thu, Apr 03, 2025 at 12:07:54PM +0530, Tejas Belagod wrote: > Add AArch64 SVE target exectute tests to test various workshare constructs and > clauses with SVE types. > > libgomp/ChangeLog: > > * testsuite/libgomp.c-target/aarch64/aarch64.exp: Test driver. > * testsuite/libgomp.c-t

Re: [PATCH] cse: Fix up delete_trivially_dead_insns [PR119594]

2025-04-04 Thread Jakub Jelinek
On Fri, Apr 04, 2025 at 01:08:31PM +0200, Eric Botcazou wrote: > I guess the question is: how much do we pessimize if we tweak r0-6313 change? > For example, we could say that a use of REG in the SET_SRC does not count if > REG is also set in the SET_DEST *only* if there is no previous use of REG:

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

2025-04-04 Thread Tomasz Kaminski
On Fri, Apr 4, 2025 at 11:10 AM Jonathan Wakely wrote: > In r15-8980-gf4b6acfc36fb1f I introduced a new function object for > finding the smaller of two distances. In bugzilla Hewill Kang pointed > out that we still need to explicitly convert the result back to the > right difference type, becaus

[PATCH][gcc-14] libcpp: Fix incorrect line numbers in large files [PR108900]

2025-04-04 Thread Yash . Shinde
From: Jeremy Bettis This patch addresses an issue in the C preprocessor where incorrect line number information is generated when processing files with a large number of lines. The problem arises from improper handling of location intervals in the line map, particularly when locations exceed LINE

Re: [PATCH v2] libstdc++: Replace use of __mindist in ranges::uninitialized_xxx algos [PR101587]

2025-04-04 Thread Hewill Kang
LGTM. Here are some valid examples that are currently rejected by libstdc++ in gnu-mode (which would be resolved by this patch): https://godbolt.org/z/c14T6dazc #include #include int main() { int x[5] = {}; auto out = std::views::iota(__int128(0), __int128(5))

[committed] libstdc++: allow defining version FTMs without standard-named macros

2025-04-04 Thread Jonathan Wakely
This is useful to provide libstdc++-internal-only macros. libstdc++-v3/ChangeLog: * include/bits/version.tpl: Implement no_stdname. * include/bits/version.def: Document no_stdname. --- Arsen provided this patch via IRC a few days ago. Tested x86_64-linux. Pushed to trunk. libs

[committed] libstdc++: Fix whitespace in std::basic_string::_M_construct

2025-04-04 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/basic_string.tcc: Fix whitespace. --- Pushed to trunk. libstdc++-v3/include/bits/basic_string.tcc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_

Re: [PATCH] cse: Fix up delete_trivially_dead_insns [PR119594]

2025-04-04 Thread Eric Botcazou
> I'm afraid having different behavior for incr > 0 and incr < 0 could be a > problem, then we would not decrease it even if we've increased it > previously, so this would make setters of that REGNO effectively > undeletable. Yes, the setters that are before it in the RTL stream, which is precisel

Re: [PATCH v5] libcpp: Fix incorrect line numbers in large files [PR108900]

2025-04-04 Thread Jonathan Wakely
On Fri, 4 Apr 2025 at 12:37, Yash Shinde wrote: > > > On 29-03-2025 03:50, Jason Merrill wrote: > > CAUTION: This email comes from a non Wind River email account! > > Do not click links or open attachments unless you recognize the sender > > and know the content is safe. > > > > On 3/28/25 3:54 AM

[PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-04 Thread Ard Biesheuvel
From: Ard Biesheuvel Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling __fentry__") updated the logic that emits mcount() / __fentry__() calls into function prologues when profiling is enabled, to avoid GOT-based indirect calls when a direct call would suffice. There are two

[PATCH 1/2] arm: Only reverse FP inequalities when -ffinite-math-only [PR110796...]

2025-04-04 Thread Richard Earnshaw
On Arm we have been failing to fully implement support for IEEE NaNs in inequality comparisons because we have allowed reversing of inequalities in a way that allows SELECT_CC_MODE to produce different answers. For example, the reverse of GT is UNLE, but if we pass these two RTL codes to SELECT_CC

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

2025-04-04 Thread Jonathan Wakely
On Fri, 4 Apr 2025 at 11:05, Hewill Kang wrote: > > Linstdc++’s __max_size_type is only explicitly converted to other integral if > I recall correctly. Hmm, yes, you're right. So why don't we get errors for __mindist not converting back to an integer? Aha, it's because the only view that uses _

Re: [PATCH v4 1/3] gomp: Various fixes for SVE types [PR101018]

2025-04-04 Thread Jakub Jelinek
On Tue, Mar 18, 2025 at 11:27:06AM +0530, Tejas Belagod wrote: > From: Richard Sandiford > > Various parts of the omp code checked whether the size of a decl > was an INTEGER_CST in order to determine whether the decl was > variable-sized or not. If it was variable-sized, it was expected > to ha

Re: [PATCH] libstdc++: Check feature test macro for std::string_view in

2025-04-04 Thread Tomasz Kaminski
On Fri, Apr 4, 2025 at 11:08 AM Jonathan Wakely wrote: > We can use the __glibcxx_string_view macro to guard the uses of > std::string_view in , instead of just checking the value of > __cplusplus. It makes no practical difference because > __glibcxx_string_view is defined for C++17 and up, but i

Re: [PATCH 1/4] combine: Allow 2->2 combinations, but with a tweak [PR116398]

2025-04-04 Thread Richard Biener
On Fri, 4 Apr 2025, Richard Sandiford wrote: > One of the problems in PR101523 was that, after each successful > 2->2 combination attempt, try_combine would restart combination > attempts at i2 even if i2 hadn't changed. This led to quadratic > behaviour as the same failed combinations between i2

Re: [PATCH 4/4] combine: Limit insn searchs for 2->2 combinations [PR116398]

2025-04-04 Thread Richard Biener
On Fri, 4 Apr 2025, Richard Sandiford wrote: > As noted in the previous patch, combine still takes >30% of > compile time in the original testcase for PR101523. The problem > is that try_combine uses linear insn searches for some dataflow > queries, so in the worst case, an unlimited number of 2-

[Ada] Fix thinko in Eigensystem for complex Hermitian matrices

2025-04-04 Thread Eric Botcazou
The implementation solves the eigensystem for a NxN complex Hermitian matrix by first solving it for a 2Nx2N real symmetric matrix and then interpreting the 2Nx1 real vectors as Nx1 complex ones, but the last step does not work. The patch fixes the last step and also performs a small cleanup throu

Re: [PATCH 3/4] combine: Optimise distribute_links search [PR116398]

2025-04-04 Thread Richard Sandiford
Richard Sandiford writes: > Richard Biener writes: >> On Fri, 4 Apr 2025, Richard Sandiford wrote: >> >>> Another problem in PR101523 was that, after each successful 2->2 >>> combination attempt, distribute_links would search further and further >>> for the next combinable use of the i2 destinati

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-04 Thread Qing Zhao
> On Apr 4, 2025, at 04:59, Bill Wendling wrote: > > On Thu, Apr 3, 2025 at 9:54 AM Kees Cook wrote: >> On Wed, Apr 02, 2025 at 09:16:47PM +, Qing Zhao wrote: >>> Hi, Bill, >>> >>> Thanks for the summary. >>> >>> I think that this is good. >>> >>> Two more questions: >>> >>> 1. Shall w

Re: [PATCH 06/10] testsuite: aarch64: arm: Add -mfpu=auto to arm_v8_2a_bf16_neon_ok

2025-04-04 Thread Christophe Lyon
On Fri, 21 Mar 2025 at 16:15, Christophe Lyon wrote: > > On Fri, 21 Mar 2025 at 15:25, Richard Earnshaw (lists) > wrote: > > > > On 21/03/2025 14:05, Christophe Lyon wrote: > > > On Fri, 21 Mar 2025 at 11:18, Richard Earnshaw (lists) > > > wrote: > > >> > > >> On 20/03/2025 16:15, Christophe Lyo

[COMMITTED 069/144] gccrs: Introduce `IndexVec`

2025-04-04 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-place.h (struct Loan): Introduce new class `IndexVec` inspired from IndexVec of rust. It acts as a wrapper around `std::vector` and lets user specify a strong type to use as index. Signed-off-

Re: [PATCH] wwwdocs: Clarify DCO name/identity and (anonymous) pseudonym policy

2025-04-04 Thread Mark Wielaard
Hi Gerald, On Sun, 2025-03-30 at 15:46 +0200, Mark Wielaard wrote: > Ping again. Are there any other clarifications you like to see added? So I believe this week we had a situation where this clarified test would have been helpful. Is there anything that prevents this from going in? Thanks, Mar

Re: [PATCH] combine: Special case set_noop_p in two spots

2025-04-04 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 12:20:18PM +0100, Jakub Jelinek wrote: > Here is the incremental patch I was talking about. > For noop sets, we don't need to test much, they can go to i2 > unless that would violate i3 JUMP condition. > > With this the try_combine on the pr119291.c testcase doesn't fail, >

[PATCH] cobol: Replace quadratic loop removing std::set elements

2025-04-04 Thread Jonathan Wakely
There's no need to keep using std::find_if from the beginning of the container after every removal, just update the iterator after erasing an element. This is how C++20 std::erase_if is implemented. gcc/cobol/ChangeLog: * except.cc (cbl_enabled_exceptions_t::turn_on_off): Replace

Re: [PATCH] c++/modules: Fix divergence in streaming/non-streaming tree walks [PR119608]

2025-04-04 Thread Patrick Palka
On Fri, 4 Apr 2025, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > -- >8 -- > > Modules streaming walks decls multiple times, first as a non-streaming > walk to find dependencies, and then later to actually emit the decls. > The first walk needs to

Re: [committed] cobol: Eliminate cobolworx UAT errors when compiling with -Os

2025-04-04 Thread Sam James
Robert Dubner writes: > From e70fe5ed46ab129a8b1da961c47d3fb75b11b988 Mon Sep 17 00:00:00 2001 > From: Bob Dubner mailto:rdub...@symas.com > Date: Fri, 4 Apr 2025 13:48:58 -0400 > Subject: [PATCH] cobol: Eliminate cobolworx UAT errors when compiling with > -Os > > Testcases compiled with -Os were

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

2025-04-04 Thread Ezra.Sitorus
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/binutils/2025-March/139894.html gcc/ChangeLog: * config/aarch64/aarch64-sys-regs.def: Copy from Binutils. --- Tested on aarch64

[COMMITTED 089/146] gccrs: ast-builder: Add more methods

2025-04-04 Thread arthur . cohen
From: Arthur Cohen This commit adds new methods for building pattern nodes, match expressions and more precise call expressions. gcc/rust/ChangeLog: * ast/rust-ast-builder.cc: Add new functions. * ast/rust-ast-builder.h: Declare them. --- gcc/rust/ast/rust-ast-builder.cc | 91

Re: [PATCH] cse: Fix up delete_trivially_dead_insns [PR119594]

2025-04-04 Thread Jakub Jelinek
On Fri, Apr 04, 2025 at 01:56:31PM +0100, Richard Sandiford wrote: > My suggestion isn't elegant, but: once we've decided not to delete > an instruction, we need to keep all definitions of all registers used > by the instruction (given the way that the algorithm works). So how > about instead just

Re: [PATCH] c++: constraint variable used in evaluated context [PR117849]

2025-04-04 Thread Patrick Palka
On Fri, 4 Apr 2025, Patrick Palka wrote: > On Thu, 3 Apr 2025, Jason Merrill wrote: > > > On 4/2/25 2:28 PM, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > > OK for trunk/14? > > > > OK for 14. > > > > For 15, what happens if we remove that erro

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-04 Thread Michael Matz
Hello, On Fri, 4 Apr 2025, Bill Wendling wrote: > > > I don’t have strong preference here. As mentioned by Jacub in a > > > previous email, these two syntaxes can be distinguished by the number > > > of arguments of the attribute. > > > > > > So for GCC, there should be no issue w

Re: [PATCH] tailc: Use the IPA-VRP tail call hack even for pointers [PR119614]

2025-04-04 Thread Andrew MacLeod
On 4/4/25 00:57, Jakub Jelinek wrote: Hi! As the first two testcases show, even with pointers IPA-VRP can optimize return values from functions if they have singleton ranges into just the exact value, so we need to virtually undo that for tail calls similarly to integers and floats. The third

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

2025-04-04 Thread Hewill Kang
Linstdc++’s __max_size_type is only explicitly converted to other integral if I recall correctly. Jonathan Wakely 於 2025年4月4日 週五,17:56寫道: > On Fri, 4 Apr 2025 at 10:32, Tomasz Kaminski wrote: > > > > > > > > On Fri, Apr 4, 2025 at 11:10 AM Jonathan Wakely > wrote: > >> > >> In r15-8980-gf4b6acf

Re: [PATCH] libstdc++: Avoid redundant value_type object in flat_set::emplace [PR119620]

2025-04-04 Thread Tomasz Kaminski
On Fri, Apr 4, 2025 at 5:50 PM Patrick Palka wrote: > flat_set::emplace (and flat_multiset) currently unconditionally > constructs an object outside of the container, but if we're passed > a value_type object we can and should avoid that. > > PR libstdc++/119620 > > libstdc++-v3/ChangeLog

[PATCH] c++: harmless use of 'this' rejected despite P2280R4 [PR118249]

2025-04-04 Thread Patrick Palka
Here the implicit use of 'this' in inner.size() template argument was being rejected despite P2280R4 relaxations, due to the special *this handling in the INDIRECT_REF case of potential_constant_expression_1. This handling was originally added by r196737 as part of the PR56481, and it seems obsole

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

2025-04-04 Thread Jonathan Wakely
On Fri, 4 Apr 2025 at 11:27, Jonathan Wakely wrote: > > On Fri, 4 Apr 2025 at 11:05, Hewill Kang wrote: > > > > Linstdc++’s __max_size_type is only explicitly converted to other integral > > if I recall correctly. > > Hmm, yes, you're right. So why don't we get errors for __mindist not > convert

Re: [PATCH 3/4] combine: Optimise distribute_links search [PR116398]

2025-04-04 Thread Richard Biener
On Fri, 4 Apr 2025, Richard Sandiford wrote: > Another problem in PR101523 was that, after each successful 2->2 > combination attempt, distribute_links would search further and further > for the next combinable use of the i2 destination. Each search would > start at i2 itself, making the search q

[PATCH v$] libstdc++: Provide formatter for vector::reference [PR109162]

2025-04-04 Thread Tomasz Kamiński
This patch implement formatter for vector::reference which is part of P2286R8. To indicate partial support we define __glibcxx_format_ranges macro value 1, without defining __cpp_lib_format_ranges. To avoid including the whole content of the header, we introduce new bits/formatfwd.h forward decl

Re: [PATCH 1/2] AArch64: Add OpenMP target compile error tests

2025-04-04 Thread Jakub Jelinek
On Thu, Apr 03, 2025 at 12:07:53PM +0530, Tejas Belagod wrote: > Add compile-only OpenMP error tests for target clause used with SVE types. > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/sve/gomp/gomp.exp: Test driver. > * gcc.target/aarch64/sve/gomp/target-device.c: New test.

Re: [PATCH v$] libstdc++: Provide formatter for vector::reference [PR109162]

2025-04-04 Thread Jonathan Wakely
On 04/04/25 12:48 +0200, Tomasz Kamiński wrote: This patch implement formatter for vector::reference which is part of P2286R8. To indicate partial support we define __glibcxx_format_ranges macro value 1, without defining __cpp_lib_format_ranges. To avoid including the whole content of the head

Re: [PATCH 1/2] AArch64: Add OpenMP target compile error tests

2025-04-04 Thread Jakub Jelinek
On Fri, Apr 04, 2025 at 12:48:56PM +0200, Jakub Jelinek wrote: > On Thu, Apr 03, 2025 at 12:07:53PM +0530, Tejas Belagod wrote: > > Add compile-only OpenMP error tests for target clause used with SVE types. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/aarch64/sve/gomp/gomp.exp: Test

Re: [PATCH v4 2/3] Add function to strip pointer type and get down to the actual pointee type.

2025-04-04 Thread Jakub Jelinek
On Tue, Mar 18, 2025 at 11:27:07AM +0530, Tejas Belagod wrote: > Add a function to traverse down the pointer layers to the pointee type. > > gcc/ChangeLog: > * tree.h (strip_pointer_types): New. > --- > gcc/tree.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/gcc/tree.h

Re: [PATCH v4 3/3] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-04-04 Thread Jakub Jelinek
On Tue, Mar 18, 2025 at 11:27:08AM +0530, Tejas Belagod wrote: > The target clause in OpenMP is used to offload loop kernels to accelarator > peripeherals. target's 'map' clause is used to move data from and to the > accelarator. When the data is SVE type, it may not be suitable because of > vari

[PATCH v2] libstdc++: Replace use of __mindist in ranges::uninitialized_xxx algos [PR101587]

2025-04-04 Thread Jonathan Wakely
In r15-8980-gf4b6acfc36fb1f I introduced a new function object for finding the smaller of two distances. In bugzilla Hewill Kang pointed out that we still need to explicitly convert the result back to the right difference type, because the result might be an integer-like class type that doesn't co

Re: [PATCH] c++: constraint variable used in evaluated context [PR117849]

2025-04-04 Thread Patrick Palka
On Thu, 3 Apr 2025, Jason Merrill wrote: > On 4/2/25 2:28 PM, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > OK for trunk/14? > > OK for 14. > > For 15, what happens if we remove that error entirely? Do we still give other > errors in that case?

Re: [PATCH] cse: Fix up delete_trivially_dead_insns [PR119594]

2025-04-04 Thread Eric Botcazou
> The problem is in that r0-6313 change, which made count_reg_usage not > count uses of the pseudo which the containing SET sets. That is needed > so we can delete those instructions as trivially dead if they are really > dead, but has the following problem. After fwprop proper we have: > (insn 7

Re: [PATCH] tailc: Use the IPA-VRP tail call hack even for pointers [PR119614]

2025-04-04 Thread Richard Biener
On Fri, 4 Apr 2025, Jakub Jelinek wrote: > Hi! > > As the first two testcases show, even with pointers IPA-VRP can optimize > return values from functions if they have singleton ranges into just the > exact value, so we need to virtually undo that for tail calls similarly > to integers and floats

Re: [PATCH v5] libcpp: Fix incorrect line numbers in large files [PR108900]

2025-04-04 Thread Yash Shinde
On 29-03-2025 03:50, Jason Merrill wrote: CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. On 3/28/25 3:54 AM, yash.shi...@windriver.com wrote: From: Jeremy Bettis This patch

Re: COBOL: Implementation of STOP RUN / GOBACK

2025-04-04 Thread Simon Sobisch
Am 20.03.2025 um 21:50 schrieb James K. Lowden: On Mar 13, 2025, at 8:04 AM, Simon Sobisch wrote: exit() allows us to "pass to the operating system" directly; but it doesn't directly say "success" or "fail". Obviously the statements STOP RUN WITH NORMAL STATUS 41 and STOP RUN ERROR

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

2025-04-04 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Thursday, March 20, 2025 10:16 > To: gcc-patches@gcc.gnu.org > Cc: Jakub Jelinek ; rdub...@symas.com > Subject: Re: [PATCH][RFC] [cobol] change cbl_field_data_t::etc_t::value > from _Float128 to tree > > On Thu, 20 Mar 2025, Richard B

[COMMITTED 039/146] gccrs: Fix FnParam pattern location ternary logic

2025-04-04 Thread arthur . cohen
From: Pierre-Emmanuel Patry Condition was inverted, we should retrieve the locus only if we have a pattern. gcc/rust/ChangeLog: * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Do not get a reference if the pattern does not exist. (TypeCheckMethodCallExpr::check

[PATCH v2] libstdc++: Provide formatter for vector::reference [PR109162]

2025-04-04 Thread Tomasz Kamiński
This patch implement formatter for vector::reference which is part of P2286R8. To indicate partial support we define __glibcxx_format_ranges macro value 1, without defining __cpp_lib_format_ranges. To avoid including the whole content of the header, we introduce new bits/formatfwd.h forward decl

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-04 Thread Qing Zhao
> On Apr 4, 2025, at 11:54, Martin Uecker wrote: > > Am Freitag, dem 04.04.2025 um 15:22 + schrieb Qing Zhao: >> Hi, Michael, >> >> Thanks a lot for raising these questions for the parser implementation of >> the new syntax. >> >> I started thinking about how to implement this new syntax

Re: [PATCH] libstdc++: Avoid redundant value_type object in flat_set::emplace [PR119620]

2025-04-04 Thread Tomasz Kaminski
On Fri, Apr 4, 2025 at 6:21 PM Patrick Palka wrote: > On Fri, 4 Apr 2025, Patrick Palka wrote: > > > On Fri, 4 Apr 2025, Tomasz Kaminski wrote: > > > > > > > > > > > On Fri, Apr 4, 2025 at 6:07 PM Tomasz Kaminski > wrote: > > > > > > > > > On Fri, Apr 4, 2025 at 5:50 PM Patrick Palka > wrote: >

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-04 Thread Qing Zhao
So, a different attribute name “counted_by_exp” might be better? Qing > On Apr 4, 2025, at 11:55, Michael Matz wrote: > > Hello, > > On Fri, 4 Apr 2025, Qing Zhao wrote: > >> A: >> constexpr int len = 20; >> struct s { >> int len; >> int *buf __attribute__ ((counted_by (len))); // this cont

Re: [PATCH] c++/modules: Propagate bits to DECL_MAYBE_DELETED dups [PR119462]

2025-04-04 Thread Jason Merrill
On 4/4/25 4:14 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- In the linked PR, we're importing over a DECL_MAYBE_DELETED decl with a decl that has already been instantiated. This patch ensures that the needed bits are propagated acr

Re: [PATCH] c++/modules: Fix divergence in streaming/non-streaming tree walks [PR119608]

2025-04-04 Thread Jason Merrill
On 4/3/25 9:09 PM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- Modules streaming walks decls multiple times, first as a non-streaming walk to find dependencies, and then later to actually emit the decls. The first walk needs to be done

  1   2   3   >