[committed] c: Fix handling of register atomic compound literals

2025-09-24 Thread Joseph Myers
The logic for loads and stores of _Atomic objects in the C front end involves taking the address of such objects, with really_atomic_lvalue detecting cases where this cannot be done (and also no special handling is needed for atomicity), in particular register _Atomic objects. This logic failed to

[committed v2] libstdc++: Reflect operator<< constraints in formatter for local_time.

2025-09-24 Thread Tomasz Kamiński
The r16-3996-gdc78d691c5e5f7 commit (resolution of LWG4257) constrained the operator<< for local_time, but didn't update the corresponding formatter. This meant it didn't conditionally support formatting with an empty format spec ("{}"), which is defined in terms of operator<<. This patch address

[COMMITTED 02/10] ada: Spurious predicate check at default initialization

2025-09-23 Thread Marc Poulhiès
)). gcc/ada/ChangeLog: * sem_util.adb (Is_Partially_Initialized_Type): Return False for record types with no components. 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

[committed] libstdc++: Refactor std::philox_engine member functions

2025-09-23 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/random.h: Include instead of . Change preprocessor checks to use internal feature test macro. (philox_engine): Reword doxygen comments. Use typename instead of class in template parameter lists. Reformat and adjust

[committed v2] libstdc++: Make function_ref(nontype, r) CTAD SFINAE friendly [PR121940]

2025-09-23 Thread Tomasz Kamiński
Instantiating the __deduce_funcref function body for function pointers without arguments or member pointers with non-matching object types previously led to hard errors due to the formation of invalid types. The __deduce_funcref function is now adjusted to return void in such cases. The correspond

[COMMITTED 07/10] ada: Fix missing warning when child packages hide homonym units

2025-09-23 Thread Marc Poulhiès
linux-gnu, committed on master. --- gcc/ada/sem_ch10.adb | 72 +++- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index ffd3eaa6bec1..cff0d71c17ce 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem

[COMMITTED 09/10] ada: Improve robustness of stack usage tracking in concurrent contexts

2025-09-23 Thread Marc Poulhiès
dress that is known. * libgnat/s-stausa.ads: Clarify comments. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnarl/s-stusta.adb | 162 ++ gcc/ada/libgnat/s-stausa.adb | 118 + gcc/ada/libgnat/s-stausa.

[COMMITTED 08/10] ada: Refactor of Ultimate_Prefix

2025-09-23 Thread Marc Poulhiès
From: Denis Mazzucato gcc/ada/ChangeLog: * sem_util.adb (Ultimate_Prefix): Clean-up the loop condition by using Has_prefix instead of an explicit list of node kinds. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 6 +- 1 file changed, 1

[COMMITTED 10/10] ada: Fix unnesting problem related to constructors

2025-09-23 Thread Marc Poulhiès
e, so that temps created herein get the right Scope. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 5056b1f990fa..2a32f3a90592 100644 --- a/gc

[COMMITTED 06/10] ada: Fix Is_Case_Choice_Pattern for allocators

2025-09-23 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * sem_case.adb (Is_Case_Choice_Pattern): Return False for allocators. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_case.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb

[committed] toplevel: Fix syntax issue in .editorconfig

2025-09-23 Thread Richard Earnshaw
.editorconfig entries need to be a single filesystem glob pattern. ChangeLog: * .editorconfig: Fix glob patterns. --- .editorconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9661e7e10d7..af1a28411da 100644 --- a/.editorcon

Re: [committed] contrib: Add DerivedGeneralCategory.txt to comment in libstdc++ script

2025-09-23 Thread Jonathan Wakely
On Tue, 23 Sept 2025 at 05:54, Daniel Krügler wrote: > > Am Mo., 22. Sept. 2025 um 19:23 Uhr schrieb Jonathan Wakely > : >> >> contrib/ChangeLog: >> >> * unicode/gen_libstdcxx_unicode_data.py: Update comment at the >> top of the file to mention DerivedGeneralCategory.txt >>

[committed] contrib: Add DerivedGeneralCategory.txt to comment in libstdc++ script

2025-09-22 Thread Jonathan Wakely
contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Update comment at the top of the file to mention DerivedGeneralCategory.txt prerequisite. --- Pushed to trunk. contrib/unicode/gen_libstdcxx_unicode_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-

[committed v2] libstdc++: Move start_lifetime_as functions to bits/stl_construct.h [PR106658]

2025-09-22 Thread Tomasz Kamiński
This allows inplace_vector to use these functions without including the entire header. Preprocessor checks are changed to use __glibcxx macros, so new functions are available outside memory header, that exports __cpp_lib macros. PR libstdc++/106658 libstdc++-v3/ChangeLog: * inc

[PATCH, committed] Fortran: fix frontend memory leaks for ALLOCATE with SOURCE [PR109010]

2025-09-21 Thread Harald Anlauf
Dear All, the attached obvious patch fixes frontend memleaks for trivial code such as program p real, pointer :: x(:) allocate (x, source = reshape ([1.], [1])) end which showed 4(!) references to __gmp_default_allocate when running f951 under valgrind. For ALLOCATE, component expr

[COMMITTED] Regenerate gcc/m2/lang.opt.urls

2025-09-21 Thread Mark Wielaard
Autogenerate for -fmem-report and -ftime-report. Fixes: 273b53effbf5 ("PR modula2/121856: New wideset implementation") gcc/m2/ChangeLog: * lang.opt.urls: Regenerate. --- gcc/m2/lang.opt.urls | 6 ++ 1 file changed, 6 insertions(+) diff --git a/gcc/m2/lang.opt.urls b/gcc/m2/lang.opt

[COMMITTED 11/35] ada: Reject pragma Attach_Handler on procedures in protected bodies

2025-09-20 Thread Marc Poulhiès
: * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Refine test for protected procedures; fix typo in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada

[COMMITTED 27/31] ada: Fix crash on reference to aliased object of packed array type with -g

2025-09-20 Thread Marc Poulhiès
, committed on master. --- gcc/ada/gcc-interface/misc.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ada/gcc-interface/misc.cc b/gcc/ada/gcc-interface/misc.cc index 7711f8b0f82a..a79b87e3bdb2 100644 --- a/gcc/ada/gcc-interface/misc.cc +++ b/gcc/ada/gcc-interface/misc.cc @@ -837,6 +837,8

[to-be-committed][RISC-V][PR target/121983] Fix unprotected REGNO invocation

2025-09-20 Thread Jeff Law
So this was a naked REGNO usage, which of course blows up if RTL checking is enabled and something else sneaks in (SUBREG). Thankfully it never results in incorrect code, though I could theorize it could cause a bootstrap comparison failure in the "right" circumstances. Bootstrapped & regres

[COMMITTED 17/35] ada: Avoid marking a ghost pragma twice

2025-09-20 Thread Marc Poulhiès
should get marked only once based on their individual semantics. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Pragma): Set Mark_Ghost_Code individually based on the semantics of each pragma. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 12

[committed] amdgcn: fix builtin codegen at -O0

2025-09-20 Thread Andrew Stubbs
Fix an unrecognised insn ICE that only shows while using builtins at -O0. gcc/ChangeLog: * config/gcn/gcn.cc (gcn_expand_builtin_1): Enable the "mode" parameter and ensure that "target" is a register for most of the builtins. --- gcc/config/gcn/gcn.cc | 26 +++

[COMMITTED 28/31] ada: Get rid of TYPE_ALIGN_OK flag in gcc-interface

2025-09-20 Thread Marc Poulhiès
ewise. * gcc-interface/utils2.cc (build_binary_op): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/ada-tree.h | 3 --- gcc/ada/gcc-interface/decl.cc| 8 gcc/ada/gcc-interface/gigi.h | 26 ++ gcc/ada/gcc-inte

[committed v2] libstdc++: Tests of %W/%V/%U and %G for !ok date values.

2025-09-20 Thread Tomasz Kamiński
libstdc++-v3/ChangeLog: * testsuite/std/time/year_month_day/io.cc: Additional tests. Reviewed-by: Jonathan Wakely Signed-off-by: Tomasz Kamiński --- v2 updated Quindecember value in tests. Pushed to trunk. .../testsuite/std/time/year_month_day/io.cc | 48 +++ 1 file

[COMMITTED 33/35] ada: Remove incorrect comment

2025-09-20 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * sem_ch3.adb (Analyze_Incomplete_Type_Decl): Remove incorrect comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gcc/ada

[committed] libstdc++: Rename template parameter of std::constant_wrapper

2025-09-20 Thread Jonathan Wakely
This fixes: FAIL: 17_intro/badnames.cc -std=gnu++26 (test for excess errors) libstdc++-v3/ChangeLog: * include/std/type_traits (constant_wrapper): Rename template parameter to avoid BADNAME. --- We avoid single letter template parameter names, as per: https://gcc.gnu.org/onlined

[COMMITTED 13/27] ada: Fix crash on iterator of type with Constant_Indexing aspect

2025-09-20 Thread Marc Poulhiès
(Finalize_Address): In an untagged derivation, call Root_Type on the full view of the base type if the partial view is itself not a derived type. (Is_Untagged_Derivation): Minor formatting tweak. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_util.adb | 9 +++-- 1

[COMMITTED 16/31] ada: Fix visibility bug related to target name

2025-09-20 Thread Marc Poulhiès
* exp_ch5.adb (Expand_Assign_With_Target_Names.Replace_Target): Remove code setting Entity to Empty. * sinfo.ads (Has_Target_Names): Improve comment: add "@" to clarify what "target name" means, and remove the content-free phrase "and must be expanded accordingly.&

[committed] c: Implement C2y N3481 constraint against lvalue conversion with incomplete type

2025-09-19 Thread Joseph Myers
C2y replaces undefined behavior for lvalue conversion of an lvalue with incomplete, non-array type with a constraint violation. Implement this in GCC, which means disallowing lvalue conversion of qualified or atomic void for C2y. (Unqualified, non-atomic void is excluded from the definition of "lv

[committed] libstdc++: Add NTTP bind_front, -back, not_fn (P2714) [PR119744]

2025-09-19 Thread Nathan Myers
Add non-type template parameter function-object/-pointer argument versions of bind_front, bind_back, and not_fn. This introduces a new internal type _Bind_fn_t to carry the template-argument function object when no arguments are bound, used in both bind_front and bind_back. Otherwise they return a

[COMMITTED 20/35] ada: Remove useless statements

2025-09-19 Thread Marc Poulhiès
From: Ronan Desplanques The initial value of fields of type Elist_Id is No_Elist, therefore the statements this patch removes were useless. gcc/ada/ChangeLog: * sem_ch7.adb (New_Private_Type): Remove useless statements. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada

[committed] libstdc++: Reorder start_lifetime_as macro in version.def

2025-09-19 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/version.def (start_lifetime_as): Move adjacent to other C++23 macros. * include/bits/version.h: Regenerate. --- Lightly tested on x86_64-linux. Pushed to trunk. libstdc++-v3/include/bits/version.def | 16 libstdc++-

[COMMITTED 18/31] ada: Apply ghost regions for assigmnents correctly

2025-09-18 Thread Marc Poulhiès
irregardless of whether the expander is active. Relocate the Assignment validity checks from Is_OK_Statement to this subprogram. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 134 -- 1 file changed, 57 insertions

[committed] c: Add more C2Y tests

2025-09-18 Thread Joseph Myers
Add further tests for things defined in C2Y that correspond to how GCC already behaves. Some of these are for previous undefined behavior where what is violated has become a constraint but previously was a "shall" outside Constraints. Others (c2y-anon-init-1.c and c2y-incomplete-2.c) reflect sema

[COMMITTED 22/31] ada: Update coding style

2025-09-18 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * ghost.adb (Check_Ghost_Policy): Update coding style. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb

[committed] openmp: Fix up ICE in lower_omp_regimplify_operands_p [PR121977]

2025-09-18 Thread Jakub Jelinek
ed on x86_64-linux, committed to trunk (for now). 2025-09-18 Jakub Jelinek PR c++/121977 * omp-low.cc (lower_omp_regimplify_operands_p): If maybe_lookup_decl returns NULL, use maybe_lookup_decl_in_outer_ctx as fallback. * g++.dg/gomp/pr121977.C: New test. --- gc

[committed] OpenMP: Unshare expr in context-selector condition [PR121922]

2025-09-18 Thread Tobias Burnus
the PR. Committed to mainline as r16-3946-g97c1d2fa97afc5 I think this is a candidate for GCC 15 backporting due to the badness vs. change size/risk [As dynamic selectors are only supported since GCC 15 [this function is new since r15-6895-g1294b819e1207c]), it is strictly GCC 15.] Thanks for the

[COMMITTED 20/31] ada: Check ghost level dependencies inside assignments

2025-09-17 Thread Marc Poulhiès
. (Check_Assignement_Levels): New function for checking the level dependencies. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 39 +++ 1 file changed, 39 insertions(+) diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index

[COMMITTED 35/35] ada: Warning for composite equality that calls an abstract equality function

2025-09-17 Thread Marc Poulhiès
of a component type will be called and result in Program_Error. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch4.adb | 39 +++ 1 file changed, 39 insertions(+) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index afdc24

[COMMITTED 07/31] ada: Refine condition for reporting warnings on components with abstract equality

2025-09-17 Thread Marc Poulhiès
g. Improve comment on declaration. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch4.adb | 60 ++--- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 2ac5e797e512..23a59de6f

[COMMITTED 17/31] ada: Compiler crash on container aggregate association with nonstatic key choice

2025-09-17 Thread Marc Poulhiès
nonstatic. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 34d4f84f95e6..6b4f4a19d1f9 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb

[COMMITTED 11/31] ada: Allow implicit packing of arrays when larger than needed

2025-09-17 Thread Marc Poulhiès
on for Implicit_Packing mode. Keep it as "=" for giving error messages. * opt.ads (Implicit_Packing): Minor: correct obsolete comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/freeze.adb | 43 +-- gcc/

[COMMITTED 17/27] ada: Update ghost code SPARK RM rules

2025-09-17 Thread Marc Poulhiès
. * sem_prag.adb: Likwise. * sem_res.adb: Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/contracts.adb | 4 ++-- gcc/ada/freeze.adb| 2 +- gcc/ada/ghost.adb | 44 +-- gcc/ada/ghost.ads | 10 +- gcc

[COMMITTED 08/27] ada: Improve ghost region creation for pragmas

2025-09-17 Thread Marc Poulhiès
take the active ghost mode from the ghost region for implicit ghost entities. * sem_prag.adb (Analyze_Pragma): Mark entities that have an explicit ghost pragma as non-implicit ghost. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/atree.adb

[COMMITTED 24/31] ada: Create a ghost region for pragma annotate

2025-09-17 Thread Marc Poulhiès
-gnu, committed on master. --- gcc/ada/sem_prag.adb | 9 + 1 file changed, 9 insertions(+) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 753ccda66756..661d4401d7a2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -14149,6 +14149,9 @@ package body Sem_Prag

[COMMITTED 19/35] ada: Replace Preelaborable_Initialization pragmas with equivalent aspect specs

2025-09-17 Thread Marc Poulhiès
p.ads: Likewise. * libgnat/system-vxworks7-x86-kernel.ads: Likewise. * libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-x86_64-kernel.ads: Likewise. * libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise. Tested on x86_64-pc-linux-gnu, comm

[PATCH, COMMITTED] s390: testsuite: Fix bitops-{1, 2}.c and andc-splitter-2.c

2025-09-17 Thread Stefan Schulze Frielinghaus
After r16-2649-g0340177d54d tests fail for gcc.target/s390/arch13/bitops-{1,2}.c since sign extends in conjunction with (subreg (not a)) are folded, now. That is, of course, wanted. Since the original tests were about 32-bit operations, circumvent the sign extend by not returning a value but rathe

[COMMITTED 2/2] ada: Fix error message for Stream_Size

2025-09-16 Thread Marc Poulhiès
. (Has_Stream_Standard_Rep): Add formal parameter and rename to... (Is_Stream_Standard_Rep): New function. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Fix error emission. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_strm.adb | 447

[COMMITTED 1/2] ada: Revert "Remove dependence on secondary stack for type with controlled component"

2025-09-16 Thread Marc Poulhiès
From: Gary Dismukes This reverts commit 91b51fc42b167eedaaded6360c490a4306bc5c55. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 49 ++--- gcc/ada/exp_ch6.ads | 6 -- gcc/ada/exp_ch7.adb | 20 +- 3

[COMMITTED 09/27] ada: Implement Super aspect and improve implementation of related features.

2025-09-15 Thread Marc Poulhiès
86_64-pc-linux-gnu, committed on master. --- gcc/ada/aspects.ads | 9 +- gcc/ada/exp_attr.adb | 328 +-- gcc/ada/exp_ch3.adb | 79 ++- gcc/ada/exp_ch3.ads | 27 gcc/ada/exp_ch6.adb | 309 gc

[COMMITTED 26/27] ada: Remove dependence on secondary stack for type with controlled component

2025-09-15 Thread Marc Poulhiès
* exp_ch7.adb (Expand_Cleanup_Actions): Move test of Uses_Sec_Stack to be the first conjunct in setting of Needs_Sec_Stack_Mark, and put the other tests in a disjunction subsidiary to that. Improve preceding comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/

[COMMITTED 07/27] ada: Remove the note that GNAT LLVM doesn't ship the light runtime

2025-09-15 Thread Marc Poulhiès
From: Sebastian Poeplau gcc/ada/ChangeLog: * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Remove the note on light runtimes. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_ugn/building_executable_programs_with_gnat.rst| 3 +-- 1 file

[COMMITTED 24/27] ada: Document hardening features not supported by LLVM

2025-09-15 Thread Marc Poulhiès
From: Jose Ruiz gcc/ada/ChangeLog: * doc/gnat_rm/security_hardening_features.rst: clarify that hardening options are not supported by the LLVM back end. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on

[COMMITTED 21/27] ada: C_Pass_By_Copy convention incorrectly ignored

2025-09-15 Thread Marc Poulhiès
Freeze_Before, override the default value for Do_Freeze_Profile. This is needed in some cases to prevent premature freezing in the case of an object of an anonymous access-to-subprogram type. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/freeze.adb | 26

[COMMITTED 10/27] ada: Avoid ghost context check in early freeze

2025-09-15 Thread Marc Poulhiès
the new function body created for the expression function. gcc/ada/ChangeLog: * sem_ch6.adb (Analyze_Expression_Function): Disable ghost checks during the early freeze. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch6.adb | 9 + 1 file changed, 9

[COMMITTED 02/27] ada: Disable ghost context checks before context is set

2025-09-15 Thread Marc Poulhiès
(Ghost_Context_Checks_Disabled): New flag to control whether ghost context checks are activated or not. * sem_prag.adb (Analyze_Pragma): Disable ghost context checks for pragmas that determine their ghostliness based on one of its arguments. Tested on x86_64-pc-linux-gnu, committed on master

[COMMITTED 05/27] ada: Don't generate call of `System.Standard_Library.Adafinal`

2025-09-15 Thread Marc Poulhiès
From: Vadim Godunko `adafinal` is not available on targets without standard library. gcc/ada/ChangeLog: * bindgen.adb (Gen_Adafinal): Don't generate call of adafinal when use of standard library suppressed. Tested on x86_64-pc-linux-gnu, committed on master. --- gc

[COMMITTED 15/27] ada: Fix the condition of ghost level dependencies inside assignments

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus The assignee should depend on the level of all of the ghost entiies with the assignment. gcc/ada/ChangeLog: * ghost.adb (Check_Assignee_Levels): Fix the condition and improve error message handling. Tested on x86_64-pc-linux-gnu, committed on master

[COMMITTED 16/27] ada: Refactor ghost argument consistency checks

2025-09-15 Thread Marc Poulhiès
for pragma Inline. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 329 ++- gcc/ada/sem_prag.ads | 1 + 2 files changed, 172 insertions(+), 158 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index

[COMMITTED 20/27] ada: Add Assertion_Policy checks for assertion levels

2025-09-15 Thread Marc Poulhiès
): Add ghost level check to Assertion_Policy. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 16 1 file changed, 16 insertions(+) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 9175490eca27..172dc3d6f3ec 100644 --- a/gcc/ada

[COMMITTED 04/27] ada: Fix code generation when there is no No_Finalization restiction

2025-09-15 Thread Marc Poulhiès
x-gnu, committed on master. --- gcc/ada/bindgen.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index cb39af67f9a5..14367ebe97a7 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -490,7 +490,9 @@ package body Bindgen is

[COMMITTED 22/27] ada: Match assertion levels by name

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus Since Assertion_Levels cannot be named after valid assertion names we no longer need the policies to be matched by entity. gcc/ada/ChangeLog: * sem_prag.adb (Get_Applicable_Policy): Match assertion levels by name. Tested on x86_64-pc-linux-gnu, committed on

[COMMITTED 12/27] ada: Fix missing finalization for qualified expression in conditional expression

2025-09-15 Thread Marc Poulhiès
-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 4 ++-- gcc/ada/exp_ch4.adb | 6 -- gcc/ada/exp_ch6.adb | 5 - gcc/ada/exp_util.adb | 33 - gcc/ada/exp_util.ads | 4 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/gcc/ada

[COMMITTED 27/27] ada: Fix internal error on aspect in complex object declaration

2025-09-15 Thread Marc Poulhiès
deferred. (process_freeze_entity): Deal with renamed objects whose elaboration is deferred. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/trans.cc | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/gcc

[COMMITTED 25/27] ada: Fix wrong finalization of aliased array of bounded vector

2025-09-15 Thread Marc Poulhiès
(Apply_Discriminant_Check): Remove undocumented test on Is_Aliased_View applied to the left-hand side to skip the check in the case where the subtypes are the same, and replace it with a test that the subtypes are constrained. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc

[COMMITTED 19/27] ada: Fix ghost condition for level dependencies for assignments

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * ghost.adb (Check_Assignment_Policies): The level of the assignee should depend on the level of the region. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 8 +--- 1 file changed, 5 insertions(+), 3

[COMMITTED 23/27] ada: Avoid ghost context errors when preanalyzing Loop_Invariant

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Pragma): Disable context checks for the preanalysis of the expression for Loop_Invariant pragmas as the ghost region for the pragma has not been set up yet. Tested on x86_64-pc-linux-gnu, committed on master

[COMMITTED 06/27] ada: Recommend GPR's Toolchain_Name for GNAT LLVM more prominently

2025-09-15 Thread Marc Poulhiès
From: Sebastian Poeplau gcc/ada/ChangeLog: * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Move recommendation of Toolchain_Name up. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master

[COMMITTED 18/27] ada: Remove checks for the old rule 20

2025-09-15 Thread Marc Poulhiès
From: Viljar Indus This rule was removed. This can scenario can be detected by Rule 18. gcc/ada/ChangeLog: * ghost.adb (Is_Ok_Pragma): Remove calls to Check_Policies. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 48

[COMMITTED 03/27] ada: Add `Set_[Wide_]Wide_String` subprograms to auxiliary packages.

2025-09-15 Thread Marc Poulhiès
): Likewise. * libgnat/a-szunau.adb (Set_Wide_Wide_String): Likewise. * libgnat/a-szunau__shared.adb (Set_Wide_Wide_String): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-swunau.adb | 13 + gcc/ada/libgnat/a-swunau.ads | 8

[COMMITTED 11/27] ada: Fix section of Finalizable extension in GNAT RM

2025-09-15 Thread Marc Poulhiès
c/ada/ChangeLog: * doc/gnat_rm/gnat_language_extensions.rst: Fix section of Finalizable. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_rm/gnat_language_extensions.rst | 262 ++-- gc

[COMMITTED 01/27] ada: Fix documentation of Is_Ancestor_Package

2025-09-15 Thread Marc Poulhiès
rent". gcc/ada/ChangeLog: * sem_util.ads (Is_Ancestor_Package): Fix documentation comment. * sem_util.adb (Is_Ancestor_Package): Rename local object. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 8 gcc/ada/sem_util.ads | 2 +- 2 files changed, 5 inser

[to-be-committed] RISC-V: Fix vendor intrinsic tests for disabled multilib configurations

2025-09-14 Thread Kito Cheng
Add wrapper headers that prevent vendor vector headers from including system stdint.h, ensuring tests work correctly when multilib is disabled. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/xandesvector/non-policy/non-overloaded/andes_vector.h: New file. * gcc.target/riscv/rv

[to-be-committed] [PR tree-optimization/58727] Don't over-simplify constants

2025-09-14 Thread Jeff Law
Here's Shreya's next patch. In pr58727 we have a case where the tree/gimple optimizers have decided to "simplify" constants involved in logical ops by turning off as many bits as they can in the hope that the simplified constant will be easier/smaller to encode. That "simplified" constant get

[COMMITTED 26/35] ada: Remove unnecessary if statement

2025-09-14 Thread Marc Poulhiès
that this patch removes was useless. gcc/ada/ChangeLog: * sem_ch3.adb (Check_Nonoverridable_Aspects): Remove if statement. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a

[committed] testsuite: Port asm-hard-reg tests for PRU

2025-09-13 Thread Dimitar Dimitrov
Add the necessary register definitions for PRU, so that asm-hard-reg tests can pass for PRU. Pushed to trunk as r16-3839-gd020b73ce00029. gcc/testsuite/ChangeLog: * gcc.dg/asm-hard-reg-error-1.c: Enable test for PRU, and define registers for PRU. * gcc.dg/asm-hard-reg-err

[COMMITTED 23/31] ada: Check instantces of ghost iterator functions

2025-09-13 Thread Marc Poulhiès
ghost context of Iterable functions when handling iterator specifications with an Iterable aspect. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch5.adb | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/gcc

[COMMITTED 21/35] ada: Create a pragma to emit a misplaced Storage_Size aspect error

2025-09-13 Thread Marc Poulhiès
aspect error as we do for pragmas. gcc/ada/ChangeLog: * sem_ch13.adb (Analyze_Aspect_Definitions): Create a temporary pragma for the non-task and access type cases. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 18 -- 1 file

[committed] c: Implement C2y N3517 array subscripting without decay

2025-09-12 Thread Joseph Myers
N3517 (array subscripting without decay) has been added to C2y (via a remote vote in May, not at a meeting). Implement this in GCC. The conceptual change, that the array subscripting operator [] no longer involves an array operand decaying to a pointer, is something GCC has done for a very long t

[committed][RISC-V] Adjust ABI specification in recently added Andes tests

2025-09-12 Thread Jeff Law
Another lp64 vs lp64d issue. This time adjusting a #include in the test isn't sufficient. So instead this sets the ABI to lp64d instead of lp64. I don't think that'll impact the test materially. Tested on the BPI and Pioneer systems where it fixes the failures with the Andes tests. Pushing

[committed] libstdc++: Constrain __gnu_debug::bitset(const CharT*) constructor [PR121046]

2025-09-12 Thread Jonathan Wakely
The r16-3435-gbbc0e70b610f19 change (for LWG 4294) needs to be applied to the debug mode __gnu_debug::bitset as well as the normal one. libstdc++-v3/ChangeLog: PR libstdc++/121046 * include/debug/bitset (bitset(const CharT*, ...)): Add constraints on CharT type. --- Teste

[committed] libstdc++: Fix memory leak in PSTL TBB backend [PR117276]

2025-09-12 Thread Jonathan Wakely
Backport of upstream patch: https://github.com/uxlfoundation/oneDPL/pull/1589 libstdc++-v3/ChangeLog: PR libstdc++/117276 * include/pstl/parallel_backend_tbb.h (__func_task::finalize): Make deallocation unconditional. --- Tested x86_64-linux. Pushed to trunk. Backports ne

[committed] libstdc++: Fix bootstrap failure in atomicity.cc

2025-09-12 Thread Jonathan Wakely
My r16-3810-g6456da6bab8a2c changes broke bootstrap for targets that use the mutex-based atomic helpers. This fixes it by casting away the unnecessary volatile-qualification on the _Atomic_word* before passing it to __exchange_and_add_single. libstdc++-v3/ChangeLog: * config/cpu/generic/a

[COMMITTED 30/31] ada: Minor comment tweaks

2025-09-11 Thread Marc Poulhiès
gcc/ada/ChangeLog: * env.c (__gnat_clearenv): Adjust comment. * libgnarl/a-intnam__bsd.ads: Fix copyright date. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/env.c | 3 ++- gcc/ada/libgnarl/a-intnam__bsd.ads | 2 +- 2 files changed, 3

[COMMITTED 27/35] ada: Fix comment in Find_Type_Name

2025-09-11 Thread Marc Poulhiès
(Find_Type_Name): Fix comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 96429361115..bdd23aa276f 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada

[COMMITTED 16/35] ada: Avoid renamed declaration becoming both ignored and checked

2025-09-11 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * ghost.adb (Mark_Ghost_Declaration_Or_Body): Mark ghost entity explicitly as ignored or checked. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 37 + 1 file changed, 33

[COMMITTED 29/31] ada: Give a warning for huge imported objects

2025-09-11 Thread Marc Poulhiès
: * gcc-interface/decl.cc (gnat_to_gnu_entity) : Give a warning for huge imported objects as well. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/decl.cc | 61 +-- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a

[COMMITTED 13/35] ada: Fix ghost policy detection for declarations

2025-09-11 Thread Marc Poulhiès
declaration has an explicit ghost aspect/pragma. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 53 ++- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index

[COMMITTED 14/31] ada: Fix regression in Root_Type

2025-09-11 Thread Marc Poulhiès
sing Etype. (Root_Type_If_Set): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo-utils.adb | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index d84e562853cc..450d4c36b211 100644 ---

[COMMITTED 13/31] ada: Crash on b3a1004 with assertions enabled

2025-09-11 Thread Marc Poulhiès
. * sem_ch3.adb (Access_Type_Declaration): Ditto. * sem_aux.adb (Is_Derived_Type): Protect call to Root_Type since it cannot be used when the Etype is not set. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/freeze.adb | 9 - gcc/ada/sem_aux.adb | 1

[COMMITTED 08/31] ada: Disable signals when calling pthread_create on QNX

2025-09-11 Thread Marc Poulhiès
and enable signals on QNX. * libgnarl/s-taprop__qnx.adb (Create_Task): Disable signals when calling pthread_create. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/adaint.c | 63 ++ gcc/ada/libgnarl/s-taprop__qnx.adb | 24

[committed] libstdc++: Remove trailing whitespace in

2025-09-11 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/std/syncstream: Remove trailing whitespace. --- Pushed to trunk. diff --git a/libstdc++-v3/include/std/syncstream b/libstdc++-v3/include/std/syncstream index 92fbbdc760e7..1e1759714c69 100644 --- a/libstdc++-v3/include/std/syncstream +++ b/libstdc++-

[COMMITTED 31/31] ada: add BACKLOG_MAX OS constant

2025-09-11 Thread Marc Poulhiès
ed on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/g-socket.adb | 2 +- gcc/ada/libgnat/g-socket.ads | 2 +- gcc/ada/s-oscons-tmplt.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb

[COMMITTED 19/31] ada: Tune description of Ghost_Assertion_Level

2025-09-11 Thread Marc Poulhiès
From: Piotr Trojanek Fix grammar in comment. gcc/ada/ChangeLog: * einfo.ads (Ghost_Assertion_Level): Fix comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo.ads | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/einfo.ads b/gcc

[COMMITTED 25/31] ada: Perform predicate check before, not after, parameter copy back.

2025-09-11 Thread Marc Poulhiès
, instead of after, the corresponding parameter copy-back. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 18551d4899e3..1a9002ce3a8b 100644

[COMMITTED 21/31] ada: Ignore ghost policy errors inside aspect Iterable

2025-09-11 Thread Marc Poulhiès
. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/ghost.adb | 29 + 1 file changed, 29 insertions(+) diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index 0fbcf20da7c1..0918d27daeb7 100644 --- a/gcc/ada/ghost.adb +++ b/gcc/ada/ghost.adb @@ -807,8 +807,28

[COMMITTED 26/31] ada: Implement overflow checking for unsigned types

2025-09-11 Thread Marc Poulhiès
integer negation if required. (build_unary_op_trapv): Add support for unsigned types. (build_binary_op_trapv): Likewise. : Perform the check if the LHS is zero in the signed case as well. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc

[COMMITTED 15/31] ada: Fix regression in Root_Type -- adjustment

2025-09-11 Thread Marc Poulhiès
touts should survive bugs when possible. gcc/ada/ChangeLog: * einfo-utils.adb (Root_Type): Do not deal with missing Etype. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo-utils.adb | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gcc/ada/einfo

[COMMITTED 12/31] ada: Fix argument type of read() and write() on windows

2025-09-11 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * libgnat/s-crtl.ads: define unsigned * libgnat/s-crtl__mingw.adb (read, write): change arg type Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-crtl.ads| 3 +++ gcc/ada/libgnat/s-crtl__mingw.adb | 8

[COMMITTED 04/31] ada: Better warning when single letter package conflicts with predefined unit naming

2025-09-11 Thread Marc Poulhiès
ndard one using the minus to separate parents with children. gcc/ada/ChangeLog: * par-load.adb (Load): Better warning message. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par-load.adb | 37 +++-- 1 file changed, 35 insertions(+), 2 dele

[COMMITTED 09/31] ada: Make pp and friends more robust (base type only)

2025-09-11 Thread Marc Poulhiès
f_Set): Body of new function. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/atree.ads | 14 gcc/ada/einfo-utils.adb | 167 +++- gcc/ada/einfo-utils.ads | 11 ++- gcc/ada/treepr.adb | 6 +- 4 files changed, 141 insertions(+

  1   2   3   4   5   6   7   8   9   10   >