[PATCH 1/3][GCC16-Stage-1] RISC-V: Combine vec_duplicate + vadd.vv to vadd.vx on GR2VR cost

2025-04-17 Thread pan2 . li
From: Pan Li This patch would like to combine the vec_duplicate + vadd.vv to the vadd.vx. From example as below code. The related pattern will depend on the cost of vec_duplicate from GR2VR, it will: * The pattern matching will be inactive if GR2VR cost is zero. * The cost of GR2VR will be add

RE: [PATCH 3/3][GCC16-Stage-1] RISC-V: Add testcases for vec_duplicate + vadd.vv combine to vadd.vx

2025-04-17 Thread Li, Pan2
Hi Robin, I am not sure if we have some options additional to below, like -march=generic, to ensure that the late-combine will take action as expected in testcases. +/* { dg-options "-march=rv64gcv -mabi=lp64d" } */ Pan -Original Message- From: Li, Pan2 Sent: Thursday, April 17, 2025

[PATCH 2/3][GCC16-Stage-1] RISC-V: Adjust the testcases after vec_duplicate + vadd.vv combine

2025-04-17 Thread pan2 . li
From: Pan Li After we support the vec_duplicate + vadd.vv combine to vadd.vx, the existing testcases need some adjust for asm dump check times. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/

Re: [PATCH 3/3][GCC16-Stage-1] RISC-V: Add testcases for vec_duplicate + vadd.vv combine to vadd.vx

2025-04-17 Thread Robin Dapp
Hi Pan, I am not sure if we have some options additional to below, like -march=generic, to ensure that the late-combine will take action as expected in testcases. +/* { dg-options "-march=rv64gcv -mabi=lp64d" } */ I haven't gone through the rest yet (will take some more days) but yes, I agr

Re: [PATCH v2] libstdc++: Remove dead code in range_formatter::format [PR109162]

2025-04-17 Thread Jonathan Wakely
OK for trunk with two spelling fixes... On Thu, 17 Apr 2025, 07:31 Tomasz Kamiński, wrote: > Because the _M_format(__rg, __fc) were placed outside of if constexpr, > these method and it's childs where "its children" instantiated, even if _M_format > could be used. > > To simplify the if cons

Re: [PATCH] Fix wrong optimization of conditional expression with enumeration type

2025-04-17 Thread Eric Botcazou
> LGTM. I do wonder if this could be documented somewhere if not > already. Because I suspect there are other places which miss that if > TYPE_PRECISION are equal, you might still need a cast for boolean > types. Maybe a helper function might be useful too. The knowledge is indeed encoded in usele

[PUSHED] nvptx: Remove 'TARGET_ASM_NEED_VAR_DECL_BEFORE_USE'

2025-04-17 Thread Thomas Schwinge
Unused; remnant of an (internal) experiment, before we had nvptx 'as'. gcc/ * config/nvptx/nvptx.cc (TARGET_ASM_NEED_VAR_DECL_BEFORE_USE): Don't '#define'. --- gcc/config/nvptx/nvptx.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/co

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

2025-04-17 Thread Jakub Jelinek
On Thu, Apr 17, 2025 at 10:00:26AM +0300, Alexander Monakov wrote: > > On Thu, 17 Apr 2025, Sam James wrote: > > > --- a/gcc/doc/invoke.texi > > +++ b/gcc/doc/invoke.texi > > @@ -14649,12 +14649,14 @@ Enabled at levels @option{-O2}, @option{-O3}, > > @option{-Os}. > > @item -fstrict-aliasing >

[PATCH] stdc++: Fixed signed comparision in _M_parse_fill_and_align [PR119840]

2025-04-17 Thread Tomasz Kamiński
Explicitly cast elements of __not_fill to _CharT. Only '{' and ':' are are used as `__not_fill`, so they are never negative. PR libstdc++/119840 libstdc++-v3/ChangeLog: * include/std/format (_M_parse_fill_and_align): Cast elements of _not_fill to _CharT. --- Tested on x86

[PATCH 3/3][GCC16-Stage-1] RISC-V: Add testcases for vec_duplicate + vadd.vv combine to vadd.vx

2025-04-17 Thread pan2 . li
From: Pan Li Add asm dump check and run test for vec_duplicate + vadd.vv combine to vadd.vx. Introduce new folder to hold all related testcases. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/rvv.ex

[committed v2] libstdc++: Do not use 'not' alternative token in

2025-04-17 Thread Jonathan Wakely
This fixes: FAIL: 17_intro/headers/c++1998/operator_names.cc -std=gnu++23 (test for excess errors) FAIL: 17_intro/headers/c++1998/operator_names.cc -std=gnu++26 (test for excess errors) The purpose of 'not defined>' is to be ill-formed (as required by [format.range.fmtkind]) and to give an err

[PATCH] testsuite: g++.dg/cpp2a/constinit16.C requires tls

2025-04-17 Thread Christophe Lyon
This test is 'dg-do compile', so require tls instead of tls_runtime. This enables it on targets such as arm-none-eabi configured with --enable-threads=no. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/constinit16.C: Require tls. --- gcc/testsuite/g++.dg/cpp2a/constinit16.C | 2 +- 1 file chan

[PATCH] testsuite: g++.dg/cpp2a/decomp2.C requires tls_runtime

2025-04-17 Thread Christophe Lyon
Since this test is a 'dg-do run', it requires tls_runtime rather than just tls. This makes the test UNSUPPORTED on targets such as arm-non-eabi, instead of FAIL/UNRESOLVED because __aeabi_read_tp is not provided (e.g. when GCC is configured with --enable-threads=no. gcc/testsuite/ChangeLog:

Re: [PATCH v1 0/4] Implement extents from the mdspan header.

2025-04-17 Thread Luc Grosheintz
The `v1` in the subject line is a copy-paste error while creating the subject line. This is the preceding patch series: https://gcc.gnu.org/pipermail/libstdc++/2025-April/060988.html On 4/17/25 1:16 PM, Luc Grosheintz wrote: The following changes were made since v2: * Implement the missing part

[Fortran, Patch, Teams, 6/5] Various fixes for F2018 teams support (was: Re: [Fortran, Patch, Teams, 0/5] Improve on Fortran 2018 teams support)

2025-04-17 Thread Andre Vehreschild
Hi Jerry, thanks for the review and sorry for the long delay. With publishing the team's patches for gfortran, I also created a pull request for OpenCoarrays. There I was asked to add some testcase with more "beef" in it. I.e. something that really makes use of teams and not only smoke tests it. T

Re: [PATCH] libstdc++: Constrain formatters for chrono types [PR119517]

2025-04-17 Thread Jonathan Wakely
On Thu, 17 Apr 2025 at 13:14, Tomasz Kaminski wrote: > > As the formattable concept is used for the formatting of ranges and tuples > that was shipped in v15, > I do not think there is a real need to backport this to v14. There is not > much harm in getting wrong response > before range and tupl

Re: [PATCH] OpenMP: omp.h omp::allocator C++ Allocator interface

2025-04-17 Thread Rainer Orth
Tobias Burnus writes: > Alex wrote: >> Tested on x86_64-pc-linux-gnu, this is only a library addition (and a >> few tests) so it shouldn't cause any major impacts. I also tested >> libgomp C to ensure the conditional compile was working. > > Namely, the change is only to omp.h(.in) - effective f

[pushed] c++: ill-formed constexpr function [PR113360]

2025-04-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- If we already gave an error while parsing a function, we don't also need to try to explain what's wrong with it when we later try to use it in a constant-expression. In the new testcase explain_invalid_constexpr_fn couldn't find anything st

Re: [PATCH] PR tree-optimization/119712 - Always reflect lower bits from mask in subranges.

2025-04-17 Thread Richard Biener
On Wed, Apr 16, 2025 at 10:55 PM Andrew MacLeod wrote: > > This was a fun one! An actual bug, and it took a while to sort out. > After chasing down some red herrings, this turns out to be an issue of > interaction between the range and value masks and intervening calculations. > > The original p

[PATCH v1 0/4] Implement extents from the mdspan header.

2025-04-17 Thread Luc Grosheintz
The following changes were made since v2: * Implement the missing part of the class mandates. * Combined more test cases into a smaller number of files. * Changed constexpr checks as requested. * Small improvements to the test rigour. * Several cosmetic changes requested during review. The first t

[PATCH v3 4/4] libstdc++: Add tests for std::extents.

2025-04-17 Thread Luc Grosheintz
A prior commit added std::extents, this commit adds the tests. The bulk is focussed on testing the constructors. These are split into three groups: 1. the ctor from other extents and the copy ctor, 2. the ctor from a pack of integer-like objects, 3. the ctor from shapes, i.e. span and array. For

[PATCH v3 2/4] libstdc++: Add header mdspan to the build-system.

2025-04-17 Thread Luc Grosheintz
Creates a nearly empty header mdspan and adds it to the build-system and Doxygen config file. libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in: Add . * include/Makefile.am: Ditto. * include/Makefile.in: Ditto. * include/precompiled/stdc++.h: Ditto. * inclu

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Tomasz Kaminski
On Thu, Apr 17, 2025 at 2:21 PM Tomasz Kaminski wrote: > > > On Thu, Apr 17, 2025 at 1:44 PM Tomasz Kaminski > wrote: > >> >> >> On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz >> wrote: >> >>> This implements std::extents from according to N4950 and >>> contains partial progress towards PR1077

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Tomasz Kaminski
On Thu, Apr 17, 2025 at 1:44 PM Tomasz Kaminski wrote: > > > On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz > wrote: > >> This implements std::extents from according to N4950 and >> contains partial progress towards PR107761. >> >> If an extent changes its type, there's a precondition in the st

Re: [PATCH] stdc++: Fixed signed comparision in _M_parse_fill_and_align [PR119840]

2025-04-17 Thread Jonathan Wakely
Subject line has "stdc++" instead of "libstdc++" On Thu, 17 Apr 2025 at 10:14, Tomasz Kamiński wrote: > > Explicitly cast elements of __not_fill to _CharT. Only '{' and ':' > are are used as `__not_fill`, so they are never negative. "are are" > > PR libstdc++/119840 > > libstdc++-v3/Cha

Re: [PATCH] Fix wrong optimization of conditional expression with enumeration type

2025-04-17 Thread Richard Biener
On Thu, Apr 17, 2025 at 10:19 AM Eric Botcazou wrote: > > > LGTM. I do wonder if this could be documented somewhere if not > > already. Because I suspect there are other places which miss that if > > TYPE_PRECISION are equal, you might still need a cast for boolean > > types. Maybe a helper functi

GCC 16.0.0 Status Report (2025-04-17)

2025-04-17 Thread Richard Biener
Status == We have reached zero P1 regressions and branched for the GCC 15 release. This leaves trunk which is to become GCC 16 next year open for general development, Stage 1, again. Please refrain from disrupting git master too much so that last-minute fixes for GCC 15.1 can be staged there

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Luc Grosheintz
Thank you for another excellent review! On 4/17/25 1:44 PM, Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz wrote: This implements std::extents from according to N4950 and contains partial progress towards PR107761. If an extent changes its type, there's

Re: [PATCH] Fix wrong optimization of conditional expression with enumeration type

2025-04-17 Thread Richard Biener
On Thu, Apr 17, 2025 at 2:10 PM Eric Botcazou wrote: > > > That looks like a good place - can we possibly say sth about signedness a > > well? IIRC all languages have unsigned bools but vector mask components are > > signed bools? > > Not really the right person to answer the above second ? I'm af

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

2025-04-17 Thread Michael Matz
Hello, On Tue, 15 Apr 2025, Bill Wendling wrote: > > [... the horrors ...] > > All of this horribleness is because of the insistence of allowing for > primary expressions in the attributes, which I find to be a horrible > idea. I whole-heartedly agree with you :) But in light of this insistence

[committed] libgomp: Don't test ompx::allocator::gnu_pinned_mem on non-linux targets [PR119849]

2025-04-17 Thread Jakub Jelinek
On Tue, Apr 15, 2025 at 12:05:05PM -0600, Alex wrote: > * testsuite/libgomp.c++/allocator-1.C: New test. > * testsuite/libgomp.c++/allocator-2.C: New test. The libgomp.c/alloc-pinned*.c test have /* { dg-skip-if "Pinning not implemented on this host" { ! *-*-linux-gnu* } } */ so they a

[PATCH v3 1/4] libstdc++: Setup internal FTM for mdspan.

2025-04-17 Thread Luc Grosheintz
Uses the FTM infrastructure to create an internal feature testing macro for partial availability of mdspan; which is then used to hide the contents of the header mdspan when compiling against a standard prior to C++23. libstdc++-v3/ChangeLog: * include/bits/version.def: Add internal featu

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Tomasz Kaminski
On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz wrote: > This implements std::extents from according to N4950 and > contains partial progress towards PR107761. > > If an extent changes its type, there's a precondition in the standard, > that the value is representable in the target integer type.

Re: [PATCH] libstdc++: Constrain formatters for chrono types [PR119517]

2025-04-17 Thread Jonathan Wakely
On Thu, 17 Apr 2025 at 07:06, Tomasz Kaminski wrote: > > > > On Fri, Mar 28, 2025 at 9:33 PM Jonathan Wakely wrote: >> >> On 28/03/25 16:31 +0100, Tomasz Kamiński wrote: >> >The formatters for chrono types defined the parse/format methods >> >as accepting unconstrained types, this in combination

Re: [PATCH] Fix wrong optimization of conditional expression with enumeration type

2025-04-17 Thread Eric Botcazou
> That looks like a good place - can we possibly say sth about signedness a > well? IIRC all languages have unsigned bools but vector mask components are > signed bools? Not really the right person to answer the above second ? I'm afraid. diff --git a/gcc/tree.def b/gcc/tree.def index c4ad8d08f10

Re: [PATCH v3 4/4] libstdc++: Add tests for std::extents.

2025-04-17 Thread Tomasz Kaminski
On Thu, Apr 17, 2025 at 1:20 PM Luc Grosheintz wrote: > A prior commit added std::extents, this commit adds the tests. The bulk > is focussed on testing the constructors. These are split into three > groups: > > 1. the ctor from other extents and the copy ctor, > 2. the ctor from a pack of intege

Re: [PATCH] rx: avoid adding setpsw for rx_cmpstrn when len is const

2025-04-17 Thread Keith Packard
> Thanks. I made some minor stylistic adjustments and pushed the change > to the trunk. Thanks! That's awesome, thanks so much! -- -keith signature.asc Description: PGP signature

GCC 15.0.1 Status Report (2025-04-17), branch frozen for release

2025-04-17 Thread Richard Biener
We have branched for the GCC 15 release. All changes on the releases/gcc-15 branch require release manager approval now. Quality Data Priority # Change from last report --- --- P1 - 17 P2 580- 2

RE: [PATCH 3/3][GCC16-Stage-1] RISC-V: Add testcases for vec_duplicate + vadd.vv combine to vadd.vx

2025-04-17 Thread Li, Pan2
Thanks Robin for suggestion. > Any other ideas? I think I prefer the second option. I also prefer option 2 which is more straight forward. But there may be question here, the option like --param=gr2vr_xx will be available from the end-user's perspective, and I think we may need to consider even

[PATCH][v13] libstdc++: Correct preprocessing checks for floatX_t and bfloat_16 formatting

2025-04-17 Thread Tomasz Kamiński
Floating points types _Float16, _Float32, _Float64, and bfloat16, can be formatted only if std::to_chars overloads for such types were provided. Currently this is only the case for architectures where float and double are 32-bits and 64-bits IEEE floating points types. Remove a potential UB, where

[GCC 15] testsuite: XFAIL predcom-8.c on aarch64 [PR118407]

2025-04-17 Thread Richard Sandiford
gcc.dg/tree-ssa/predcom-8.c fails on aarch64 for the reasons discussed in the PR trail. The fix didn't make it into GCC 15, so this patch XFAILs the test instead. Other targets might benefit from an XFAIL too, but people who work on those targets would be better placed to know the right condition

[wwwdocs][Patch] gcc-15/changes: Fortran + offload (C++) update | project/gomp: GCC 15 update

2025-04-17 Thread Tobias Burnus
Hi all, @Fortraners: Comments to the added 'do concurrent' item? @Thomas: Are you fine with this C++ wording? @Andrew: Likewise for C++ and ROCm bump? Anyone: comments are welcome. Affected pages: * https://gcc.gnu.org/gcc-15/changes.html * https://gcc.gnu.org/projects/gomp/ Cheers, Tobia

Re: [wwwdocs][Patch] gcc-15/changes: Fortran + offload (C++) update | project/gomp: GCC 15 update

2025-04-17 Thread Andrew Stubbs
On 17/04/2025 15:10, Tobias Burnus wrote: Hi all, @Fortraners: Comments to the added 'do concurrent' item? @Thomas: Are you fine with this C++ wording? @Andrew: Likewise for C++ and ROCm bump? This part is fine with me. Andrew Anyone: comments are welcome. Affected pages: * https://gcc.

[committed, gcc-15] libstdc++: Update status tables to refer to GCC 15 not mainline

2025-04-17 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * doc/html/manual/status.html: Regenerate. * doc/xml/manual/status_cxx1998.xml: Replace references to mainline GCC. * doc/xml/manual/status_cxx2011.xml: Likewise. * doc/xml/manual/status_cxx2014.xml: Likewise. * doc/xml/manual

Re: [PATCH v3 3/4] libstdc++: Implement std::extents [PR107761].

2025-04-17 Thread Luc Grosheintz
On 4/17/25 2:31 PM, Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 2:21 PM Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 1:44 PM Tomasz Kaminski wrote: On Thu, Apr 17, 2025 at 1:18 PM Luc Grosheintz wrote: This implements std::extents from acco

Re: Add sse_fp_cost into i386_rtx_costs

2025-04-17 Thread Jan Hubicka
> On Thu, 17 Apr 2025, Jan Hubicka wrote: > > > Hi, > > Znver5 has addss cost of 2 while other common floating point SSE operations > > costs 3 cycles. We currently have only one entry in the costs tables which > > makes it impossible to model this. This patch adds sse_fp_op which is used > > f

Re: [PATCH] libstdc++: Correct preprocessing checks for floatX_t and bfloat_16 formatting

2025-04-17 Thread Jonathan Wakely
On Thu, 17 Apr 2025 at 07:06, Tomasz Kaminski wrote: > > > > On Wed, Mar 12, 2025 at 1:00 PM Jonathan Wakely wrote: >> >> On Tue, 11 Mar 2025 at 12:22, Tomasz Kamiński wrote: >> > >> > Floating points types _Float16, _Float32, _Float64, and bfloat16, >> > can be formatted only if std::to_chars ov

[pushed] c++: add assert to cp_make_fname_decl

2025-04-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In the PR118629 testcase, pushdecl_outermost_localscope was failing and returning error_mark_node without ever actually giving an error; in addition to my earlier fix for the failure, make sure failures aren't silent. gcc/cp/ChangeLog:

[pushed] c++: 'requires' diagnostic before C++20

2025-04-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- We were giving a generic "not declared" error for a requires-expression without concepts enabled; we can do better. gcc/cp/ChangeLog: * lex.cc (unqualified_name_lookup_error): Handle 'requires' better. --- gcc/cp/lex.cc | 3 +++ 1

RE: Re: [PATCH] Add COBOL to htdocs/gcc-15/changes.html.

2025-04-17 Thread Robert Dubner
I'll change it to "...much of the NIST test suite..." before I push it. > -Original Message- > From: Simon Sobisch > Sent: Thursday, April 17, 2025 15:11 > To: rdub...@symas.com > Cc: gcc-patches@gcc.gnu.org > Subject: Re: Re: [PATCH] Add COBOL to htdocs/gcc-15/changes.html. > > Please a

Re: Re: [PATCH] Add COBOL to htdocs/gcc-15/changes.html.

2025-04-17 Thread Simon Sobisch
Please adjust the text, there are too many people claiming NIST passing, but in case of gcobol - that's not true even if you ignore modules that are now obsolete or archaic. See my mail on how to run NIST with the GnuCOBOL setup - still too many failures. I hope that statement may be true in a

Re: [PATCH] Add _GLIBCXX_DEBUG checks on unordered container local_iterator

2025-04-17 Thread Jonathan Wakely
On Thu, 17 Apr 2025 at 17:22, François Dumont wrote: > > Tests renamed as requested and I took the time to reduce code > duplications in unordered_checks.h. > > libstdc++: Add _GLIBCXX_DEBUG checks on unordered container > local_iterator > > Complete tests on _GLIBCXX_DEBUG checks in >

Re: [wwwdocs][Patch] gcc-15/changes: Fortran + offload (C++) update | project/gomp: GCC 15 update

2025-04-17 Thread Gerald Pfeifer
On Thu, 17 Apr 2025, Tobias Burnus wrote: > Anyone: comments are welcome. > + The standard C++ library (libstdc++) is now supported I wouldn't mark up libstdc++ as in this context; we are pretty much treating it as a proper name/project name. (Two occurrences.) Looks good to me otherwise, t

Re: [PATCH] RISC-V: Do not free a riscv_arch_string when handling target-arch attribute

2025-04-17 Thread Jeff Law
On 2/26/25 1:46 AM, 翁愷邑 wrote: The build_target_option_node() function may return a cached node when fndecl having the same effective global_options. Therefore, freeing memory used in target nodes can lead to a use-after-free issue, as a target node may be shared by multiple fndecl. This issue

[PATCH] Add COBOL information to gcc.gnu.org index.html

2025-04-17 Thread Robert Dubner
Okay for htdocs/master? >From d412e45d5afeecded3c8cf1b6b2865e088a480cc Mon Sep 17 00:00:00 2001 From: Robert Dubner Date: Thu, 17 Apr 2025 15:12:26 -0400 Subject: [PATCH] Add COBOL information to gcc.gnu.org index.html * htdocs/index.html: Add COBOL information. --- htdocs/index.html |

[PATCH] Consider frequency in cost estimation when converting scalar to vector.

2025-04-17 Thread liuhongt
In some benchmark, I notice stv failed due to cost unprofitable, but the igain is inside the loop, but sse<->integer conversion is outside the loop, current cost model doesn't consider the frequency of those gain/cost. The patch weights those cost with frequency just like LRA does. Bootstrapped a

[PATCH] gcc-15/changes: Document LoongArch changes.

2025-04-17 Thread Lulu Cheng
--- htdocs/gcc-15/changes.html | 24 1 file changed, 24 insertions(+) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index a02ba17a..011fc5ca 100644 --- a/htdocs/gcc-15/changes.html +++ b/htdocs/gcc-15/changes.html @@ -842,6 +842,30 @@ asm (".text; %

Re: [PATCH] Add COBOL information to gcc.gnu.org index.html

2025-04-17 Thread Sam James
Robert Dubner writes: > Okay for htdocs/master? > > From d412e45d5afeecded3c8cf1b6b2865e088a480cc Mon Sep 17 00:00:00 2001 > From: Robert Dubner > Date: Thu, 17 Apr 2025 15:12:26 -0400 > Subject: [PATCH] Add COBOL information to gcc.gnu.org index.html > > * htdocs/index.html: Add COBOL inf

Re: [PATCH] doc: Use more precise cross-references for -ftrivial-auto-var-init

2025-04-17 Thread Jonathan Wakely
On 11/03/25 17:39 +, Jonathan Wakely wrote: Add anchors for the hardbool and uninitialized attributes and then link directly to them. gcc/ChangeLog: * doc/extend.texi (Common Variable Attributes): Add @anchor to hardbool attribute. (Common Type Attributes): Add @anch

[PATCH 1/2] icf: Remove nop code from sem_function::init.

2025-04-17 Thread Andrew Pinski
Here we had: node = node; Which does nothing so let's remove it. gcc/ChangeLog: * ipa-icf.cc (sem_function::init): Remove assignment of node from itself. Signed-off-by: Andrew Pinski --- gcc/ipa-icf.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.c

[PATCH 2/2] icf: Remove unused constructors of sem_function and sem_variable

2025-04-17 Thread Andrew Pinski
The constructors for sem_function and sem_variable that just passes the bitmap obstack and NOT the cgraph node was unused so let's remove it. gcc/ChangeLog: * ipa-icf.cc (sem_function::sem_function): Remove the obstack argument version one. (sem_variable::sem_variable): Li

RE: [PATCH] Add COBOL information to gcc.gnu.org index.html

2025-04-17 Thread Robert Dubner
I wonder how I missed that? Thanks. > -Original Message- > From: Sam James > Sent: Thursday, April 17, 2025 18:31 > To: Robert Dubner > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Add COBOL information to gcc.gnu.org index.html > > Robert Dubner writes: > > > Okay for htdocs/m

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

2025-04-17 Thread Alexander Monakov
On Thu, 17 Apr 2025, Sam James wrote: > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -14649,12 +14649,14 @@ Enabled at levels @option{-O2}, @option{-O3}, > @option{-Os}. > @item -fstrict-aliasing > Allow the compiler to assume the strictest aliasing rules applicable to > the la

Re: [PATCH] s390: Use match_scratch instead of scratch in define_split [PR119834]

2025-04-17 Thread Stefan Schulze Frielinghaus
On Thu, Apr 17, 2025 at 05:08:10AM +0200, Jakub Jelinek wrote: > On Wed, Apr 16, 2025 at 08:52:17PM +0200, Jakub Jelinek wrote: > > The following testcase ICEs since r15-1579 (addition of late combiner), > > because *clrmem_short can't be split. > > The problem is that the define_insn uses > >(

RE: [PATCH] Add COBOL information to gcc.gnu.org index.html

2025-04-17 Thread Robert Dubner
In the absence of commentary, I have pushed those documentation changes. > -Original Message- > From: Robert Dubner > Sent: Thursday, April 17, 2025 20:26 > To: Sam James > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Add COBOL information to gcc.gnu.org index.html > > I wonder ho

Re: [PATCH v2] x86: Update memcpy/memset inline strategies for -mtune=generic

2025-04-17 Thread Hongtao Liu
On Tue, Apr 8, 2025 at 3:52 AM H.J. Lu wrote: > > Simplify memcpy and memset inline strategies to avoid branches for > -mtune=generic: > > 1. With MOVE_RATIO and CLEAR_RATIO == 17, GCC will use integer/vector >load and store for up to 16 * 16 (256) bytes when the data size is >fixed and kn

Re: [PATCH][v13] libstdc++: Correct preprocessing checks for floatX_t and bfloat_16 formatting

2025-04-17 Thread Jonathan Wakely
On Thu, 17 Apr 2025 at 14:16, Tomasz Kamiński wrote: > > Floating points types _Float16, _Float32, _Float64, and bfloat16, > can be formatted only if std::to_chars overloads for such types > were provided. Currently this is only the case for architectures > where float and double are 32-bits and 6

[pushed] c++: constexpr new diagnostic location

2025-04-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Presenting the allocation location as the location of the outermost expression we're trying to evaluate is inaccurate; let's provide both locations. gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_outermost_constant_expr): Give both

[PATCH] gimple: Canonical order for invariants [PR118902]

2025-04-17 Thread Andrew Pinski
So unlike constants, address invariants are currently put first if used with a SSA NAME. It would be better if address invariants are consistent with constants and this patch changes that. gcc.dg/tree-ssa/pr118902-1.c is an example where this canonicalization can help. In it if `p` variable was a g

[pushed] c++: improve pack index diagnostics

2025-04-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- While looking at pack-indexing16.C I thought it would be helpful to print the problematic type/value. gcc/cp/ChangeLog: * semantics.cc (finish_type_pack_element): Add more info to diagnostics. libstdc++-v3/ChangeLog:

[PATCH] gimple-fold: Improve optimize_memcpy_to_memset by walking back until aliasing says the ref is a may clobber. [PR118947]

2025-04-17 Thread Andrew Pinski
The case here is we have: ``` char buf[32] = {}; void* ret = aaa(); __builtin_memcpy(ret, buf, 32); ``` And buf does not escape. But we don't prop the zeroing from buf to the memcpy statement because optimize_memcpy_to_memset only looks back one statement. This can be fixed to look

Re: [PATCH] doc: Use more precise cross-references for -ftrivial-auto-var-init

2025-04-17 Thread Sandra Loosemore
On 4/17/25 14:16, Jonathan Wakely wrote: On 11/03/25 17:39 +, Jonathan Wakely wrote: Add anchors for the hardbool and uninitialized attributes and then link directly to them. gcc/ChangeLog: * doc/extend.texi (Common Variable Attributes): Add @anchor to hardbool attribute. (Comm

[PATCH 1/2] DSE: Support triming of some more memset [PR87901]

2025-04-17 Thread Andrew Pinski
DSE has support for trimming memset (and memset like) statements. In this case we have `MEM [(char * {ref-all})&z] = {};` in the IR and when we go to trim it, we call build_fold_addr_expr which leaves around PR tree-optimization/87901 gcc/ChangeLog: * tree-ssa-dse.cc (maybe_tri

[PATCH 2/2] DSE: Trim stores of 0 like triming stores of {} [PR87901]

2025-04-17 Thread Andrew Pinski
This is the second part of the PR which comes from transformation of memset into either stores of 0 (via an integral type) or stores of {}. We already handle stores of `{}`, this just extends that to handle of the constant 0 and treat it similarly. PR tree-optimization/87901 gcc/ChangeLog

Re: [PATCH 1/2] DSE: Support triming of some more memset [PR87901]

2025-04-17 Thread Sam James
Andrew Pinski writes: > DSE has support for trimming memset (and memset like) statements. > In this case we have `MEM [(char * {ref-all})&z] = {};` in > the IR and when we go to trim it, we call build_fold_addr_expr which leaves > around This looks cut off?

Re: [PING][PATCH] doc: Clarify REG_EH_REGION note usage

2025-04-17 Thread Jeff Law
On 4/8/25 6:12 AM, Konstantinos Eleftheriou wrote: Hi, Just a ping for https://gcc.gnu.org/pipermail/gcc-patches/2025- March/677635.html . OK for the trunk. I don't think it's worth porting to the release branches. jeff

Re: [PATCH] Add _GLIBCXX_DEBUG checks on unordered container local_iterator

2025-04-17 Thread François Dumont
Tests renamed as requested and I took the time to reduce code duplications in unordered_checks.h.     libstdc++: Add _GLIBCXX_DEBUG checks on unordered container local_iterator     Complete tests on  _GLIBCXX_DEBUG checks in include/debug/safe_local_iterator.h.     Fix several tests not te

[OG14] [COMMITTED] openmp: Support for OpenMP iterators in map, to and from clauses

2025-04-17 Thread Kwok Cheung Yeung
I have committed the following patches onto the devel/omp/gcc-14 OpenMP development branch to implement support for iterators in mapping clauses and in to/from clauses in 'target update' constructs: 76e5b71adb8 openmp: Refactor handling of iterators 28f09913235 openmp: Add support for iterators

Re: Add sse_fp_cost into i386_rtx_costs

2025-04-17 Thread Richard Biener
On Thu, 17 Apr 2025, Jan Hubicka wrote: > Hi, > Znver5 has addss cost of 2 while other common floating point SSE operations > costs 3 cycles. We currently have only one entry in the costs tables which > makes it impossible to model this. This patch adds sse_fp_op which is used > for > other com

Re: [pushed] c++: ill-formed constexpr function [PR113360]

2025-04-17 Thread Patrick Palka
On Wed, 16 Apr 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > If we already gave an error while parsing a function, we don't also need to > try to explain what's wrong with it when we later try to use it in a > constant-expression. In the new testca

Re: [wwwdocs][Patch] gcc-15/changes: Fortran + offload (C++) update | project/gomp: GCC 15 update

2025-04-17 Thread Tobias Burnus
Gerald Pfeifer wrote: On Thu, 17 Apr 2025, Tobias Burnus wrote: * https://gcc.gnu.org/projects/gomp/ This is a no-brainer. Well, it still adds GCC 16 … It does make me wonder whether we really need/want distinct docs for minor releases or shouldn't better keep just one for the branch? I

[PATCH] Add COBOL to htdocs/gcc-15/changes.html.

2025-04-17 Thread Robert Dubner
Adds a COBOL section to htdocs/gcc-15/changes.html. Okay for master? >From 177e87149b3174ca27a58cef7276d88d1363061b Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Thu, 17 Apr 2025 12:47:26 -0400 Subject: [PATCH] Add COBOL to gcc-15 changes. * gcc-15/changes.

[pushed] c++: constexpr virtual base diagnostic

2025-04-17 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I thought this diagnostic could be clearer that the problem is the combination of virtual bases and constexpr constructor, not just complain that the class has virtual bases without context. gcc/cp/ChangeLog: * constexpr.cc (is_val