[PATCH] except: Don't use the cached value of the gcc_except_table section for comdat functions [PR119507]

2025-03-28 Thread Andrew Pinski
This has been broken since GCC started to put the comdat functions' gcc_except_table into their own section; r0-118218-g3e6011cfebedfb. What would happen is after a non-comdat function is processed, the cached value would always be used even for comdat function. Instead we should create a new se

Re:[pushed] [PATCH 2/2] LoongArch: doc: Add same-address constraint to the description of '-mld-seq-sa'.

2025-03-28 Thread Lulu Cheng
Pushed to r15-9023. 在 2025/3/27 下午3:01, Lulu Cheng 写道: gcc/ChangeLog: * doc/invoke.texi: Modify the description of '-mld-seq-sa'. --- gcc/doc/invoke.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b3f7f0479

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

2025-03-28 Thread Yeoul Na
> On Mar 26, 2025, at 1:52 PM, Yeoul Na wrote: > > Hi Joseph, > >> On Mar 26, 2025, at 12:07 PM, Joseph Myers wrote: >> >> On Wed, 26 Mar 2025, Yeoul Na wrote: >> >>> Hi all, >>> >>> Thanks for all the discussions. >>> >>> I posted the design rationale for our current approach in >>> ht

Re: [PATCH] doc: document incremental LTO flags

2025-03-28 Thread Sam James
Michal Jires writes: > On Thu, 2025-03-27 at 15:33:44 +, Sam James wrote: >> >> One thing I wasn't quite sure on yet: is -flto-partition=cache automatic >> with -flto-incremental? Or is it just an optional flag I can pass for >> more effective incremental LTO? >> >> If it's the latter, shou

Re: [gcc-14 PATCH] Reuse scratch registers generated by LRA

2025-03-28 Thread Vladimir Makarov
On 3/27/25 7:49 AM, Xi Ruoyao wrote: I'm proposing the backport to fix an ICE building gegl on powerpc64le: https://gcc.gnu.org/PR119340. Bootstrapped and regtested on powerpc64le-linux-gnu, OK for releases/gcc-14? OK for me.  Thank you for working on PR119340. gcc/lra-constraints.cc

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Simon Sobisch
+cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|charmaps'; \ + l=$$l'\|valconv\|exceptl'; \ + sed -e '/^#include/s,"\('$$l'\)\.h","../../libgcobol/\1.h",' $^ > $@ The proposed rule is much better than

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 04:28:53PM +0100, Simon Sobisch wrote: > +cobol/charmaps.cc cobol/valconv.cc: cobol/%.cc: $(LIB_SOURCE)/%.cc > + -l='ec\|common-defs\|io\|gcobolio\|libgcobol\|gfileio\|charmaps'; \ > + l=$$l'\|valconv\|exceptl'; \ > + sed -e '/^#include/s,"\('$$l'\)\.h","../../li

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

2025-03-28 Thread Tomasz Kamiński
The formatters for chrono types defined the parse/format methods as accepting unconstrained types, this in combination with lack of constrain on _CharT lead to them falsy statisfying formattable requirements for any type used as character. This patch adjust the fromatter::parse signature to: cons

Re: [PATCH v2] c++/modules: Fix modules and LTO with header units [PR118961]

2025-03-28 Thread Jason Merrill
On 3/28/25 8:54 AM, Nathaniel Shead wrote: On Thu, Mar 27, 2025 at 10:38:02AM -0400, Jason Merrill wrote: On 3/27/25 3:35 AM, Nathaniel Shead wrote: Bootstrapped and regtested (so far just dg.exp and modules.exp) on x86_64-pc-linux-gnu, OK for trunk if full regtest succeeds? Rather than updati

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

2025-03-28 Thread Qing Zhao
> On Mar 28, 2025, at 08:51, Yeoul Na wrote: > > > >> On Mar 27, 2025, at 9:17 AM, Qing Zhao wrote: >> >> Yeoul, >> >> Thanks for the writeup. >> >> So, basically, This writeup insisted on introducing a new “structure scope” >> (similar as the instance scope in C++) into C language ONLY

Re: [PATCH v2] c++: fix reporting routines re-entered [PR119303]

2025-03-28 Thread Jason Merrill
On 3/27/25 5:00 PM, Marek Polacek wrote: On Wed, Mar 19, 2025 at 12:00:00PM -0400, Jason Merrill wrote: On 3/17/25 6:55 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- We crash while we call warning_at ("inline function used but never defined") si

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Richard Biener
On Fri, 28 Mar 2025, Jakub Jelinek wrote: > Hi! > > sed -i is not portable, it is supported by GNU sed and perhaps some BSDs, > but not elsewhere. > Furthermore, I think it is far better to always use > #include "../../libgcobol/something.h" > paths rather than something depending on the build di

[PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Jakub Jelinek
Hi! sed -i is not portable, it is supported by GNU sed and perhaps some BSDs, but not elsewhere. Furthermore, I think it is far better to always use #include "../../libgcobol/something.h" paths rather than something depending on the build directory. And because we require GNU make, we don't have t

Re: [PATCH] srcextra fixes

2025-03-28 Thread Richard Biener
On Fri, 28 Mar 2025, Jakub Jelinek wrote: > Hi! > > Here is a patch which uses sed to fix up the copies of the generated > files by flex/bison in the source directories (i.e. what we ship in > release tarballs). > In that case the generated files are in the same directory as the > files they are

Re: [PATCH] PR tree-optimization/119471 - If the LHS does not contain zero, neither do multiply operands.

2025-03-28 Thread Andrew MacLeod
On 3/28/25 03:19, Richard Biener wrote: On Fri, Mar 28, 2025 at 12:28 AM Andrew MacLeod wrote: This patch fixes both 119471 and the remainder of 110992. At issue is we do not recognize that if "a * b != 0" , then neither "a" nor "b" can be zero. This is fairly trivial with range-ops. o

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Simon Sobisch
Thanks, I agree that the explicit include of library headers from frontend should include the library folder explicitly.

Re: [PATCH] testsuite: Add options for float16 for test [PR119133]

2025-03-28 Thread Richard Earnshaw
On 27/03/2025 14:48, Christophe Lyon wrote: Some targets (like arm) need some flags to enable _Float16 support. gcc/testsuite/ChangeLog: PR target/119133 * gcc.dg/torture/pr119133.c: Add options for float16. --- gcc/testsuite/gcc.dg/torture/pr119133.c | 1 + 1 file changed, 1

[PATCH] avoid-store-forwarding: Fix reg init on load-elimination [PR119160]

2025-03-28 Thread Konstantinos Eleftheriou
In the case that we are eliminating the load instruction, we use zero_extend for the initialization of the base register for the zero-offset store. This causes issues when the store and the load use the same mode, as we are trying to generate a zero_extend with the same inner and outer modes. This

[commited] cobol: Eliminate check-cobol -Os failure in EVALUATE testcase

2025-03-28 Thread Robert Dubner
This represents the first success due to converting tests to DejaGnu. One of these new tests passed everything except the -Os run. With the patch, the changes have been demonstrated for proper behavior on x86_64 and aarch64. >From a369cc815a53659e5079a32091e02e0fecc84f28 Mon Sep 17 00:00:00 2001

[PATCH] other/119510 - use --enable-languages=default,cobol for release tarballs

2025-03-28 Thread Richard Biener
The following adds cobol to the set of languages built during release tarball building so the bison and flex generated sources for cobol are included in the tarball. OK? I think an explicit list is better since you'll get an error if prerequesites for a language are not present instead of silentl

Patch v2 of Bug 119222 Conversion of inf to integer is not diagnosed , pay attention to Notice !

2025-03-28 Thread Gwen Fu
>From bd5541b903747082c984aa92ebe16faeae7b0c71 Mon Sep 17 00:00:00 2001 From: Gwen Fu Date: Thu, 27 Mar 2025 15:55:23 +0800 Subject: [PATCH] [Description of 119222 bug] Conversion of inf to integer is not diagnosed [How addresses it] In c-warn.cc, function: warnings_for_convert_and_check: Sin

[PATCH] srcextra fixes

2025-03-28 Thread Jakub Jelinek
Hi! Here is a patch which uses sed to fix up the copies of the generated files by flex/bison in the source directories (i.e. what we ship in release tarballs). In that case the generated files are in the same directory as the files they are generated from, so there should be no absolute or relativ

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

2025-03-28 Thread Yeoul Na
> On Mar 28, 2025, at 9:05 AM, Qing Zhao wrote: > > > >> On Mar 28, 2025, at 08:51, Yeoul Na wrote: >> >> >> >>> On Mar 27, 2025, at 9:17 AM, Qing Zhao wrote: >>> >>> Yeoul, >>> >>> Thanks for the writeup. >>> >>> So, basically, This writeup insisted on introducing a new “structure sc

Re: [PATCH RFC] c++: optimize push_to_top_level [PR64500]

2025-03-28 Thread Patrick Palka
On Fri, 28 Mar 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, initially with extra checking to make sure that > indeed nothing got saved from a namespace level. > > This isn't a regression, but a 20% speedup for a simple change is pretty > attractive; what do people think about this cha

Re: [PATCH 08/10] testsuite: aarch64: arm: Fix -mcpu=unset support in some effective targets

2025-03-28 Thread Richard Earnshaw (lists)
On 20/03/2025 16:15, Christophe Lyon wrote: > Many tests became unsupported on aarch64 when -mcpu=unset was added to > arm_v8_2a_fp16_neon_ok and arm_v8_2a_bf16_neon_ok effective targets, > because this flag is only supported on arm. > > Since these effective targets are used on arm and aarch64, t

[COMMITTED 002/146] gccrs: Insert trait names during toplevel resolution 2.0

2025-03-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Insert trait names into the type namespace. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 3 +++ 1 file changed, 3 insertions(+) diff --g

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

2025-03-28 Thread Jason Merrill
On 3/28/25 3:54 AM, yash.shi...@windriver.com wrote: 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 i

[PATCH RFC] c++: optimize push_to_top_level [PR64500]

2025-03-28 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, initially with extra checking to make sure that indeed nothing got saved from a namespace level. This isn't a regression, but a 20% speedup for a simple change is pretty attractive; what do people think about this change for GCC 15? -- 8< -- Profiling showed that the

Re:[pushed] [PATCH 1/2] LoongArch: Set default alignment for functions jumps loops and labels.

2025-03-28 Thread Lulu Cheng
Pushed to r15-9022. 在 2025/3/27 下午3:01, Lulu Cheng 写道: Based on r15-7624, a set of align combinations with better performance was tested through spec2006. LA464: -falign-loops=8 -falign-functions=32 -falign-jumps=32 -falign-labels=8 LA664: -falign-loops=16 -falign-functions=16 -falign-jumps=32

[COMMITTED 031/146] gccrs: Improve handling of static items in toplevel 2.0

2025-03-28 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Use DefaultResolver::visit and avoid a call to Identifier::as_string while handling instances of StaticItem. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-topleve

[PATCH] combine: Use reg_used_between_p rather than modified_between_p in two spots [PR119291]

2025-03-28 Thread Jakub Jelinek
Hi! The following testcase is miscompiled on x86_64-linux at -O2 by the combiner. We have from earlier combinations (insn 22 21 23 4 (set (reg:SI 104 [ _7 ]) (const_int 0 [0])) "pr119291.c":25:15 96 {*movsi_internal} (nil)) (insn 23 22 24 4 (set (reg/v:SI 117 [ e ]) (reg/v:SI

[wwwdocs] gcc-15/changes.html + projects/gomp/: OpenMP update for interop

2025-03-28 Thread Tobias Burnus
This patch updates both https://gcc.gnu.org/gcc-15/changes.html#openmp and https://gcc.gnu.org/projects/gomp/ for the current OpenMP implementation status. It also fixes a typo and intents to actually commit the change that mentions the support for aarch64 to nvptx offloading, cf. https://gcc.gnu

[PATCH] combine: Special case set_noop_p in two spots

2025-03-28 Thread Jakub Jelinek
Hi! 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, but succeeds and we get (insn 22 21 23 4 (set (pc) (pc)) "pr1

Re: [PATCH] tailc: Handle musttail noreturn calls [PR119483]

2025-03-28 Thread Richard Biener
On Thu, 27 Mar 2025, Jakub Jelinek wrote: > Hi! > > The following (first) testcase is accepted by clang (if clang::musttail) > and rejected by gcc, because we discover the call is noreturn and then bail > out because we don't want noreturn tailcalls. > The general reason not to support noreturn t

Re: [PATCH] PR tree-optimization/119471 - If the LHS does not contain zero, neither do multiply operands.

2025-03-28 Thread Richard Biener
On Fri, Mar 28, 2025 at 12:28 AM Andrew MacLeod wrote: > > This patch fixes both 119471 and the remainder of 110992. > > At issue is we do not recognize that if > >"a * b != 0" , then neither "a" nor "b" can be zero. > > This is fairly trivial with range-ops. op1_range and op2_range for > op

Re: [PATCH][gcc13] PR tree-optimization/117287 - Backport new assume implementation

2025-03-28 Thread Richard Biener
On Thu, Mar 27, 2025 at 8:14 PM Andrew MacLeod wrote: > > This patch backports the ASSUME support that was rewritten in GCC 15. > > Its slightly more complicated than the port to GCC 14 was in that a few > classes have been rewritten. I've isolated them all to tree-assume.cc > which contains the p

Re: [PATCH] Further use of mod_scope in modified_type_die

2025-03-28 Thread Richard Biener
On Fri, Mar 28, 2025 at 8:32 AM Eric Botcazou wrote: > > > Let's involve Eric here, I have no idea what was intended here. > > We discussed it with Tom internally and he makes the final decisions here. Well the, Tom, go ahead. Richard. > -- > Eric Botcazou > >

Re: [PATCH][gcc13] PR tree-optimization/117287 - Backport new assume implementation

2025-03-28 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 08:12:35AM +0100, Richard Biener wrote: > On Thu, Mar 27, 2025 at 8:14 PM Andrew MacLeod wrote: > > > > This patch backports the ASSUME support that was rewritten in GCC 15. > > > > Its slightly more complicated than the port to GCC 14 was in that a few > > classes have bee

[PATCH] [COBOL] use native_encode_real

2025-03-28 Thread Richard Biener
The following avoids the round-trip through a newly built tree and instead directly uses the now exported native_encode_real. Tested on x86_64-unknown-linux-gnu. OK? gcc/cobol/ * genapi.cc (initial_from_float128): Use native_encode_real. --- gcc/cobol/genapi.cc | 13 ++--- 1 fil

Re: [PATCH] [COBOL] use native_encode_real

2025-03-28 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 08:54:53AM +0100, Richard Biener wrote: > The following avoids the round-trip through a newly built tree and > instead directly uses the now exported native_encode_real. > > Tested on x86_64-unknown-linux-gnu. > > OK? > > gcc/cobol/ > * genapi.cc (initial_from_float

Re: [PATCH] other/119510 - use --enable-languages=default,cobol for release tarballs

2025-03-28 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 03:26:04PM +0100, Richard Biener wrote: > The following adds cobol to the set of languages built during release > tarball building so the bison and flex generated sources for cobol > are included in the tarball. > > OK? > > I think an explicit list is better since you'll g

Re: [PATCH 12/12] testsuite, s390: fix broken dg directives

2025-03-28 Thread Sam James
David Malcolm writes: > Found by dg-lint. > > gcc/testsuite/ChangeLog: > * gcc.target/s390/target-attribute/tattr-1.c: Fix missing trailing > close brace on dg-do directive. > * gcc.target/s390/target-attribute/tattr-2.c: Likewise. I've cherry-picked the remaining ones and reso

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

2025-03-28 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: [committed] i386: Fix offset calculation in ix86_redzone_clobber

2025-03-28 Thread Uros Bizjak
On Thu, Mar 27, 2025 at 11:24 PM Jakub Jelinek wrote: > > On Thu, Mar 27, 2025 at 09:28:31PM +0100, Uros Bizjak wrote: > > plus_constant expects integer as its third argument, not rtx. > > > > gcc/ChangeLog: > > > > * config/i386/i386.cc (ix86_redzone_clobber): Use integer, not rtx > > as

Re: [PATCH] Further use of mod_scope in modified_type_die

2025-03-28 Thread Richard Biener
On Thu, Mar 27, 2025 at 5:31 PM Tom Tromey wrote: > > > "Richard" == Richard Biener writes: > > Sorry about the delay on this. > > >> - mod_type_die = subrange_type_die (type, low, high, bias, > >> context_die); > >> + mod_type_die = subrange_type_die (type, low, high, bias, mod_sc

Re: [PATCH] ipa-sra: Don't change return type to void if there are musttail calls [PR119484]

2025-03-28 Thread Richard Biener
On Thu, 27 Mar 2025, Jakub Jelinek wrote: > Hi! > > The following testcase is rejected, because IPA-SRA decides to > turn bar.constprop call into bar.constprop.isra which returns void. > While there is no explicit lhs on the call, as it is a musttail call > the tailc pass checks if IPA-VRP return

[pushed] wwwdocs: cxx-dr-status: Use over

2025-03-28 Thread Gerald Pfeifer
My validator flagged this. Modern HTML avoid physical markup like , and is a good fit here. Pushed. Gerald --- htdocs/projects/cxx-dr-status.html | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/projects/cxx-dr-status.html b/htdocs/p

[COMMITTED 096/144] gccrs: imports: Create ImportData class and use it in import_mappings

2025-03-28 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_glob_import): Use ImportData class. (Early::resolve_simple_import): Likewise. (Early::resolve_rebind_import): Likewise. (Early::build_import_mapping): Likewise

Re: [PATCH] testsuite: aarch64: fix another unbalanced }

2025-03-28 Thread Richard Earnshaw
On 27/03/2025 15:37, Sam James wrote: In r15-8956-ge90d6c2639c392, I missed one, so while it did fix a problem, it also exposed another because the braces were now unbalanced. There's IMO more to do here with ideally whitespace before the } when using scan-assembler-times but let's do that later

Re: [PATCH] [COBOL] use native_encode_real

2025-03-28 Thread Richard Biener
On Fri, 28 Mar 2025, Jakub Jelinek wrote: > On Fri, Mar 28, 2025 at 08:54:53AM +0100, Richard Biener wrote: > > The following avoids the round-trip through a newly built tree and > > instead directly uses the now exported native_encode_real. > > > > Tested on x86_64-unknown-linux-gnu. > > > > OK

Re: [PATCH] Fortran: fix spelling of flag -fallow-invalid-boz

2025-03-28 Thread Harald Anlauf
Am 28.03.25 um 20:35 schrieb Harald Anlauf: Dear all, I am going to commit the attached patch as obvious. Pushed as r15-9016-gfb132276d17390. Harald

Re: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Iain Sandoe
Hi Bob note that the sed -i does not work on Darwin’s BDS-derived sed without also using ‘-e’ to inroduce the scripts… so I am looking for a solution we all like too. > On 28 Mar 2025, at 16:40, Robert Dubner wrote: > > I am not fully following what's going on. > > The way this grew is becaus

[COMMITTED 103/144] gccrs: Loop on expansion if a new export has been defined

2025-03-28 Thread arthur . cohen
From: Pierre-Emmanuel Patry When a use statement requires a reexported item it cannot find it in the same pass, an additional pass shall be performed. This means we need to detect whether a new item has been reexported and resolve until the end. gcc/rust/ChangeLog: * resolve/rust-early-

RE: [PATCH] cobol: Fix up cobol/{charmaps,valconv}.cc rules

2025-03-28 Thread Robert Dubner
I am not fully following what's going on. The way this grew is because Jim and I once had a solution in Make-lang.in that put a "-I ../libgcobol" into CPPFLAGS. Then it turned out I couldn't use CPPFLAGS, because it wasn't available on all architectures. But I nonetheless needed to use valconv.c

[committed] Regenerate common.opt.urls

2025-03-28 Thread Jakub Jelinek
Hi! The r15-8947 commit has not regenerate-opt-urls. Here is a fix for that, committed to trunk as obvious. 2025-03-28 Jakub Jelinek * common.opt.urls: Regenerate. --- gcc/common.opt.urls.jj +++ gcc/common.opt.urls @@ -289,6 +289,12 @@ UrlSuffix(gcc/Warning-Options.html#index-Wcove

[PATCH v3] c++: fix reporting routines re-entered [PR119303]

2025-03-28 Thread Marek Polacek
On Fri, Mar 28, 2025 at 11:49:48AM -0400, Jason Merrill wrote: > On 3/27/25 5:00 PM, Marek Polacek wrote: > > On Wed, Mar 19, 2025 at 12:00:00PM -0400, Jason Merrill wrote: > > > On 3/17/25 6:55 PM, Marek Polacek wrote: > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > >

[PATCH] Fortran: fix spelling of flag -fallow-invalid-boz

2025-03-28 Thread Harald Anlauf
Dear all, I am going to commit the attached patch as obvious. Harald From 8ea7254f7042582afd4a9dba5a1dd379467f30ff Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Fri, 28 Mar 2025 20:31:08 +0100 Subject: [PATCH] Fortran: fix spelling of flag -fallow-invalid-boz gcc/fortran/ChangeLog: * ch

[PATCH 1/2] libstdc++: Fix -Wstringop-overread warning in std::vector [PR114758]

2025-03-28 Thread Jonathan Wakely
As in r13-4393-gcca06f0d6d76b0 and a few other commits, we can avoid bogus warnings in std::vector by hoisting some loads to before the allocation that calls operator new. This means that the compiler has enough info to remove the dead branches that trigger bogus warnings. On trunk this is only ne

[PATCH 2/2] libstdc++: Fix -Warray-bounds warning in std::vector [PR110498]

2025-03-28 Thread Jonathan Wakely
In this case, we need to tell the compiler that the current size is not larger than the new size so that all the existing elements can be copied to the new storage. This avoids bogus warnings about overflowing the new storage when the compiler can't tell that that cannot happen. We might as well a

Re: [PATCH 2/2] c++: constrained auto NTTP vs associated constraints

2025-03-28 Thread Patrick Palka
On Tue, 5 Nov 2024, Jason Merrill wrote: > On 10/17/24 1:10 PM, Patrick Palka wrote: > > On Thu, 17 Oct 2024, Patrick Palka wrote: > > > > > On Tue, 15 Oct 2024, Patrick Palka wrote: > > > > > > > On Tue, 15 Oct 2024, Patrick Palka wrote: > > > > > > > > > According to [temp.param]/11, the cons

Re: [PATCH] doc: document incremental LTO flags

2025-03-28 Thread Michal Jires
On Thu, 2025-03-27 at 15:33:44 +, Sam James wrote: > > One thing I wasn't quite sure on yet: is -flto-partition=cache automatic > with -flto-incremental? Or is it just an optional flag I can pass for > more effective incremental LTO? > > If it's the latter, should we mention that in the -flto

RE: [PATCH] [COBOL] use native_encode_real

2025-03-28 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Friday, March 28, 2025 08:12 > To: Jakub Jelinek > Cc: gcc-patches@gcc.gnu.org; rdub...@symas.com > Subject: Re: [PATCH] [COBOL] use native_encode_real > > On Fri, 28 Mar 2025, Jakub Jelinek wrote: > > > On Fri, Mar 28, 2025 at 08:54:5

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

2025-03-28 Thread Yeoul Na
> On Mar 28, 2025, at 5:51 AM, Yeoul Na wrote: > > > >> On Mar 27, 2025, at 9:17 AM, Qing Zhao wrote: >> >> Yeoul, >> >> Thanks for the writeup. >> >> So, basically, This writeup insisted on introducing a new “structure scope” >> (similar as the instance scope in C++) into C language ONL

Re: [PATCH] bootstrap/119513 - fix cobol bootstrap with --enable-generated-files-in-srcdir

2025-03-28 Thread Jakub Jelinek
On Fri, Mar 28, 2025 at 01:51:23PM +0100, Richard Biener wrote: > This adds gcc/cobol/parse.o to compare_exclusions and makes sure to > ignore errors when copying generated files, like it's done when > copying gengtype-lex.cc. > > Bootstrapped on x86_64-unknown-linux-gnu. > > OK? > > PR bo

[COMMITTED, PATCH] s390: Accept only Pmode for registers AP/FP/RA [PR119235]

2025-03-28 Thread Stefan Schulze Frielinghaus
gcc/ChangeLog: PR target/119235 * config/s390/s390.cc (s390_hard_regno_mode_ok): Accept only Pmode for registers AP/FP/RA. --- gcc/config/s390/s390.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc

Re: [PATCH] bootstrap/119513 - fix cobol bootstrap with --enable-generated-files-in-srcdir

2025-03-28 Thread Richard Biener
On Fri, 28 Mar 2025, Jakub Jelinek wrote: > On Fri, Mar 28, 2025 at 01:51:23PM +0100, Richard Biener wrote: > > This adds gcc/cobol/parse.o to compare_exclusions and makes sure to > > ignore errors when copying generated files, like it's done when > > copying gengtype-lex.cc. > > > > Bootstrapped

Re: [PATCH v2] c++/modules: Fix modules and LTO with header units [PR118961]

2025-03-28 Thread Nathaniel Shead
On Thu, Mar 27, 2025 at 10:38:02AM -0400, Jason Merrill wrote: > On 3/27/25 3:35 AM, Nathaniel Shead wrote: > > Bootstrapped and regtested (so far just dg.exp and modules.exp) on > > x86_64-pc-linux-gnu, OK for trunk if full regtest succeeds? > > > > Rather than updating copy_fndecl_with_name, we

Re: [PATCH] testsuite: Don't cycle through option list for gfortran.dg and libgomp.fortran dg-do run tests with -O in dg*options

2025-03-28 Thread Harald Anlauf
Hi Jabuk! Am 28.03.25 um 13:42 schrieb Jakub Jelinek: Hi! Ok, here is a new version of the patch. The current behavior in gfortran.dg/ and libgomp.fortran/libgomp.oacc-fortran is that tests without any dg-do directive are implicitly dg-do compile and tests with dg-do compile or without dg-do d

[PATCH] testsuite: Don't cycle through option list for gfortran.dg and libgomp.fortran dg-do run tests with -O in dg*options

2025-03-28 Thread Jakub Jelinek
Hi! Ok, here is a new version of the patch. The current behavior in gfortran.dg/ and libgomp.fortran/libgomp.oacc-fortran is that tests without any dg-do directive are implicitly dg-do compile and tests with dg-do compile or without dg-do don't cycle through options (-O is implicitly added but ca

[PATCH] bootstrap/119513 - fix cobol bootstrap with --enable-generated-files-in-srcdir

2025-03-28 Thread Richard Biener
This adds gcc/cobol/parse.o to compare_exclusions and makes sure to ignore errors when copying generated files, like it's done when copying gengtype-lex.cc. Bootstrapped on x86_64-unknown-linux-gnu. OK? PR bootstrap/119513 * configure.ac (compare_exclusions): Add gcc/cobol/parse\

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

2025-03-28 Thread Yeoul Na
> On Mar 27, 2025, at 9:17 AM, Qing Zhao wrote: > > Yeoul, > > Thanks for the writeup. > > So, basically, This writeup insisted on introducing a new “structure scope” > (similar as the instance scope in C++) into C language ONLY for counted_by > attribute: > > 1. Inside counted_by attribut

[committed] cobol: Confine all __int128/_Float128 references to libgcobol

2025-03-28 Thread Robert Dubner
I didn't have to add any additional files. I was able to move declarations needed by both libgcobol and gcc/cobol to more appropriate .h files that already existed. This change means that none of the gcc/cobol source code modules refer to libgcobol.h any longer. >From ea7c3a4f98ae58b446c7280c01a

[committed] libstdc++: Add testcase for bogus -Wstringop-overflow in std::vector [PR117983]

2025-03-28 Thread Jonathan Wakely
This was fixed on trunk by r15-4473-g3abe751ea86e34, just add the testcase. libstdc++-v3/ChangeLog: PR libstdc++/117983 * testsuite/23_containers/vector/modifiers/insert/117983.cc: New test. --- Tested x86_64-linux. Pushed to trunk. I have a fix for the branches, so will

Re: [PATCH v3] c++: fix reporting routines re-entered [PR119303]

2025-03-28 Thread Jason Merrill
On 3/28/25 12:46 PM, Marek Polacek wrote: On Fri, Mar 28, 2025 at 11:49:48AM -0400, Jason Merrill wrote: On 3/27/25 5:00 PM, Marek Polacek wrote: On Wed, Mar 19, 2025 at 12:00:00PM -0400, Jason Merrill wrote: On 3/17/25 6:55 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-g