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

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

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

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

[patch,avr,applied] Clarify some optimization options.

2025-03-26 Thread Georg-Johann Lay
Applied the patch below. Johann -- AVR: Clarify some optimization options. gcc/ * doc/invoke.texi (AVR Optimization Options) <-maccumulate-args>: Refer to -fdefer-pop. <-muse-nonzero-bits>: Re-formulate what the option does. diff --git a/gcc/doc/invoke.texi b/gcc/doc/i

[COMMITTED 120/146] gccrs: Remove dead code related to external functions

2025-03-26 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Remove visitor for NamedFunctionParam. * ast/rust-ast-collector.h (TokenCollector::visit): Likewise. * ast/rust-ast-full-decls.h (class NamedFunctionParam): R

[COMMITTED] testsuite: i386: Require dfp support in gcc.target/i386/pr117946.c etc.

2025-03-26 Thread Rainer Orth
Two tests FAIL on 64-bit Solaris/x86: FAIL: gcc.target/i386/pr117946.c (test for excess errors) FAIL: gcc.target/i386/pr118017.c (test for excess errors) The failure mode is the same in both cases: Excess errors: /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/i386/pr117946.c:4:47: error:

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

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

Re: [PATCH v2] c: Fix tagname confusion for typedef redefinitions [PR118765]

2025-03-26 Thread Joseph Myers
On Wed, 26 Mar 2025, Martin Uecker wrote: > I looked at this again and do not need a workaround anymore. > > I did not implement any restrictions preventing typedef  > redeclarations from having different alignment, because > merge_decls does not include any such restrictions at this > time. I c

[PATCH] libstdc++: Use const_cast to workaround tm_zone being non-const

2025-03-26 Thread Jonathan Wakely
Iain reported that he's seeing this on Darwin: include/bits/chrono_io.h:914: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] This is because the BSD definition ot tm::tm_zone is a char* (and has been since 1987) rather than const char* as in Glibc and POSIX.1-2

RE: [PATCH] cobol: Get rid of __int128 uses in the COBOL FE [PR119242]

2025-03-26 Thread Robert Dubner
The use of 128-bit arithmetic in the library is completely integral to the implementation. Because a 128-bit integer can hold a 38-digit signed decimal number, I decided to create a limit of 37 digits for user-defined variables, because that gave me an additional digit to the right for rounding.

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

2025-03-26 Thread Jason Merrill
On 3/26/25 6:14 AM, Jonathan Wakely wrote: My r15-8904-ge200f53a555651 changed the std::vector initializer-list constructor so that it calls a new _M_range_initialize_n function instead of _M_range_initialize. Change the scan-tree-dump pattern in this g++.dg test to match the new gimple output.

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

2025-03-26 Thread Jonathan Wakely
On Wed, 26 Mar 2025 at 17:42, Jason Merrill wrote: > > On 3/26/25 6:14 AM, Jonathan Wakely wrote: > > My r15-8904-ge200f53a555651 changed the std::vector initializer-list > > constructor so that it calls a new _M_range_initialize_n function > > instead of _M_range_initialize. Change the scan-tree-

[PATCH] arm: don't vectorize fmaxf() unless unsafe math opts are enabled

2025-03-26 Thread Richard Earnshaw
This test has presumably been failing since vectorization was enabled at -O2. I suspect part of the reason this wasn't picked up sooner is that the test is a hybrid execution/scan-assembler test and the execution part requires appropriate hardware. The problem is that we are vectorizing an expans

Re: [PATCH] cobol: Get rid of __int128 uses in the COBOL FE [PR119242]

2025-03-26 Thread Iain Sandoe
> On 26 Mar 2025, at 04:41, Robert Dubner wrote: > > > >> -Original Message- >> From: Jakub Jelinek >> Sent: Tuesday, March 25, 2025 19:49 >> To: Robert Dubner ; James K. Lowden >> ; Richard Biener >> Cc: gcc-patches@gcc.gnu.org >> Subject: [PATCH] cobol: Get rid of __int128 uses i

[PATCH] libstdc++: Fix std::ranges::iter_move for function references [PR119469]

2025-03-26 Thread Jonathan Wakely
The result of std::move (or a cast to an rvalue reference) on a function reference is always an lvalue. Because std::ranges::iter_move was using the type std::remove_reference_t&& as the result of std::move, it was giving the wrong type for function references. Use a decltype-specifier with declval

[PATCH] testsuite: i386: Fix c-c++-common/gomp/metadirective-device.c etc. with i?86 compiler

2025-03-26 Thread Rainer Orth
Two new tests FAIL on both Solaris/x86 and Linux/i686 with a 32-bit-default compiler: FAIL: c-c++-common/gomp/metadirective-device.c -std=c++17 scan-tree-dump-not optimized "__builtin_GOMP_error" FAIL: c-c++-common/gomp/metadirective-device.c -std=c++26 scan-tree-dump-not optimized "__builti

[PUSHED] driver: Forward '-lstdc++' to offloading compilation [PR101544]

2025-03-26 Thread Thomas Schwinge
From: Thomas Schwinge ..., so that users don't manually need to specify '-foffload-options=-lstdc++' in addition to '-lstdc++' (specified manually, or implicitly by the driver). Do like commit 4bcb46b3ade1796c5a57b294f5cca25f00671cac "driver: Forward '-lgfortran', '-lm' to offloading compilation"

[PATCH 2/2] c++/modules: Handle conflicting ABI tags [PR118920]

2025-03-26 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- The ICE in the linked PR is caused because out_ptr_t inherits an ABI tag in a module that it does not in the importing module. When we try to build a qualified 'const out_ptr_t' during stream-in, we find the existing 'cons

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

2025-03-26 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When doing tsubst_friend_class, we need to first check if any imported module has already created a (hidden) declaration for the class so that we don't end up with conflicting declarations. Currently we do this using DECL_

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

2025-03-26 Thread Jan Hubicka
> The only question I have is flow_call_edges_add only called while > profiling or is it called some other time? So looking into who calls > flow_call_edges_add, it is only branch_prob (profile.cc) which is only > called from tree-profile.cc. So a cleanup (for GCC 16 is remove the > cfghook flow_ca

Re: [PATCH] libstdc++: Support maps deduction from_range of tuples.

2025-03-26 Thread Jonathan Wakely
On 19/03/25 12:08 +0100, Tomasz Kamiński wrote: This implements part of LWG2713 that enables deduction for maps types LWG 4223 not 2713 (map, unordered_map, flat_map and non-unique equivalent) from (from_range, rg, ...) arguments, where rg is range of tuple and other pair-like. libstdc++-v3/

[PATCH] libstdc++: do not advertise full P2562R1 support (was: Re: [PATCH 2/2] libstdc++: add constexpr stable_partition)

2025-03-26 Thread Giuseppe D'Angelo
Hello, On 17/03/2025 11:22, Giuseppe D'Angelo wrote: PS: I've noticed that I have already accidentally bumped the FTM for constexpr stable sort; that's a bug as these two last algorithms were not inculded. I can decrement it for the time being, then rebump it again? I didn't get an answer to

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

2025-03-26 Thread Robert Dubner
[I am going to try to maintain a grip on my professionalism. A professional does not give in to the urge to say, "I told you so".] This program, compiled with the most recent level of patching, is generating the result IDENTIFICATION DIVISION. PROGRAM-ID. float-sub1. DATA

[COMMITTED 023/146] gccrs: fix typechecking of Fn trait calls using ADT types

2025-03-26 Thread arthur . cohen
From: Philip Herron Fixes RustGcc#2953 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): fix the ty_id gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 cant handle these * rust/compile/issue-2953-1.rs: New test. * rust

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

2025-03-26 Thread Yeoul Na
Sorry for the delay. I’m planning on sending out our design rationale of the current approach without the new syntax today. - Yeoul > On Mar 14, 2025, at 9:22 PM, John McCall wrote: > > On 14 Mar 2025, at 15:18, Martin Uecker wrote: > > Am Freitag, dem 14.03.2025 um 14:42 -0400 schrieb John

Re: [PATCH] tailc: Only diagnose musttail failures during tailc or musttail passes [PR119376]

2025-03-26 Thread Andi Kleen
Jakub Jelinek writes: > --- gcc/testsuite/g++.dg/opt/musttail2.C.jj 2025-03-24 13:27:44.329204196 > +0100 > +++ gcc/testsuite/g++.dg/opt/musttail2.C 2025-03-24 13:28:08.975867389 > +0100 > @@ -0,0 +1,14 @@ > +// PR ipa/119376 > +// { dg-do compile { target musttail } } I think this need

[PATCH v2] c: Fix tagname confusion for typedef redefinitions [PR118765]

2025-03-26 Thread Martin Uecker
I looked at this again and do not need a workaround anymore. I did not implement any restrictions preventing typedef  redeclarations from having different alignment, because merge_decls does not include any such restrictions at this time. I could write another patch for this, but I think this w

RE: [PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE [PR119242]

2025-03-26 Thread Robert Dubner
> -Original Message- > From: Jakub Jelinek > Sent: Wednesday, March 26, 2025 08:24 > To: Robert Dubner > Cc: James K. Lowden ; Richard Biener > ; gcc-patches@gcc.gnu.org > Subject: [PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE > [PR119242] > > On Tue, Mar 25, 2025 at 11:

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

2025-03-26 Thread Yeoul Na
Hi all, Thanks for all the discussions. I posted the design rationale for our current approach in https://discourse.llvm.org/t/rfc-forward-referencing-a-struct-member-within-bounds-annotations/85510. This clarifies some of the questions that are asked in this thread. The document also proposes

[PATCH] testsuite: Fix up musttail2.C test

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 10:10:07AM -0700, Andi Kleen wrote: > Jakub Jelinek writes: > > > --- gcc/testsuite/g++.dg/opt/musttail2.C.jj 2025-03-24 13:27:44.329204196 > > +0100 > > +++ gcc/testsuite/g++.dg/opt/musttail2.C2025-03-24 13:28:08.975867389 > > +0100 > > @@ -0,0 +1,14 @@ > > +// PR i

Re: [PATCH] libstdc++: do not advertise full P2562R1 support (was: Re: [PATCH 2/2] libstdc++: add constexpr stable_partition)

2025-03-26 Thread Jonathan Wakely
On Wed, 26 Mar 2025 at 14:41, Giuseppe D'Angelo wrote: > > Hello, > > On 17/03/2025 11:22, Giuseppe D'Angelo wrote: > > > > PS: I've noticed that I have already accidentally bumped the FTM for > > constexpr stable sort; that's a bug as these two last algorithms were > > not inculded. I can decreme

Re: [PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE [PR119242]

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 10:21:31AM -0500, Robert Dubner wrote: > > Here is a fixed patch, passes make check-cobol, but that is unfortunately > > still not enough. > > With this second fixed patch, all of our tests pass. Great. Is the patch ok for trunk then, or do you plan to review it or will J

testsuite: Fix up append-args-interop.f90 test

2025-03-26 Thread Jakub Jelinek
On Tue, Mar 25, 2025 at 10:03:17AM -0600, Sandra Loosemore wrote: > * gfortran.dg/gomp/append-args-interop.f90: New. The test fails for me with UNRESOLVED: gfortran.dg/gomp/append-args-interop.f90 -O scan-tree-dump gimple "__builtin_GOMP_interop (99, 0, 0B, 0B, 0B, 0, 0B, 3, intero

[PATCH 02/12] testsuite: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.dg/ipa/pr110377.c: Fix missing trailing " }" in dg-do directive. * gcc.dg/plugin/infoleak-1.c: Fix dg-bogus directive. * gcc.dg/pr101364-1.c: Fix missing trailing " }" in dg-options directive. * gcc.dg

[PATCH 08/12] testsuite, i386: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/i386/addr-space-1.c: Add missing trailing } to dg-do directive. * gcc.target/i386/strub-pr118006.c: Fix ordering of dg-do and dg-require- directive so that dg-do is first. --- gcc/testsuite/gcc.target/i386/add

[PATCH 03/12] testsuite, gomp: fix broken dg directives

2025-03-26 Thread David Malcolm
gcc/testsuite/ChangeLog: * c-c++-common/gomp/metadirective-target-device-2.c: Fix missing trailing " }" on dg-do directive. * gcc.dg/gomp/attrs-21.c: Likewise for dg-options. * gcc.dg/gomp/parallel-2.c: Drop ":" from dg-message. --- gcc/testsuite/c-c++-common/gomp/m

[PATCH 00/12] Implement a new dg-lint tool and use on our testsuite

2025-03-26 Thread David Malcolm
This patch kit: * adds minimal Python bindings for libgdiagnostics.so (below contrib) * implements a new dg-lint tool (below contrib) to detect for common mistakes in our testsuite, using Python 3 (and the above bindings) * fixes a bunch of issues reported by the tool I've only teste

[PATCH 05/12] testsuite, arc: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/arc/taux-1.c: Fix missing trailing '" }' from dg-options. * gcc.target/arc/taux-2.c: Likewise. --- gcc/testsuite/gcc.target/arc/taux-1.c | 2 +- gcc/testsuite/gcc.target/arc/taux-2.c | 2 +- 2 files changed, 2 inserti

[PATCH 09/12] testsuite, ia64: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/ia64/mfused-madd-vect.c: Fix missing trailing " }" in dg-do directive. * gcc.target/ia64/mfused-madd.c: Likewise. * gcc.target/ia64/mno-fused-madd.c: Likewise. --- gcc/testsuite/gcc.target/ia64/mfused-madd-vec

[PATCH 07/12] testsuite, bfin: fix broken dg directive

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/bfin/l2.c: Fix missing space before trailing "}" in dg-bfin-processors directive. --- gcc/testsuite/gcc.target/bfin/l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/bfin/l2.c

[PATCH 10/12] testsuite, powerpc: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr70243.c: Fix missing trailing " }" in dg-do directive. * gcc.target/powerpc/pr91903.c: Likewise. --- gcc/testsuite/gcc.target/powerpc/pr70243.c | 2 +- gcc/testsuite/gcc.target/powerpc/pr91903.c | 2 +- 2 fi

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

2025-03-26 Thread David Malcolm
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. --- gcc/testsuite/gcc.target/s390/target-attribute/tattr-1.c | 2 +- gcc/te

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

2025-03-26 Thread Jørgen Kvalsvik
On 3/26/25 20:49, Jørgen Kvalsvik wrote: On 3/26/25 14:54, Jan Hubicka wrote: Hello, I apologize for late reply here.  I went thru the paper in gereater detail. While I originally though the usual path-profiling can be reasonably merged with the prime math profiling, so it is useful both for opt

[PATCH 04/12] testsuite, aarch64: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/aarch64/atomic-inst-ldlogic.c: Add missing trailing " }" for 2 dg-final directives. * gcc.target/aarch64/saturating_arithmetic_1.c: Fix dg-do compile. * gcc.target/aarch64/saturating_arithmetic_2.c: Likewise. -

[PATCH 5/6] testsuite: fix more dg-* whitespace issues

2025-03-26 Thread Sam James
A handful of cosmetic ones in here but most meant the directive wasn't doing anything. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/udlit-namespace-ambiguous.C: Fix whitespace. * g++.dg/cpp2a/constexpr-init21.C: Ditto. * g++.dg/diagnostic/wrong-tag-1.C: Ditto. * g++.dg/

ping: [PATCH] c-family: Improve location for -Wunknown-pragmas in a _Pragma [PR118838]

2025-03-26 Thread Lewis Hyatt
Hello- May I please ping this patch? Thanks! https://gcc.gnu.org/pipermail/gcc-patches/2025-February/675645.html -Lewis On Wed, Feb 12, 2025 at 8:27 PM Lewis Hyatt wrote: > > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118838 > > This patch addresses the issue mentioned in the PR (a

Re: [PATCH, V3] PR target/118541 - Do not generate unordered fp cmoves for IEEE compares on PowerPC

2025-03-26 Thread Michael Meissner
On Mon, Mar 24, 2025 at 09:15:26PM +0100, Florian Weimer wrote: > * Michael Meissner: > > > +enum reverse_cond_t { > > + REVERSE_COND_ORDERED_OK, > > + REVERSE_COND_NO_ORDERED > > +}; > > This should probably be something > like > > enum reverse_cond_t { > ordered_ok, > no_ordered, > }; >

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread Sam James
Sam James writes: > David Malcolm writes: > >> This patch adds a new dg-lint subdirectory below contrib, containing >> a "dg-lint" script for detecting common mistakes made in our DejaGnu >> tests. >> I should say: I don't think any of my comments are blockers at all, they're really just furthe

Re: [PATCH] Fortran: fix bogus recursion with DT default initialization [PR118796]

2025-03-26 Thread Harald Anlauf
Hi Andre, Am 26.03.25 um 22:49 schrieb Andre Vehreschild: Hi Harald, looks good to me. Thanks for the patch. pushed as r15-8945-gb70bd691cfd77b. Thanks for the swift review! Harald - Andre Andre Vehreschild * ve...@gmx.de Am 26. März 2025 22:18:41 schrieb Harald Anlauf : Dear all, it s

[PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE [PR119242]

2025-03-26 Thread Jakub Jelinek
On Tue, Mar 25, 2025 at 11:36:10PM -0500, Robert Dubner wrote: > I took a minute to apply the patch and run the tests. Ten of the UAT > tests fail; they are the ones that test the ROUNDED clause. > > It's 00:30 local time here, so I am not going to look into it now. But > here is a simple case s

[PATCH, V4] PR target/118541 - Do not generate unordered fp cmoves for IEEE compares on PowerPC

2025-03-26 Thread Michael Meissner
This is version 4 of the patch for PR target/118541. In version 4, I made the following changes: 1: I changed the use of enums to match current C++. Thanks to Florian Weimer. In version 3, I made the following changes: 1: The new argument to rs6000_reverse_condition that says whe

[COMMITTED, OBVIOUS] OpenMP: Fix declaration in append-args-interop.c test case

2025-03-26 Thread Sandra Loosemore
I ran into this while backporting my declare variant/dispatch/interop patch f016ee89955ab4da5fe7ef89368e9437bb5ffb13 to the og14 development branch. In C dialects prior to C23 (the default on mainline), functions declared "float f()" and "float g(void)" aren't considered equivalent for the purpose

[committed] cobol: Bring trunk into line with Dubner's test system.

2025-03-26 Thread Robert Dubner
Jim discovered a couple of tests that succeed on my system didn't succeed on his. That led to the discovery that some stuff in my test environment hadn't actually found its way in to trunk. This fixes that. >From 0747d51de55ae29430cb3ae6371210076d7b7c0d Mon Sep 17 00:00:00 2001 From: Robert Dubn

Re: [PATCH] libstdc++: Use const_cast to workaround tm_zone being non-const

2025-03-26 Thread Iain Sandoe
> On 26 Mar 2025, at 17:50, Jonathan Wakely wrote: > > Iain reported that he's seeing this on Darwin: > > include/bits/chrono_io.h:914: warning: ISO C++ forbids converting a string > constant to 'char*' [-Wwrite-strings] > > This is because the BSD definition ot tm::tm_zone is a char* (and

[PATCH] tailcall: Improve debug dumps

2025-03-26 Thread Andrew Pinski
While trying to reduce musttail failures, I noticed that it was hard to figure out if `Cannot convert` message was on a musttail call or just a normal call. This adds extra messages to the dump debug to signify it was a musttail call and if we are going to remove the musttail from it too. Bootstra

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread Sam James
Jakub Jelinek writes: > On Wed, Mar 26, 2025 at 09:32:30PM +, Sam James wrote: >> Right, we can extend it for 'dg-do known-actions' as well. > > I think that shouldn't be necessary. > > gcc-dg-test-1 should already complain about unexpected actions. Ah, you're right. Thanks.

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

2025-03-26 Thread Sam James
Include the term used in the standard to ease further research for users. gcc/ChangeLog: * doc/invoke.texi: Use "compatible types" term. --- gcc/doc/invoke.texi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b3f

[PATCH 1/6] testsuite: fortran: fix dg syntax errors

2025-03-26 Thread Sam James
No change in test results. The changes other than the first are arguably not errors, but still clearly wrong and mistakes. gcc/testsuite/ChangeLog: * gfortran.dg/associate_70.f90: Replace ')' with '}'. * gfortran.dg/bessel_3.f90: Drop extraneous ')'. * gfortran.dg/c_funloc

[PATCH 3/6] testsuite: more (mostly cosmetic) dg- whitespace fixes

2025-03-26 Thread Sam James
Some of these are harmless but still inconsistent (and asking for trouble given it may give people the wrong idea about similar "style"). gcc/testsuite/ChangeLog: * g++.dg/cpp0x/gen-attrs-6.C: Surround 'target' by whitespace. * gcc.target/aarch64/atomic-inst-ldlogic.c: Fix 'dg-fin

[PATCH 6/6] testsuite: assorted targets: add missing braces to dg-* directives

2025-03-26 Thread Sam James
These get ignored otherwise. gcc/testsuite/ChangeLog: * gcc.target/arc/taux-1.c: Add missing brace. * gcc.target/arc/taux-2.c: Ditto. * gcc.target/i386/addr-space-1.c: Ditto. * gcc.target/ia64/mfused-madd-vect.c: Ditto. * gcc.target/ia64/mfused-madd.c: Ditt

[PATCH 0/6] testsuite: more misc. syntax fixes

2025-03-26 Thread Sam James
Pushed as obvious. Sam James (6): testsuite: fortran: fix dg syntax errors testsuite: fix dg-bogus typo testsuite: more (mostly cosmetic) dg- whitespace fixes testsuite: fix dg-message typos testsuite: fix more dg-* whitespace issues testsuite: assorted targets: add missing braces to d

[PATCH 2/4] testsuite: tree-ssa: fix PR98265 filename

2025-03-26 Thread Sam James
.C is for C++ testcases and gcc.dg's dg.exp ignores .c. The test was not being run. gcc/testsuite/ChangeLog: PR ipa/98265 * gcc.dg/tree-ssa/pr98265.C: Move to... * g++.dg/tree-ssa/pr98265.C: ...here. --- gcc/testsuite/{gcc.dg => g++.dg}/tree-ssa/pr98265.C | 0 1 file chan

[PATCH] libcpp: Add missing configure check for setlocale.

2025-03-26 Thread Roland McGrath
The libcpp code uses `#ifdef HAVE_SETLOCALE` but its configure doesn't have the corresponding check. Ok for trunk and 14 branch? (Sorry for the attachment, my MUA is difficult.) Thanks, Roland libcpp/ 2025-03-27 Roland McGrath * configure.ac: Check for setlocale. * configure, config.in: Re

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

2025-03-26 Thread Jørgen Kvalsvik
On 3/26/25 14:54, Jan Hubicka wrote: Hello, I apologize for late reply here. I went thru the paper in gereater detail. While I originally though the usual path-profiling can be reasonably merged with the prime math profiling, so it is useful both for optimizaiton and coverage testing, I think it

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

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 02:34:45PM -0400, David Malcolm wrote: > gcc/testsuite/ChangeLog: > * c-c++-common/gomp/metadirective-target-device-2.c: Fix missing > trailing " }" on dg-do directive. > * gcc.dg/gomp/attrs-21.c: Likewise for dg-options. > * gcc.dg/gomp/parallel-2.c:

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

2025-03-26 Thread Joseph Myers
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 > https://discourse.llvm.org/t/rfc-forward-referencing-a-struct-member-within-bounds-annotations/85510. > > This clarifies some of the questions tha

[PATCH 6/7] Doc: Move Integer Overflow Builtins section [PR42270]

2025-03-26 Thread Sandra Loosemore
This is part of an incremental effort to make the chapter on GCC extensions better organized by grouping/rearranging sections by topic. gcc/ChangeLog PR other/42270 * doc/extend.texi (Numeric Builtins): Move Integer Overflow Builtins section here, as a subsection. --- gcc/

[PATCH 1/7] Doc: Remove separate "Target Format Checks" section [PR42270]

2025-03-26 Thread Sandra Loosemore
This is part of an incremental effort to make the chapter on GCC extensions better organized by grouping/rearranging sections by topic. Following the last round of patches, there's a leftover section "Target Format Checks" that didn't fit into any category. It seems best to merge this material in

[PATCH 3/7] Doc: Move builtin documentation to a new chapter [PR42270]

2025-03-26 Thread Sandra Loosemore
This is part of an incremental effort to make the documentation for GCC extensions better organized by grouping/rearranging sections by topic. I was originally intending to consolidate all the sections documenting builtins as subsections of a new container section within the C extensions chapter,

[PATCH, RFC 0/7] Doc: Further cleanups to extend.texi [PR42270]

2025-03-26 Thread Sandra Loosemore
Here's another batch of patches to address PR42270, a complaint about the poor organization of the documentation for GNU extensions. My last set of patches for this was focused on grouping everything but the attributes and builtins documentation into categories. This set does those two groupings,

[PATCH 2/7] Doc: Add a container section to consolidate attribute documentation [PR42270]

2025-03-26 Thread Sandra Loosemore
This is part of an incremental effort to make the chapter on GCC extensions better organized by grouping/rearranging sections by topic. Note that this patch does not address the restructuring/rewrite suggested by PR88472 or PR102397, beyond adding a very short introduction to th

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

2025-03-26 Thread Yeoul Na
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 >> https://discourse.llvm.org/t/rfc-forward-referencing-a-struct-member-w

[PATCH 7/7] Doc: Clean up New/Delete Builtins manual section

2025-03-26 Thread Sandra Loosemore
I noticed that the "New/Delete Builtins" section failed to explicitly name or describe the arguments of the builtin functions it purported to document, outside of using them in an example. I've fixed that and cleaned up the whole section. gcc/ChangeLog * doc/extend.texi (New/Delete Builti

[PING][PATCH] Makefile.tpl: Implement per-stage GDCFLAGS [PR116975]

2025-03-26 Thread Iain Buclaw
Ping. Excerpts from Iain Buclaw's message of März 3, 2025 11:14 pm: > Hi, > > This patch implements STAGE1_GDCFLAGS and others to the configure > machinery, allowing the GDCFLAGS for each bootstrap stage of building > gdc to be overriden, as is the case with CXXFLAGS for other front-ends. > > Th

[PATCH 0/4] testsuite: filename/location fixes

2025-03-26 Thread Sam James
These weren't being run before because of the wrong filename or location. Pushed the lot as obvious. Sam James (4): testsuite: g++.dg: fix PR112938 filename testsuite: tree-ssa: fix PR98265 filename testsuite: g++.dg: vect: fix PR37143 filename testsuite: tree-ssa: fix PR98265 test to use

[PATCH 4/4] testsuite: tree-ssa: fix PR98265 test to use C++14

2025-03-26 Thread Sam James
This test was previously not being run at all so this wasn't noticed until my fix just now. The test needs C++14 and it also should use scan-tree-dump, not scan-tree-dump-times, as it wasn't passing a count parameter. gcc/testsuite/ChangeLog: PR ipa/98265 * g++.dg/tree-ssa/pr9826

[PATCH 1/4] testsuite: g++.dg: fix PR112938 filename

2025-03-26 Thread Sam James
The test was being ignored because dg.exp looks for .C in g++.dg/. gcc/testsuite/ChangeLog: PR middle-end/112938 * g++.dg/strub-internal-pr112938.cc: Move to... * g++.dg/strub-internal-pr112938.C: ...here. --- .../{strub-internal-pr112938.cc => strub-internal-pr112938.C}

Re: [PATCH] testsuite: Fix up musttail2.C test

2025-03-26 Thread Andi Kleen
> You're right (although I don't remember which targets are > non-external_musttail). Several flavors of ARM and Power at least.

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

2025-03-26 Thread Peter Bergner
On 3/26/25 1:34 PM, David Malcolm wrote: > Found by dg-lint. > > gcc/testsuite/ChangeLog: > * gcc.target/powerpc/pr70243.c: Fix missing trailing " }" in > dg-do directive. > * gcc.target/powerpc/pr91903.c: Likewise. > --- > gcc/testsuite/gcc.target/powerpc/pr70243.c | 2 +- > gc

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread David Malcolm
On Wed, 2025-03-26 at 19:59 +0100, Jakub Jelinek wrote: > On Wed, Mar 26, 2025 at 02:34:43PM -0400, David Malcolm wrote: > > Thanks for working on this. > My python is very limited, so just adding some comments rather > than doing patch review. > > > +COMMON_MISSPELLINGS = {('dg_final', 'dg-final

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

2025-03-26 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Friday, March 21, 2025 03:48 > To: Robert Dubner > Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH][RFC] [cobol] change cbl_field_data_t::etc_t::value > from _Float128 to tree > > On Thu, 20 Mar 2025, Robert Dubner

[PATCH] testsuite: fixup tree scan syntax for strub-internal-pr112938.C

2025-03-26 Thread Sam James
This wasn't being run before my r15-8949-g6b21f7969241cf so went unnoticed. Match [0-9+] instead of [0-9][0-9] and escape the parentheses around 'D'. gcc/testsuite/ChangeLog: PR testsuite/119489 * g++.dg/strub-internal-pr112938.C: Adjust pattern. --- Pushed as obvious. gcc/test

[PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread David Malcolm
This patch adds a new dg-lint subdirectory below contrib, containing a "dg-lint" script for detecting common mistakes made in our DejaGnu tests. Specifically, DejaGnu's dg.exp's dg-get-options has a regexp for detecting dg- directives https://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=blob;f=l

[PATCH 06/12] testsuite, arm: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/arm/cmse/cmse-17.c: Fix missing space before trailing "}" in dg-options. * gcc.target/arm/short-vfp-1.c: Likewise for dg-final; also after leading "{", in 5 places. --- gcc/testsuite/gcc.target/arm/cmse/cmse-1

[PATCH 11/12] testsuite, riscv: fix broken dg directives

2025-03-26 Thread David Malcolm
Found by dg-lint. gcc/testsuite/ChangeLog: * gcc.target/riscv/cmo-zicbop-1.c: Fix missing space before trailing } in dg-do directive. * gcc.target/riscv/cmo-zicbop-2.c: Likewise. * gcc.target/riscv/prefetch-zicbop.c: Likewise. * gcc.target/riscv/prefetch-zih

Re: [Fortran, Patch, PR119349, v1] Fix regression of polymorphic dummy sourced from array constructors.

2025-03-26 Thread Andre Vehreschild
Hi Jerry, thanks for the review and the kind words. Committed as gcc-15-8481-g0f344846a62 Thanks again, Andre On Thu, 20 Mar 2025 11:42:35 -0700 Jerry D wrote: > On 3/20/25 9:20 AM, Andre Vehreschild wrote: > > Hi all, > > > > attached patch fixes a 15-regression where an element of an

[committed] d: import __stdin causes compilation to pause while reading from stdin

2025-03-26 Thread Iain Buclaw
Hi, This patch merges the D front-end with upstream dmd 02a64d2e13. Moves the special handling of reading from stdin out of the language semantic routines. All references to `__stdin.d` have also been removed from the front-end implementation. Bootstrapped and regression tested on x86_64-linux-g

RE: [PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE [PR119242]

2025-03-26 Thread Robert Dubner
> -Original Message- > From: Jakub Jelinek > Sent: Wednesday, March 26, 2025 13:28 > To: Robert Dubner > Cc: James K. Lowden ; Richard Biener > ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] cobol, v2: Get rid of __int128 uses in the COBOL FE > [PR119242] > > On Wed, Mar 26, 2025 at

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 02:34:43PM -0400, David Malcolm wrote: Thanks for working on this. My python is very limited, so just adding some comments rather than doing patch review. > +COMMON_MISSPELLINGS = {('dg_final', 'dg-final')} Does that catch just dg_final and not say dg_do or dg_error or dg

[PATCH 5/7] Doc: Organize atomic memory builtins documentation [PR42270]

2025-03-26 Thread Sandra Loosemore
This is part of an incremental effort to make the chapter on GCC extensions better organized by grouping/rearranging sections by topic. This installment adds a container section to hold documentation for both the _atomic and _sync builtins, reordering them so that the new _atomic interface is pres

[PATCH] Fortran: fix bogus recursion with DT default initialization [PR118796]

2025-03-26 Thread Harald Anlauf
Dear all, it seems that my patch for default-initialization of function results of derived type could trigger a weird issue if a type-bound function of a type that is use-associated from a different module had the same name, even if the declared function had a different type, but only if the resu

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 09:32:30PM +, Sam James wrote: > Right, we can extend it for 'dg-do known-actions' as well. I think that shouldn't be necessary. gcc-dg-test-1 should already complain about unexpected actions. Jakub

[PATCH 4/7] Doc: Break up and rearrange the "other builtins" section [PR42270]

2025-03-26 Thread Sandra Loosemore
This is part of an incremental effort to make the chapter on GCC extensions better organized by grouping/rearranging sections by topic. The "Other Builtins" section had become a catch-all for all sorts of things with very little organization or attempt to differentiate between important informatio

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread Sam James
David Malcolm writes: > On Wed, 2025-03-26 at 19:59 +0100, Jakub Jelinek wrote: >> On Wed, Mar 26, 2025 at 02:34:43PM -0400, David Malcolm wrote: >> >> Thanks for working on this. >> My python is very limited, so just adding some comments rather >> than doing patch review. >> >> > +COMMON_MISSP

Re: [PATCH 01/12] contrib: add dg-lint and libgdiagnostics.py [PR116163]

2025-03-26 Thread Sam James
David Malcolm writes: > This patch adds a new dg-lint subdirectory below contrib, containing > a "dg-lint" script for detecting common mistakes made in our DejaGnu > tests. > > Specifically, DejaGnu's dg.exp's dg-get-options has a regexp for > detecting dg- directives > https://git.savannah.gnu

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

2025-03-26 Thread Jakub Jelinek
On Wed, Mar 26, 2025 at 02:34:44PM -0400, David Malcolm wrote: > Found by dg-lint. > > gcc/testsuite/ChangeLog: > * gcc.dg/ipa/pr110377.c: Fix missing trailing " }" in dg-do > directive. > * gcc.dg/plugin/infoleak-1.c: Fix dg-bogus directive. > * gcc.dg/pr101364-1.c: Fix mi

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

2025-03-26 Thread Peter Bergner
On 3/26/25 3:01 AM, Jakub Jelinek wrote: > In any case, this flag feels like a tuning decision rather than hard > ISA requirement and I see no problems why we couldn't inline > even explicit -msave-toc-indirect function into -mno-save-toc-indirect > or vice versa. > We already ignore OPTION_MASK_P{

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

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

Re: [PATCH] Fortran: fix bogus recursion with DT default initialization [PR118796]

2025-03-26 Thread Andre Vehreschild
Hi Harald, looks good to me. Thanks for the patch. - Andre Andre Vehreschild * ve...@gmx.de Am 26. März 2025 22:18:41 schrieb Harald Anlauf : Dear all, it seems that my patch for default-initialization of function results of derived type could trigger a weird issue if a type-bound function of

[pushed] gcov: branch, conds, calls in function summaries

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

[pushed] Add coverage_instrumentation_p

2025-03-26 Thread Jørgen Kvalsvik
Provide a helper for checking if any coverage (arc, conditions, paths) is enabled, rather than manually checking all the flags. This should make the intent clearer, and make it easier to maintain the checks when more flags are added. The function is forward declared in two header files as differen

  1   2   >