[committed v2] libstdc++: Fix std::format thousands separators when sign present [PR120548]

2025-06-05 Thread Jonathan Wakely
The leading sign character should be skipped when deciding whether to insert thousands separators into a floating-point format. libstdc++-v3/ChangeLog: PR libstdc++/120548 * include/std/format (__formatter_fp::_M_localize): Do not include a leading sign character in the st

Re: [to-be-committed][RISC-V] Improve sequences to generate -1, 1 in some cases.

2025-06-05 Thread Jeff Law
On 6/4/25 7:11 PM, Jeff Law wrote: On 6/4/25 6:37 PM, Palmer Dabbelt wrote: On Wed, 04 Jun 2025 17:25:20 PDT (-0700), Jeff Law wrote: This patch has a minor improvement to if-converted sequences based on observations I found while evaluating another patch from Shreya to handle more cases with z

[COMMITTED 06/40] ada: Mark constants inside a declare expression as referenced

2025-06-05 Thread Marc Poulhiès
): Mark used local variables inside a declare expression as referenced. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_res.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index bbf7bb95ed8..865f967a5b9 100644 --- a/gcc

[COMMITTED 09/40] ada: Fix adareducer oracle generation

2025-06-05 Thread Marc Poulhiès
/ChangeLog: * generate_minimal_reproducer.adb (Generate_Minimal_Reproducer): Fix oracle generation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/generate_minimal_reproducer.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/generate_minimal_repr

[COMMITTED 37/40] ada: Fix SFN_Patterns documentation comment

2025-06-05 Thread Marc Poulhiès
indices of default patterns. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/fname-uf.adb | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/ada/fname-uf.adb b/gcc/ada/fname-uf.adb index 39a09c4ce13..ec22ad7a3d2 100644 --- a/gcc/ada/fname-uf.adb +++ b

[COMMITTED 31/40] ada: Missing error on expression function returning incomplete type

2025-06-05 Thread Marc Poulhiès
on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch6.adb | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 0cfcc1cb263..d4e6d169326 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -591,6 +591,11 @@ package body

[COMMITTED 33/40] ada: Remove useless global variable

2025-06-05 Thread Marc Poulhiès
_Body, Analyze_Task_Definition, Analyze_Task_Type_Declaration, Analyze_Terminate_Alternative, Analyze_Timed_Entry_Call, Analyze_Triggering_Alternative): Remove useless assignments. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/opt.ads | 4 gcc/ada/sem_ch

[COMMITTED 30/40] ada: Add Ghost aspect to Lo in s-arit32.adb

2025-06-05 Thread Marc Poulhiès
From: Aleksandra Pasek gcc/ada/ChangeLog: * libgnat/s-arit32.adb: Add Ghost aspect to Lo. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-arit32.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/ada/libgnat/s-arit32.adb b/gcc/ada

[COMMITTED 11/40] ada: Fix buffer overflow for function call returning discriminated limited record

2025-06-05 Thread Marc Poulhiès
-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 100 +++ gcc/ada/sem_util.adb | 18 2 files changed, 33 insertions(+), 85 deletions(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 7e464541be2..d5667b423de 100644 --- a/gcc

[COMMITTED 39/40] ada: Add explicit null pointer check in C.Strings.Update

2025-06-05 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * libgnat/i-cstrin.adb: null pointer check in Update Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/i-cstrin.adb | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ada/libgnat/i-cstrin.adb b/gcc/ada/libgnat/i

[COMMITTED 35/40] ada: Activate SPARK_Mode in Ada.Numerics.*_Random specs

2025-06-05 Thread Marc Poulhiès
From: Andres Toom gcc/ada/ChangeLog: * libgnat/a-nudira.ads: Activate SPARK mode and add missing basic contracts. Mark the unit as always terminating. * libgnat/a-nuflra.ads: Idem. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-nudira.ads

[COMMITTED 34/40] ada: Spurious compilation error with repeated loop index

2025-06-05 Thread Marc Poulhiès
generating duplicate names for master nodes. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 15 +++ 1 file changed, 15 insertions(+) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 67af1d77263..905094c7e40 100644 --- a/gcc/ada

[COMMITTED 27/40] ada: Tweak caching of streaming subprograms

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * exp_attr.adb (Interunit_Ref_OK): Tweak categorization of compilation units. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_attr.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc

[COMMITTED 29/40] ada: Fix crash on access to protected return

2025-06-05 Thread Marc Poulhiès
-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch4.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 8c724844eb3..eb9fb6bba56 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -15036,10 +15036,11 @@ package

[COMMITTED 13/40] ada: Mark the types of operator arguments as used

2025-06-05 Thread Marc Poulhiès
. gcc/ada/ChangeLog: * sem_ch8.adb (Mark_Use_Type): Additionally mark the types of the parameters and return values as used when analyzing an operator. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch8.adb | 5 + 1 file changed, 5 insertions(+) diff

[COMMITTED 16/40] ada: Implement use implies with experimental extension

2025-06-05 Thread Marc Poulhiès
): Moved from sem_prag. * sem_prag.adb (Analyze_Pragma): Update calls to Is_In_Context_Clause. (Is_In_Context_Clause): Moved to sem_util. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch10.adb | 10 +- gcc/ada/sem_ch10.ads | 9 + gcc/ada

[COMMITTED 12/40] ada: Fix couple of remaining incompatibilities with CHERI architecture

2025-06-05 Thread Marc Poulhiès
rence): Perform address arithmetic using an operator of System.Storage_Elements. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch9.adb | 6 -- gcc/ada/exp_pakd.adb | 31 +-- 2 files changed, 21 insertions(+), 16 deletions(-) diff --

[COMMITTED 36/40] ada: Tweak wording of documentation comments in Atree

2025-06-05 Thread Marc Poulhiès
-pc-linux-gnu, committed on master. --- gcc/ada/atree.ads | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index dc5fe0d8ad6..c8cc2bcf0c4 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -299,20 +299,19 @@ package

[COMMITTED 32/40] ada: Exception-raising loop incorrectly eliminated

2025-06-05 Thread Marc Poulhiès
statement list includes an explicit (i.e. Comes_From_Source) raise statement. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index ce54deaab85

[COMMITTED 20/40] ada: Error about assignment to limited target on aggregate with "for of" iterator

2025-06-05 Thread Marc Poulhiès
generated by the expander for initializing the aggregate object. gcc/ada/ChangeLog: * exp_aggr.adb (Two_Pass_Aggregate_Expansion): Change call to Make_Assignment for the indexed aggregate object to call Change_Make_OK_Assignment instead. Tested on x86_64-pc-linux-gnu, committed

[COMMITTED 26/40] ada: Add missing Ghost aspect to Lemma_Not_In_Range_Big2xx64 in s-aridou.adb

2025-06-05 Thread Marc Poulhiès
From: Aleksandra Pasek gcc/ada/ChangeLog: * libgnat/s-aridou.adb: Add missing Ghost aspect to Lemma_Not_In_Range_Big2xx64. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-aridou.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/libgnat

[COMMITTED 25/40] ada: Mitigate issue with tracebacks

2025-06-05 Thread Marc Poulhiès
geLog: * libgnat/s-trasym__dwarf.adb (Init_Module): Add mitigation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-trasym__dwarf.adb | 18 ++ 1 file changed, 18 insertions(+) diff --git a/gcc/ada/libgnat/s-trasym__dwarf.adb b/gcc/ada/libg

[COMMITTED 18/40] ada: Fix various issues in the SARIF report

2025-06-05 Thread Marc Poulhiès
. (Relative_Path): Avoid relative paths starting with a path separator. * osint.ads: Update the documentation for Relative_Path. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/diagnostics-sarif_emitter.adb | 7 +-- gcc/ada/osint.adb

[COMMITTED 22/40] ada: Fix reproducer generation

2025-06-05 Thread Marc Poulhiès
. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/generate_minimal_reproducer.adb | 44 + 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/gcc/ada/generate_minimal_reproducer.adb b/gcc/ada/generate_minimal_reproducer.adb index 2378f60c472

[COMMITTED 19/40] ada: Add error message for a declared-too-late abstract state constituent

2025-06-05 Thread Marc Poulhiès
al message. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Constituent): In the specific case case of a defined-too-late abstract state constituent, generate an additional error message. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/a

[COMMITTED 40/40] ada: Confusing "modified by call, but value overwritten" warning

2025-06-05 Thread Marc Poulhiès
Unreferenced on such variables would not be able to silence such warnings. gcc/ada/ChangeLog: * sem_warn.adb (Warn_On_Useless_Assignment): Disable out value "overwritten" warning when we are not warning on unread out parameters (e.g. "-gnatw.o"). Tested on

[COMMITTED 15/40] ada: Extend and clarify documentation of stack size settings for Windows

2025-06-05 Thread Marc Poulhiès
From: Piotr Trojanek The original documentation for more recent versions of Windows didn't specify whether the specified stack size acts as a "reserved" or "committed" stack size. Also, clarify the wording for older versions of Windows. gcc/ada/ChangeLog

[COMMITTED 23/40] ada: Add missing Ghost aspect to Lemma_Not_In_Range_Big2xx32 in s-arit32.adb

2025-06-05 Thread Marc Poulhiès
From: Johannes Kliemann gcc/ada/ChangeLog: * libgnat/s-arit32.adb (Lemma_Not_In_Range_Big2xx32): Add missing Ghost aspect. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-arit32.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/libgnat

[COMMITTED 28/40] ada: Improve efficiency of very large shift counts

2025-06-05 Thread Marc Poulhiès
ld_Uint, Fold_Ureal): Fold the comments into one comment, because DRY. Remove useless verbiage. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_eval.adb | 95 ++-- gcc/ada/sem_eval.ads | 37 ++--- 2 files cha

Re: [committed] libstdc++: Skip time zone format testing for COW std::string

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 11:04 PM Jonathan Wakely wrote: > This is needed when testing with -D_GLIBCXX_USE_CXX11_ABI=0 to fix: > FAIL: std/time/format/empty_spec.cc -std=gnu++20 (test for excess errors) > > libstdc++-v3/ChangeLog: > > * testsuite/std/time/format/empty_spec.cc: Only test ti

[COMMITTED 17/40] ada: Fix unnecessarily large allocation in New_String

2025-06-05 Thread Marc Poulhiès
-gnu, committed on master. --- gcc/ada/libgnat/i-cstrin.adb | 37 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/gcc/ada/libgnat/i-cstrin.adb b/gcc/ada/libgnat/i-cstrin.adb index 6d329254aff..974ba3a0e8c 100644 --- a/gcc/ada/libgnat/i-cstrin.adb

[COMMITTED 14/40] ada: Spurious accessibility error with -gnatc

2025-06-05 Thread Marc Poulhiès
(Check_Return_Construct_Accessibility): Disable check generation when we are only checking semantics. * opt.ads: Add new flag for -gnatc mode * switch-c.adb (Scan_Front_End_Switches): Set flag for -gnatc mode Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada

[COMMITTED 03/40] ada: Use absolute paths in SARIF reports

2025-06-05 Thread Marc Poulhiès
. * gnatls.adb: Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/clean.adb | 7 +- gcc/ada/diagnostics-json_utils.adb| 139 ++ gcc/ada/diagnostics-json_utils.ads| 5 + gcc/ada/diagnostics-sarif_emitter.adb | 263

[COMMITTED 05/40] ada: Cleanup preanalysis of static expressions (part 6)

2025-06-05 Thread Marc Poulhiès
body of Preanalyze_Assert_Expression. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/contracts.adb | 2 +- gcc/ada/exp_pakd.adb | 3 +- gcc/ada/exp_util.adb | 12 +++--- gcc/ada/freeze.adb| 9 ++-- gcc/ada/sem.ads | 12 +++--- gcc/ada/sem_ch12.adb | 4

[COMMITTED 21/40] ada: Reject Valid_Value arguments originating from Standard

2025-06-05 Thread Marc Poulhiès
. * sem_attr.adb (Analyze_Attribute): Reject types where the root type originates from Standard. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst | 6 +++--- gcc/ada

[COMMITTED 07/40] ada: Fix compile-time failure due to duplicated attribute subprograms.

2025-06-05 Thread Marc Poulhiès
value passed to Get or to Set should never be the entity node for a subtype. Use the entity of the corresponding type declaration instead. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_attr.adb | 39 --- 1 file changed

[COMMITTED 10/40] ada: Fix New_Char_Array with empty arrays

2025-06-05 Thread Marc Poulhiès
/i-cstrin.adb (Position_Of_Nul): Change specification and adjust body accordingly. (New_Char_Array): Fix size of allocation. (To_Chars_Ptr): Adapt to Position_Of_Nul change. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/i-cs

[COMMITTED 08/40] ada: Fix Generate_Minimal_Reproducer on instantiations

2025-06-05 Thread Marc Poulhiès
adjusts the copying process accordingly. gcc/ada/ChangeLog: * generate_minimal_reproducer.adb (Generate_Minimal_Reproducer): Fix when main library item is an instantiation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/generate_minimal_reproducer.adb | 41

[COMMITTED 04/40] ada: Spurious accessibility error with -gnatc

2025-06-05 Thread Marc Poulhiès
(Check_Return_Construct_Accessibility): Disable check generation when we are only checking semantics. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/accessibility.adb | 7 +++ 1 file changed, 7 insertions(+) diff --git a/gcc/ada/accessibility.adb b/gcc/ada

[COMMITTED 24/40] ada: Implement built-in-place expansion of two-pass array aggregates

2025-06-05 Thread Marc Poulhiès
(Analyze_Object_Declaration): Detect the cases of an array originally initialized by an aggregate consistently. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 498 ++- gcc/ada/exp_ch3.adb | 11 +- gcc/ada/exp_ch4.adb

[COMMITTED 02/40] ada: Avoid calling Resolve with Stand.Any_Fixed as the expected type

2025-06-05 Thread Marc Poulhiès
er operand (i.e., B_Typ). Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_res.adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index b73b947c9a2..0df6c27c30d 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6101

[COMMITTED 01/40] ada: Compiler crash on array aggregate association iterating over function result

2025-06-05 Thread Marc Poulhiès
ollection for expressions of aggregate associations with multiple choices. Removed redundant test of Box_Present from original code. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 119 --- 1 file changed, 88 inse

[to-be-committed] RISC-V: Don't use structured binding in riscv-common.cc

2025-06-05 Thread Kito Cheng
It's new C++ language feature introduced in C++17, which is higher than the build environment required by the GCC (C++14). gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Remove structured binding from the code. --- gcc/common/config/riscv/riscv-common.cc | 27 +

Re: [to-be-committed][RISC-V] Improve sequences to generate -1, 1 in some cases.

2025-06-04 Thread Jeff Law
On 6/4/25 6:37 PM, Palmer Dabbelt wrote: On Wed, 04 Jun 2025 17:25:20 PDT (-0700), Jeff Law wrote: This patch has a minor improvement to if-converted sequences based on observations I found while evaluating another patch from Shreya to handle more cases with zicond insns. Specifically there is

Re: [to-be-committed][RISC-V] Improve sequences to generate -1, 1 in some cases.

2025-06-04 Thread Palmer Dabbelt
On Wed, 04 Jun 2025 17:25:20 PDT (-0700), Jeff Law wrote: This patch has a minor improvement to if-converted sequences based on observations I found while evaluating another patch from Shreya to handle more cases with zicond insns. Specifically there is a smaller/faster way than zicond to genera

[to-be-committed][RISC-V] Improve sequences to generate -1, 1 in some cases.

2025-06-04 Thread Jeff Law
This patch has a minor improvement to if-converted sequences based on observations I found while evaluating another patch from Shreya to handle more cases with zicond insns. Specifically there is a smaller/faster way than zicond to generate a -1,1 result when the condition is testing the sign

[committed] libstdc++: Skip time zone format testing for COW std::string

2025-06-04 Thread Jonathan Wakely
This is needed when testing with -D_GLIBCXX_USE_CXX11_ABI=0 to fix: FAIL: std/time/format/empty_spec.cc -std=gnu++20 (test for excess errors) libstdc++-v3/ChangeLog: * testsuite/std/time/format/empty_spec.cc: Only test time zones for cxx11 string ABI. --- Pushed to trunk. libs

[committed v2] libstdc++: Make system_clock::to_time_t always_inline [PR99832]

2025-06-04 Thread Jonathan Wakely
For some 32-bit targets Glibc supports changing the size of time_t to be 64 bits by defining _TIME_BITS=64. That causes an ABI change which would affect std::chrono::system_clock::to_time_t. Because to_time_t is not a function template, its mangled name does not depend on the return type, so it has

[committed] libstdc++: Check feature test macro for jthread in

2025-06-03 Thread Jonathan Wakely
Check the appropriate feature test macro instead of checking that __cplusplus >= 201703L. libstdc++-v3/ChangeLog: * include/std/stop_token: Check __glibcxx_jthread instead of __cplusplus. --- Tested x86_64-linux. Pushed to trunk. libstdc++-v3/include/std/stop_token | 7 +++

[committed] libstdc++: Fix errors and incorrect returns in atomic timed waits

2025-06-03 Thread Jonathan Wakely
The __detail::__wait_until function has a comment that should have been removed when r16-1000-g225622398a9631 changed the return type from a std::pair to a struct with three members. The __atomic_wait_address_until_v and __atomic_wait_address_for_v function templates are apparently never used or i

[committed] libgomp: Fix up omp_target_memset-3.c test for C++ [PR120444]

2025-06-02 Thread Jakub Jelinek
*'} [-fpermissive] .../libgomp.c-c++-common/omp_target_memset-3.c:17:20: note: initializing argument 1 of 'void check_val(int8_t*, int, size_t)' .../libgomp.c-c++-common/omp_target_memset-3.c: In function 'int main()': .../libgomp.c-c++-common/omp_target_memset-3.c:46:7: warnin

[committed] cobol: Honor HAVE_CLOCK_GETTIME and HAVE_GETTIMEOFDAY. [PR119975]

2025-06-02 Thread Robert Dubner
These changes cause genapi.cc to use whichever of clock_gettime() or gettimeofday() are available. This prevents compilation errors on systems where clock_gettime() is not available. gcc/cobol/ChangeLog: PR cobol/119975 * genapi.cc (parser_intrinsic_call_0

[committed] libstdc++: Remove spaces before function parameter list

2025-06-02 Thread Jonathan Wakely
We don't use this GCC coding convention in libstdc++. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (basic_string::size): Remove space before parameter list. (basic_string::capacity): Likewise. * include/bits/stl_deque.h (deque::size): Likewise. * i

[committed] cobol: Wrap the call to fprintf in a libgcobol routine. [PR119524]

2025-06-01 Thread Robert Dubner
>From 501f95ffae0371e2335f89951a02a3a32f0cd53d Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Sun, 1 Jun 2025 12:32:37 -0400 Subject: [PATCH] [PR119524] --- gcc/cobol/gengen.cc| 16 +--- libgcobol/libgcobol.cc | 14 ++ 2 files changed, 15 i

[committed] c: Update description of C library facilities provided by GCC for C23

2025-05-30 Thread Joseph Myers
The documentation of which standard C library facilities (headers) are provided by GCC, as being those required of freestanding implementations, is reasonably accurate for C99 and before (if you ignore the provision of for non-GNU targets). It's less accurate for C11, since we provide although t

[committed] OpenMP: Support OpenMP 5.0 "declare mapper" directives for C

2025-05-30 Thread Tobias Burnus
I have now committed the second declare mapper patch, submitted by Julian at https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629367.html again it is based in the associated OG15 commit (kudos to all doing the rediffs): 69fd51954fc OpenMP: Support OpenMP 5.0 "declare mapper"

[patch, Fortran, committed] Fix PR 120355, regression with global functions

2025-05-30 Thread Thomas Koenig
Hello world, I have just committed the attached patch as obvious and simple after regression-testing. Will backport to gcc 15 soonish. This fixes a 15/16 regression where the code was looking at the typespec of the symbol which we don't set if there is a RESULT clause. Thanks to Haral

Minor patch committed.

2025-05-29 Thread Jerry D
This was a followup to make the error message a little better. Committed. commit c69afa2f1bd7455457ab4e028a6bc51211b2dd20 (HEAD -> master, origin/master, origin/HEAD) Author: Jerry DeLisle Date: Thu May 29 10:02:00 2025 -0700 Fortran: Make minor adjustment to error mess

[committed] libstdc++: Fix lwg4084.cc test FAIL on AIX

2025-05-29 Thread Jonathan Wakely
On AIX printf formats a quiet NaN as "NaNQ" and it doesn't matter whether %f or %F is used. Similarly, it always prints "INF" for infinity, even when %f is used. Adjust a test that currently fails due to this AIX-specific (and non-conforming) behaviour. libstdc++-v3/ChangeLog: * testsuite

[committed] libstdc++: Fix another 17_intro/names.cc failure on AIX

2025-05-29 Thread Jonathan Wakely
FAIL: 17_intro/names.cc -std=gnu++98 (test for excess errors) Also fix typo in experimental/names.cc where I did #undef for the wrong name in r16-901-gd1ced2a5ea6b09. libstdc++-v3/ChangeLog: * testsuite/17_intro/names.cc [_AIX] (a): Undefine. * testsuite/experimental/names.cc [_

[committed] libstdc++: Re-enable some XPASS tests for AIX

2025-05-29 Thread Jonathan Wakely
The deque shrink_to_fit.cc test always passes on AIX, I think it should not have been disabled. The 96088.cc tests pass for C++20 and later (I don't know why) so make them require C++20, as they fail otherwise. libstdc++-v3/ChangeLog: * testsuite/23_containers/deque/capacity/shrink_to_fi

[committed] libstdc++: Disable -Wlong-long warnings in boost_concept_check.h

2025-05-29 Thread Jonathan Wakely
The _IntegerConcept, _SignedIntegerConcept and _UnsignedIntegerConcept class template are specialized for long long, which gives warnings with -Wsystem-headers in C++98 mode. libstdc++-v3/ChangeLog: * include/bits/boost_concept_check.h: Disable -Wlong-long warnings. * test

[committed] libstdc++: Document that -std cannot be used in --target_board now

2025-05-29 Thread Jonathan Wakely
Only using GLIBCXX_TESTSUITE_STDS or v3_std_list works now. libstdc++-v3/ChangeLog: * doc/xml/manual/test.xml: Remove outdated documentation on testing with -std options in --target_board. * doc/html/manual/test.html: Regenerate. --- Pushed to trunk. libstdc++-v3/doc/ht

[committed, 13 branch] libstdc++: Fix backported test [PR112490]

2025-05-27 Thread Patrick Palka
On the 13 branch and older, C++ >= 20 tests need an explicit dg-options directive specifying the -std flag, otherwise they won't run by default. PR libstdc++/112490 libstdc++-v3/ChangeLog: * testsuite/24_iterators/const_iterator/112490.cc: Add dg-options directive. --- l

[committed] libstdc++: Fix some names.cc test failures on AIX

2025-05-27 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * testsuite/17_intro/names.cc [_AIX] (n): Undefine. * testsuite/experimental/names.cc [_AIX] (ptr): Undefine. --- Tested x86_64-linux and powerpc-aix. Pushed to trunk. libstdc++-v3/testsuite/17_intro/names.cc | 2 ++ libstdc++-v3/testsuite/experimenta

[COMMITTED PATCH v4 0/3] asf: Fix ICE on emit_move_insn [PR119884]

2025-05-27 Thread Konstantinos Eleftheriou
During the base register initialization, when we are eliminating the load instruction, we were calling `emit_move_insn` on registers of the same size but of different mode in some cases, causing an ICE. We update the base register initialization to use `lowpart_subreg` instead of zero-extending th

Re: [committed] libstdc++: Fix test failures for 32-bit AIX

2025-05-27 Thread Jonathan Wakely
On Tue, 27 May 2025 at 13:46, Tomasz Kaminski wrote: > > > > On Tue, May 27, 2025 at 2:38 PM Jonathan Wakely wrote: >> >> With -maix32 (the default) we only have 16-bit wchar_t so these tests >> fail. The debug.cc one is because we use -fwide-exec-charset=UTF-32BE >> which tries to encode each wi

[COMMITTED PATCH v4 2/3] sbitmap: Add bitmap_all_bits_in_range_p function

2025-05-27 Thread Konstantinos Eleftheriou
This patch adds the `bitmap_all_bits_in_range_p` function in sbitmap, which checks if all the bits in a range are set. Helper function `bitmap_bit_in_range_p` has also been added, in order to be used by `bitmap_all_bits_in_range_p` and `bitmap_any_bit_in_range_p`. When the function's `any_inverted

[COMMITTED PATCH v4 3/3] asf: Fix calling of emit_move_insn on registers of different modes [PR119884]

2025-05-27 Thread Konstantinos Eleftheriou
This patch uses `lowpart_subreg` for the base register initialization, instead of zero-extending it. We had tried this solution before, but we were leaving undefined bytes in the upper part of the register. This shouldn't be happening as we are supposed to write the whole register when the load is

[COMMITTED PATCH v4 1/3] sbitmap: Rename bitmap_bit_in_range_p to bitmap_any_bit_in_range_p

2025-05-27 Thread Konstantinos Eleftheriou
This patch renames `bitmap_bit_in_range_p` to `bitmap_any_bit_in_range_p` to better reflect its purpose. gcc/ChangeLog: * sbitmap.cc (bitmap_bit_in_range_p): Renamed the function. (bitmap_any_bit_in_range_p): New function name. (bitmap_bit_in_range_p_checking): Renamed the

[committed] libstdc++: Regenerate include/Makefile.in

2025-05-27 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/Makefile.in: Regenerate. --- Pushed to trunk. libstdc++-v3/include/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index a6e602327b6e..0ef8564f2385 10064

Re: [committed] libstdc++: Fix test failures for 32-bit AIX

2025-05-27 Thread Tomasz Kaminski
On Tue, May 27, 2025 at 2:38 PM Jonathan Wakely wrote: > With -maix32 (the default) we only have 16-bit wchar_t so these tests > fail. The debug.cc one is because we use -fwide-exec-charset=UTF-32BE > which tries to encode each wide character as four bytes in a 2-byte > wchar_t. The format.cc one

[committed] libstdc++: Fix test failures for 32-bit AIX

2025-05-27 Thread Jonathan Wakely
With -maix32 (the default) we only have 16-bit wchar_t so these tests fail. The debug.cc one is because we use -fwide-exec-charset=UTF-32BE which tries to encode each wide character as four bytes in a 2-byte wchar_t. The format.cc one is because the clown face character can't be encoded in a single

[committed] doc: Fix typo in description of nonstring attribute

2025-05-27 Thread Jonathan Wakely
gcc/ChangeLog: * doc/extend.texi (Common Variable Attributes): Fix typo in description of nonstring. --- Pushed as obvious. gcc/doc/extend.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 442fce653a40..989df

[committed] c-c++-common/gomp/{attrs-,}metadirective-3.c: Fix expected result [PR118694]

2025-05-26 Thread Tobias Burnus
Committed as r16-883-g5d6ed6d604ff94. Silence errors when the error supports nvptx offloading. Seehttps://gcc.gnu.org/PR118694 (esp. comment 9) why we cannot easily nesting silence the error. (Short answer: 'target' call is different if teams is present but that's only known when

[committed] libstdc++: Run in_place constructor test for std::indirect [PR119152]

2025-05-26 Thread Tomasz Kamiński
In indirect/ctor.cc test_inplace_ctor function was defined, but never called. PR libstdc++/119152 libstdc++-v3/ChangeLog: * testsuite/std/memory/indirect/ctor.cc: Run test_inplace_ctor. --- Tested on x86_64-linux. Pushed to trunk. libstdc++-v3/testsuite/std/memory/indirect/ctor

[to-be-committed][RISC-V] Add andi+bclr synthesis

2025-05-24 Thread Jeff Law
So this patch from Shreya adds the ability to use andi + a series of bclr insns to synthesize a logical AND, much like we're doing for IOR/XOR using ori+bset or their xor equivalents. This would regress from a code quality standpoint if we didn't make some adjustments to a handful of define_in

[to-be-committed][RISC-V] shift+and+shift for logical and synthesis

2025-05-24 Thread Jeff Law
The next chunk of Shreya's work. For this expansion we want to detect cases when the mask fits in a simm12 after shifting right by the number of trailing zeros in the mask. In that case we can synthesize the AND with a shift right, andi and shift left. I saw this case come up when doing some

[committed] libstdc++: Add always_inline to std::is_constant_evaluated()

2025-05-23 Thread Jonathan Wakely
We already have the attribute on std::__is_constant_evaluated() but for some reason not on std::is_constant_evaluated(). libstdc++-v3/ChangeLog: * include/std/type_traits (is_constant_evaluated): Add always_inline attribute. --- Tested x86_64-linux. Pushed to trunk. libstdc++-

[committed] libstdc++: Fix 17_intro/names.cc failure on Solaris 11.3

2025-05-23 Thread Jonathan Wakely
There are some names in Solaris libc headers which cause: FAIL: 17_intro/names.cc -std=gnu++98 (test for excess errors) FAIL: 17_intro/names.cc -std=gnu++11 (test for excess errors) libstdc++-v3/ChangeLog: * testsuite/17_intro/names.cc [__sun__] (a, i, n): Undefine. --- Tested x86_64-

[COMMITTED] MAINTAINERS: Add myself to write after approval

2025-05-23 Thread Kishan Parmar
2025-05-22 Kishan Parmar * MAINTAINERS: Add myself to write after approval. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8993d176c22..ac7e4de112e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -717,6 +717,7 @@ Maxim Ostapenko

Re: [committed] c: Document C23 implementation-defined behavior

2025-05-23 Thread Rainer Orth
Hi Joseph, > Add references to C23 subclauses to the documentation of > implementation-defined behavior, and new entries for > implementation-defined behavior new in C23; change some references in > the text to e.g. "C99 and C11" to encompass C23 as well. > > Tested with "make info html pdf". > >

[committed] libgomp.c-c++-common/metadirective-1.c: Expect 'error:' for nvptx compile [PR118694]

2025-05-23 Thread Tobias Burnus
Committed as r16-838-gb3d07ec7ac2ccd. When adding the testcase originally in r15-6963-gfdeceba59bee60 seemingly the compile-time FAIL when nvptx offload compilation is enabled was missed. That's now fixed by using an effective target, avoiding the FAIL. That there is an issue with such cod

[committed] c: Document C23 implementation-defined behavior

2025-05-22 Thread Joseph Myers
Add references to C23 subclauses to the documentation of implementation-defined behavior, and new entries for implementation-defined behavior new in C23; change some references in the text to e.g. "C99 and C11" to encompass C23 as well. Tested with "make info html pdf". * doc/implement-c.

[committed] libstdc++: Fix PSTL test iterators

2025-05-22 Thread Jonathan Wakely
These were fixed upstream by: https://github.com/uxlfoundation/oneDPL/pull/534 https://github.com/uxlfoundation/oneDPL/pull/546 libstdc++-v3/ChangeLog: * testsuite/util/pstl/test_utils.h (ForwardIterator::operator++): Fix return type. (BidirectionalIterator::operator++): L

Re: [committed v2 01/14] arm: clarify the logic of SECONDARY_(INPUT/OUTPUT)_RELOAD_CLASS

2025-05-22 Thread Ramana Radhakrishnan
On Mon, May 12, 2025 at 11:50 AM Richard Earnshaw wrote: > > The flattened logic of these functions and the complexity of the > numerous clauses makes it very difficult to understand what's written > in these macros. Additionally, SECONDARY_INPUT_RELOAD_CLASS was not > laid out with the correct f

[to-be-committed][RISC-V] Clear both upper and lower bits using 3 shifts

2025-05-21 Thread Jeff Law
So the next step in Shreya's work. In the prior patch we used two shifts to clear bits at the high or low end of an object. In this patch we use 3 shifts to clear bits on both ends. Nothing really special here. With mvconst_internal still in the tree it's of marginal value, though Shreya an

[to-be-committed][RISC-V] Clear high or low bits using shift pairs

2025-05-21 Thread Jeff Law
So the first special case of clearing bits from Shreya's work. We can clear an arbitrary number of high bits by shifting left by the number of bits to clear, then logically shifting right to put everything in place. Similarly we can clear an arbitrary number of low bits with a right logica

[to-be-committed][RISC-V] Improve (x << C1) + C2 split code

2025-05-21 Thread Jeff Law
I wrote this a couple months ago to fix an instruction count regression in 505.mcf on risc-v, but I don't have a trivial little testcase to add to the suite. There were two problems with the pattern. First, the code was generating a shift followed by an add after reload. Naturally combine doe

[to-be-committed][RISC-V][PR target/120368] Fix 32bit shift on rv64

2025-05-21 Thread Jeff Law
So a followup to last week's bugfix. In last week's change we we stopped using define_insn_and_split to rewrite instructions. That change was done to avoid dropping a masking instruction out of the RTL. As a result the pattern(s) were changed into simple define_insns, which is good. One of

[to-be-committed][RISC-V] Infrastructure of synthesizing logical AND with constant

2025-05-20 Thread Jeff Law
So this is the next step on the path to mvconst_internal removal and is work from Shreya and myself. This puts in the infrastructure to allow us to synthesize logical AND much like we're doing with logical IOR/XOR. Unlike IOR/XOR, AND has many more special cases that can be profitable. For e

[committed] cobol: Multiple PRs; formatting; exception processing.

2025-05-20 Thread Robert Dubner
0001-cobol-Multiple-PRs-formatting-exception-processing.patch Description: Binary data

[committed] cobol: sqrt(0) is not an ec-argument error. [PR119885]

2025-05-20 Thread Robert Dubner
>From 3c9066c01ccd7270408423b1773699af05dd361e Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Tue, 20 May 2025 11:49:43 -0400 Subject: [PATCH] cobol: sqrt(0) is not an ec-argument error. [PR119885] libgcobol PR cobol/119885 * intrinsic.cc: (__gg__sqrt)

[committed] hpux: Fix detection of atomic support when profiling

2025-05-20 Thread John David Anglin
Tested on hppa64-hp-hpux11.11. Committed to trunk. Dave --- hpux: Fix detection of atomic support when profiling The pa target lacks atomic sync compare and swap instructions. These are implemented as libcalls and in libatomic. As on linux, we lie about their availability. This fixes the

[committed] libstdc++: Fix incorrect links to archived SGI STL docs

2025-05-20 Thread Jonathan Wakely
In r8--g25949ee33201f2 I updated some URLs to point to copies of the SGI STL docs in the Wayback Machine, because the original pags were no longer hosted on sgi.com. However, I incorrectly assumed that if one archived page was at https://web.archive.org/web/20171225062613/... then all the other

[committed] libstdc++: Cleanup and stabilize format _Spec<_CharT> and _Pres_type.

2025-05-20 Thread Tomasz Kamiński
These patch makes following changes to _Pres_type values: * _Pres_esc is replaced with separate _M_debug flag. * _Pres_s, _Pres_p do not overlap with _Pres_none. * hexadecimal presentation use same values for pointer, integer and floating point types. The members of _Spec<_CharT> are rearran

[committed][RISC-V][PR target/120333] Remove bogus bext pattern

2025-05-19 Thread Jeff Law
execution test. Given it's a partial reversion and has passed in my tester, I'm going to go ahead and push it to the trunk rather than waiting for upstream CI. Jeff commit 38fa6c0455ec14f2f42310a817b90765ad894aa4 Author: Jeff Law Date: Mon May 19 16:55:15 2025 -0600 [committed]

Re: [to-be-committed][RISC-V] Avoid setting output object more than once in IOR/XOR synthesis

2025-05-19 Thread Jeff Law
On 5/18/25 8:53 AM, Mark Wielaard wrote: Should output here be initialized to NULL_RTX? Yea, plus an assert to verify it's sensible after the two blobs of code that emit the [x]ori + bclr/binv sequences. I've pushed a fix to the trunk. jeff

[committed][RISC-V] Fix false positive from Wuninitialized

2025-05-19 Thread Jeff Law
As Mark and I independently tripped, there's a Wuninitialized issue in the RISC-V backend. While *I* know the value would always be properly initialized, it'd be somewhat painful to either eliminate the infeasible paths or do deep enough analysis to suppress the false positive. So this initia

[GCC15][committed] OpenMP - backporting testcases + 2 mapping fixes

2025-05-19 Thread Tobias Burnus
The next two commits fix two mapping issues, the rest are test cases that should have been in GCC 15 pre-branch. Namely: r15-9707-g57f73c3956572f   OpenMP/Fortran: Fix allocatable-component mapping of derived-type array comps r15-9706-gab9ca3a8b1af41   OpenMP: Fix mapping of zero-sized arrays w

  1   2   3   4   5   6   7   8   9   10   >