Re: [PATCH] lto/122515: Fix archive offset types for i686

2025-11-03 Thread Richard Biener
On Tue, Nov 4, 2025 at 3:33 AM Siddhesh Poyarekar wrote: > > On 2025-11-03 21:26, Siddhesh Poyarekar wrote: > > On i686, offsets into object archives could be 64-bit, but they're > > inconsistently treated across the lto, which may sometimes result in > > truncation of those offsets for large arch

Re: [PATCH] optabs: Make widen_lshift an IFN.

2025-11-03 Thread Richard Biener
On Mon, Nov 3, 2025 at 6:02 PM Robin Dapp wrote: > > I didn't commit yet but instead set up an arm qemu environment. > > There is indeed a problem after the patch: The widen lshift standard name > requires an immediate shift-count operand and that's what the arm pattern > implements. > > However,

Re: [PATCH V2] RISC-V: Add Andes 25 series pipeline description.

2025-11-03 Thread Robin Dapp
> On 11/3/25 6:06 PM, KuanLin Chen wrote: >> I'll rename it in the next version. >> I'm curious why use_zero_stride_load should be 'false'. It seems to be >> the trigger of 'define_insn_and_split >> "*pred_strided_broadcast"'. >> I would appreciate it if you could let me know the reason. > To date

[COMMITED] simplify-rtx: Canonicalize SUBREG and LSHIFTRT order for AND operations

2025-11-03 Thread Kishan Parmar
For a given rtx expression (and (lshiftrt (subreg X) shift) mask) combine pass tries to simplify the RTL form to (and (subreg (lshiftrt X shift)) mask) where the SUBREG wraps the result of the shift. This leaves the AND and the shift in different modes, which complicates recognition. (and

Re: [PATCH 1/3] [RFC] extra SSA immediate use iterator checking

2025-11-03 Thread Andrew Pinski
On Mon, Nov 3, 2025 at 7:20 AM Richard Biener wrote: > > The following implements a prototype for additional checking around > SSA immediate use iteration. Specifically this guards immediate > use list modifications inside a FOR_EACH_IMM_USE_STMT iteration > to be restricted to uses involving the

Re: [PATCH 3/3] Fix unsafe operations in FOR_EACH_IMM_USE_STMT

2025-11-03 Thread Andrew Pinski
On Mon, Nov 3, 2025 at 7:21 AM Richard Biener wrote: > > The following fixes forwprop using FOR_EACH_IMM_USE_STMT to iterate > over stmts and then eventually removing the active stmt, releasing > its defs. This can cause debug stmt insertion with a RHS referencing > the SSA name we iterate over,

Re: [PATCH 2/3] Fix unsafe stmt modifications in FOR_EACH_IMM_USE_STMT

2025-11-03 Thread Andrew Pinski
On Mon, Nov 3, 2025 at 7:21 AM Richard Biener wrote: > > The following fixes path isolation changing the immediate use list of > an SSA name that is currently iterated over via FOR_EACH_IMM_USE_STMT. > This happens when it duplicates a BB within this and creates/modifies > stmts that contain SSA u

Re: [PATCH] c++/modules: Allow ignoring some TU-local exposure errors in GMF [PR121574]

2025-11-03 Thread Nathaniel Shead
On Fri, Oct 31, 2025 at 08:56:30AM +0300, Jason Merrill wrote: > On 10/30/25 3:00 PM, Nathaniel Shead wrote: > > One unfortunate side effect of this is that even with -pedantic-errors, > > unless the user specifies '-Wtemplate-names-tu-local' when building the > > module interface there will be no

[PATCH v4] c++: Don't constrain template visibility using no-linkage variables [PR122253]

2025-11-03 Thread Nathaniel Shead
On Sat, Nov 01, 2025 at 03:41:50PM +0300, Jason Merrill wrote: > On 11/1/25 5:12 AM, Nathaniel Shead wrote: > > On Sat, Nov 01, 2025 at 01:10:43PM +1100, Nathaniel Shead wrote: > > > On Thu, Oct 30, 2025 at 07:15:01PM +0200, Jason Merrill wrote: > > > > On 10/28/25 4:53 AM, Patrick Palka wrote: > >

Re: [PATCH v4] simplify-rtx: Canonicalize SUBREG and LSHIFTRT order for AND operations

2025-11-03 Thread Kishan Parmar
On 03/11/25 10:21 pm, Jeff Law wrote: >> gcc/ChangeLog: >> >> PR rtl-optimization/93738 >> * simplify-rtx.cc (simplify_binary_operation_1): Canonicalize >> SUBREG(LSHIFTRT) into LSHIFTRT(SUBREG) when valid. >> >> gcc/testsuite/ChangeLog: >> >> PR rtl-optimization/93738 >> * gcc.

[pushed: r16-5021] analyzer: add event kinds for special control flow [PR122544]

2025-11-03 Thread David Malcolm
The SARIF 3.38.8 "kinds" property has some verbs for expressing control flow, but is missing some of the awkward special cases. The spec says "If none of these values are appropriate, a SARIF producer MAY use any value." This patch adds the following new values: * "throw" for throwing an excepti

[pushed: r16-5020] cp: fix typo "an decrement" -> "a decrement"

2025-11-03 Thread David Malcolm
Successfully bootstrapped on x86_64-pc-linux-gnu. Pushed to trunk as r16-5020-gdf2c1f7c6ba30d. gcc/cp/ChangeLog: * parser.cc (enum non_integral_constant): Fix typo "an decrement" -> "a decrement" in comment. (cp_parser_non_integral_constant_expression): Likewise in error

Re: [PATCH] lto/122515: Fix archive offset types for i686

2025-11-03 Thread Siddhesh Poyarekar
On 2025-11-03 21:26, Siddhesh Poyarekar wrote: On i686, offsets into object archives could be 64-bit, but they're inconsistently treated across the lto, which may sometimes result in truncation of those offsets for large archives. Use int64_t/off_t consistently across all uses of archive offsets

Re: [PATCH V2] RISC-V: Add Andes 25 series pipeline description.

2025-11-03 Thread Jeff Law
On 11/3/25 6:06 PM, KuanLin Chen wrote: I'll rename it in the next version. I'm curious why use_zero_stride_load should be 'false'. It seems to be the trigger of 'define_insn_and_split "*pred_strided_broadcast"'. I would appreciate it if you could let me know the reason. To date we haven't see

[PATCH] lto/122515: Fix archive offset types for i686

2025-11-03 Thread Siddhesh Poyarekar
On i686, offsets into object archives could be 64-bit, but they're inconsistently treated across the lto, which may sometimes result in truncation of those offsets for large archives. Use int64_t/off_t consistently across all uses of archive offsets to make sure that they're always read and mapped

Re: [PATCH V2] RISC-V: Add Andes 25 series pipeline description.

2025-11-03 Thread KuanLin Chen
I'll rename it in the next version. I'm curious why use_zero_stride_load should be 'false'. It seems to be the trigger of 'define_insn_and_split "*pred_strided_broadcast"'. I would appreciate it if you could let me know the reason. Thank you for your advice. Jeff Law 於 2025年11月4日 週二 上午8:42寫道: > >

Re: [PATCH V2] RISC-V: Add Andes 25 series pipeline description.

2025-11-03 Thread Jeff Law
On 10/29/25 8:04 PM, Kuan-Lin Chen wrote: gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_TUNE): Add andes-25-series. (RISCV_CORE): Add Andes 25-series cpu list. * config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): Add andes_vicuna.

Re: [PATCH v4 1/4] gcc/: Rename warn_parm_array_mismatch() => warn_parms_array_mismatch()

2025-11-03 Thread Alejandro Colomar
Hi Joseph, On Mon, Nov 03, 2025 at 08:59:11PM +, Joseph Myers wrote: > On Sun, 2 Nov 2025, Alejandro Colomar wrote: > > > This function acts on entire parameter declaration lists, and iterates > > over them. Use plural in the name, to clarify that it acts on > > parameters, not just on a sin

[Ada] Fix misleading diagnostic about abstract new in type derivation

2025-11-03 Thread Eric Botcazou
The current error message is: abstract1.ads:7:13: error: "abstract" not allowed here, ignored but "abstract" is indeed allowed there if you complete the declaration. The patch changes it to: abstract1.ads:7:13: error: "abstract" allowed only for record extension, ... Tested on x86-64/Linux, ap

[Ada] Fix segfault for package instantiation on function call returning string

2025-11-03 Thread Eric Botcazou
The problem is that a transient scope is created during the analysis of the actual parameters of the instantiation and this discombobulates the complex handling of scopes in Sem_Ch12. Tested on x86-64/Linux, applied on the mainline. 2025-11-03 Eric Botcazou PR ada/78175 * s

Re: [PATCH] OpenMP/Fortran: Rebind labels after metadirective body [PR122369]

2025-11-03 Thread Tobias Burnus
Paul-Antoine Arras wrote: Here is a revamped patch as well as some inline replies. Thanks, On 31/10/2025 17:41, Tobias Burnus wrote: Error: Label 4567 referenced at (1) is never defined Added testcase. Fixed in the attached patch. Can you also add a test case like https://gcc.gnu.org/bugzi

Re: [PATCH] Implement std::__debug::inplace_vector

2025-11-03 Thread François Dumont
Hi Here is v2 with swap defined as inline friend. I also did some simplifications like reducing the number of calls to std::is_constant_evaluated. François On 11/3/25 07:23, François Dumont wrote: On 11/3/25 07:08, François Dumont wrote: On 11/2/25 04:09, Jonathan Wakely wrote: On

Re: [PATCH 1/3] [RFC] extra SSA immediate use iterator checking

2025-11-03 Thread Andrew MacLeod
On 11/3/25 13:24, Andrew MacLeod wrote: On 11/3/25 09:43, Richard Biener wrote: The following implements a prototype for additional checking around SSA immediate use iteration.  Specifically this guards immediate use list modifications inside a FOR_EACH_IMM_USE_STMT iteration to be restricted

Re: [PATCH v4 2/4] Fix typos in comment

2025-11-03 Thread Joseph Myers
On Sun, 2 Nov 2025, Alejandro Colomar wrote: > gcc/c-family/ChangeLog: > > * c-warn.cc (warn_parms_array_mismatch): Fix typos in comment. OK. -- Joseph S. Myers [email protected]

Re: [PATCH v4 1/4] gcc/: Rename warn_parm_array_mismatch() => warn_parms_array_mismatch()

2025-11-03 Thread Joseph Myers
On Sun, 2 Nov 2025, Alejandro Colomar wrote: > This function acts on entire parameter declaration lists, and iterates > over them. Use plural in the name, to clarify that it acts on > parameters, not just on a single parameter. OK. -- Joseph S. Myers [email protected]

[committed] i386: Allow memory op in operand 1 predicate of *test_1 insn patterns [PR122534]

2025-11-03 Thread Uros Bizjak
Combine tries to combine AND RTX with memory operand: Trying 12 -> 13: 12: {r106:DI=r99:DI&[r100:DI*0x8+r103:DI];clobber flags:CC;} REG_UNUSED flags:CC 13: flags:CCZ=cmp(r106:DI,0) REG_DEAD r106:DI but fails to match instruction: (set (reg:CCZ 17 flags) (compare:CCZ (and:DI

Re: [PATCH] Fortran: PR122513 do concurrent default (none) fails on parameter arrays

2025-11-03 Thread Tobias Burnus
Hi Jerry, Jerry D wrote: Regression tested on x86_64.              * resolve.cc (check_default_none_expr): Do not allow an iterator in a locality spec. Shouldn't be there a testcase for this? I see one for the other issue, namely ... Allow a named constant to be u

Re: [PATCH] Fortran: PR122513 do concurrent default (none) fails on parameter arrays

2025-11-03 Thread Jerry D
On 11/3/25 12:21 PM, Harald Anlauf wrote: Am 03.11.25 um 21:02 schrieb Jerry D: The attached patch from Steve fixes this. Regression tested on x86_64. OK for trunk? Regards, Jerry commit e7096708b2e4c8ca40c50537f1d227e15a89bc2d Author: Steve Kargl Date:   Mon Nov 3 11:47:54 2025 -0800    

Re: [PATCH] Fortran: PR122513 do concurrent default (none) fails on parameter arrays

2025-11-03 Thread Harald Anlauf
Am 03.11.25 um 21:02 schrieb Jerry D: The attached patch from Steve fixes this. Regression tested on x86_64. OK for trunk? Regards, Jerry commit e7096708b2e4c8ca40c50537f1d227e15a89bc2d Author: Steve Kargl Date:   Mon Nov 3 11:47:54 2025 -0800 Fortran: Fix check on locality spec DO C

[PATCH] Fortran: PR122513 do concurrent default (none) fails on parameter arrays

2025-11-03 Thread Jerry D
The attached patch from Steve fixes this. Regression tested on x86_64. OK for trunk? Regards, Jerry commit e7096708b2e4c8ca40c50537f1d227e15a89bc2d Author: Steve Kargl Date: Mon Nov 3 11:47:54 2025 -0800 Fortran: Fix check on locality spec DO CONCURRENT PR fortran/12251

[to-be-committed][PR rtl-optimization/122536] Fix guard against variable bit extracts in RTL simplifier

2025-11-03 Thread Jeff Law
While I haven't been able to reproduce the failure Sam reported, based on the RTL checking failure point and the code in question it was pretty clear the code that was supposed to guard against a variable bit extract was just checking the wrong argument to verify it was a constant integer --

Re: [PATCH 1/3] [RFC] extra SSA immediate use iterator checking

2025-11-03 Thread Andrew MacLeod
On 11/3/25 09:43, Richard Biener wrote: The following implements a prototype for additional checking around SSA immediate use iteration. Specifically this guards immediate use list modifications inside a FOR_EACH_IMM_USE_STMT iteration to be restricted to uses involving the actual stmt. It lik

[committed] libgomp.fortran/omp_target_memset.f90 - Avoid implicit mapping by an uninit size [PR122543]

2025-11-03 Thread Tobias Burnus
+ libgomp.fortran/omp_target_memset-2.f90 Committed as r16-5008-g28d20a591ddf16. The bug was very interesting: On my system it repeatedly failed when freeing the memory which turned out to be oddly because of GOMP_dev2host copying plugin-nvptx.c's ptx_devices[0] from the device, which must have

Re: [PATCH] wwwdocs: Clarify DCO name/identity and (anonymous) pseudonym policy

2025-11-03 Thread Mark Wielaard
Hi, On Mon, Oct 27, 2025 at 01:54:28PM +0100, Mark Wielaard wrote: > On Mon, 2025-10-20 at 15:13 +, Marc wrote: > > On October 20, 2025 2:50:11 PM UTC, Mark Wielaard wrote: > > > On Mon, 2025-10-13 at 23:13 +0200, Mark Wielaard wrote: > > > > Gentle ping. Marc pointed out we discussed this ag

Re: [PATCH] OpenMP/Fortran: Rebind labels after metadirective body [PR122369]

2025-11-03 Thread Paul-Antoine Arras
Hi Tobias, Here is a revamped patch as well as some inline replies. On 31/10/2025 17:41, Tobias Burnus wrote: Hi PA, Paul-Antoine Arras wrote: On 29/10/2025 18:44, Tobias Burnus wrote: This does not seem to work in general: integer :: cnt, x cnt = 0 !$omp begin metadirective when(user={con

Re: [PATCH] optabs: Make widen_lshift an IFN.

2025-11-03 Thread Robin Dapp
I didn't commit yet but instead set up an arm qemu environment. There is indeed a problem after the patch: The widen lshift standard name requires an immediate shift-count operand and that's what the arm pattern implements. However, we don't lower an IFN_VEC_WIDEN_LSHIFT similar to regular shi

Re: [PUSHED] ipa: Fix pritting of symtab_node type: Fix 'static_assert' [PR122512]

2025-11-03 Thread Andrew Pinski
On Mon, Nov 3, 2025 at 4:26 AM Thomas Schwinge wrote: > > Fix-up for commit r16-4914-ga3ee90fd3dc5d5c98f63a16f9cdd788c5d5c3335 > "ipa: Fix pritting of symtab_node type [PR122512]": > > ../../source-gcc/gcc/symtab.cc:885:61: error: expected ‘,’ before ‘)’ > token > static_assert (ARRAY_SI

Re: [PATCH v4] simplify-rtx: Canonicalize SUBREG and LSHIFTRT order for AND operations

2025-11-03 Thread Jeff Law
On 10/30/25 9:06 AM, Kishan Parmar wrote: Hi All, Changes from v3: * Replace GET_CODE (op) == SUBREG with SUBREG_P (op). Changes from v2: * Code refactoring. Changes from v1: * Corrected commit message. For a given rtx expression (and (lshiftrt (subreg X) shift) mask)

Re: [PATCH 2/3] Fix unsafe stmt modifications in FOR_EACH_IMM_USE_STMT

2025-11-03 Thread Jeff Law
On 11/3/25 7:43 AM, Richard Biener wrote: The following fixes path isolation changing the immediate use list of an SSA name that is currently iterated over via FOR_EACH_IMM_USE_STMT. This happens when it duplicates a BB within this and creates/modifies stmts that contain SSA uses of the name a

Re: [PATCH 1/3] [RFC] extra SSA immediate use iterator checking

2025-11-03 Thread Jeff Law
On 11/3/25 7:43 AM, Richard Biener wrote: The following implements a prototype for additional checking around SSA immediate use iteration. Specifically this guards immediate use list modifications inside a FOR_EACH_IMM_USE_STMT iteration to be restricted to uses involving the actual stmt. It

Re: [PATCH RFA] libstdc++: add ADL friends

2025-11-03 Thread Jason Merrill
On 11/3/25 5:26 PM, Patrick Palka wrote: On Sun, 2 Nov 2025, Jason Merrill wrote: Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- Since the implementation namespaces __detail and __exception_ptr aren't exported from std, ADL can't find these functions there. Adding friend declarations ma

[PATCH v1 0/3] aarch64: mingw: Add more support for ABI

2025-11-03 Thread Evgeny Karpov
Tue Oct 28 2025 Saurabh Jha wrote: > For master, it fails on step 4 because mingw-crt needs long double to be > 8 bytes. So I couldn't run regression tests for aarch64-w64-mingw32 on > master. After these commits are applied, the test summary looks like > this. > > # of expected passes

Re: [PATCH] libstdc++: testsuite: Add climits missing test case

2025-11-03 Thread Xavier Bonaventura
I can do that if you prefer. I just followed this approach for consistency because it was the one followed for cfloat test. El dl., 3 de nov. 2025, 16:01, Jonathan Wakely va escriure: > > > On Monday, 3 November 2025, Xavier Bonaventura > wrote: > >> Hi, sorry but I screwed up my previous mail.

[PATCH v1 2/3] aarch64: mingw: Make long double 64 bit

2025-11-03 Thread Evgeny Karpov
Tue Oct 28 2025 Saurabh Jha wrote: > +case $host in > + aarch64-*-mingw* | aarch64-*-cygwin*) > +LIBGOMP_CHECKED_REAL_KINDS="4 8" ;; > + *) It looks like the first introduction of aarch64-*-cygwin in the GNU toolchain. The work on preparing the introduction of aarch64-pc-cygwin in binutils/

[PATCH v1 2/3] aarch64: mingw: Make long double 64 bit

2025-11-03 Thread Evgeny Karpov
Tue Oct 28 2025 Saurabh Jha wrote: > + * The tests below validate that. In aarch64-linux-gnu, the results would > + * be the opposite. > + */ Nit: Should the comment closure be on the same line? Please add "Co-authored-by: Martin Vejbora ". Regards, Evgeny

Re: [PATCH RFA] libstdc++: add ADL friends

2025-11-03 Thread Patrick Palka
On Sun, 2 Nov 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > > -- 8< -- > > Since the implementation namespaces __detail and __exception_ptr aren't > exported from std, ADL can't find these functions there. Adding friend > declarations makes it work. I thought Natha

Re: [PATCH RFA] libstdc++: add ADL friends

2025-11-03 Thread Jonathan Wakely
On Sunday, 2 November 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > OK, thanks > > -- 8< -- > > Since the implementation namespaces __detail and __exception_ptr aren't > exported from std, ADL can't find these functions there. Adding friend > declarations makes it

Re: [PATCH RFA] libstdc++: adjust std module TBB workaround

2025-11-03 Thread Jonathan Wakely
On Sunday, 2 November 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > OK, thanks > > -- 8< -- > > Messing with macros before possibly importing the stdc++.h header unit is > bad form; better to mess with (other) macros afterward. > > libstdc++-v3/ChangeLog: > >

[PATCH 3/3] Fix unsafe operations in FOR_EACH_IMM_USE_STMT

2025-11-03 Thread Richard Biener
The following fixes forwprop using FOR_EACH_IMM_USE_STMT to iterate over stmts and then eventually removing the active stmt, releasing its defs. This can cause debug stmt insertion with a RHS referencing the SSA name we iterate over, adding to its immediate use list but also adjusting all other de

Re: [PATCH] vrp: Infer ranges from loads from constant aggregates with initializers

2025-11-03 Thread Andrew MacLeod
On 10/31/25 17:46, Martin Jambor wrote: Hi, this patch adds the ability to infer ranges from loads from global constant static aggregates which have static initializers. Even when the load has an ARRAY_REF with an unknown index and thus we do not know the particular constant that is being loa

[PATCH 1/3] [RFC] extra SSA immediate use iterator checking

2025-11-03 Thread Richard Biener
The following implements a prototype for additional checking around SSA immediate use iteration. Specifically this guards immediate use list modifications inside a FOR_EACH_IMM_USE_STMT iteration to be restricted to uses involving the actual stmt. It likewise prohibits FOR_EACH_IMM_USE_STMT from

[PATCH 2/3] Fix unsafe stmt modifications in FOR_EACH_IMM_USE_STMT

2025-11-03 Thread Richard Biener
The following fixes path isolation changing the immediate use list of an SSA name that is currently iterated over via FOR_EACH_IMM_USE_STMT. This happens when it duplicates a BB within this and creates/modifies stmts that contain SSA uses of the name and calls update_stmt which re-builds SSA operan

[PATCH v1 1/3] mingw: emit end of procedure directive as comment

2025-11-03 Thread Evgeny Karpov
Tue Oct 28 2025 Saurabh Jha wrote: > For mingw targets, there is no way to identify the end of function using > assembly directives right now. > However, emitting an end of function marker now will let us modify > check-function-bodies in scanasm.exp, which in turn enables us to write > dg-compil

[PATCH RFA] libstdc++: add attributes to more ios_base types

2025-11-03 Thread Jonathan Wakely
On Sunday, 2 November 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > OK, thanks. I don't see any other reason that we were testing those cases, so agree we can (and should) drop them from the tests. > > -- 8< -- > > In r15-3499 I added attributes to _Ios_Openmode to

Re: [PATCH RFA] libstdc++: remove cassert from stdc++.h

2025-11-03 Thread Jonathan Wakely
On Sunday, 2 November 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, OK for trunk? > OK thanks, no need to separate the other change. > > -- 8< -- > > isn't suitable for a header unit, because by design it depends on > the user NDEBUG macro. So let's not include it in . > > The ex

[COMMITTED 37/37] ada: Guard compile-time evaluator against rewritten if-expressions

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek A hopefully temporary fix for if-expression that has been rewritten into an if-statement, where a object reference has the if-statement as its parent, but is not part of the condition, then statements or else statements. gcc/ada/ChangeLog: * exp_util.adb (Get_Curren

[PATCH] libstdc++: testsuite: Add climits missing test case

2025-11-03 Thread Jonathan Wakely
On Monday, 3 November 2025, Xavier Bonaventura wrote: > Hi, sorry but I screwed up my previous mail. This is my first patch and > the first time I submit a patch to a mailing list. > > Now that I know how to add an introduction before sending a patch, let > me explain a bit. > When taking a look

[COMMITTED 33/37] ada: Decouple compile-time evaluation from if_statement source locations

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek The compile-time evaluation relied on source locations to decide whether a variable reference occurs within an IF statement where the evaluation can assume the IF condition. This was unreliable, especially for rewritten and internally generated IF statements, whose End_Span i

[PUSHED] Fix 'libgomp.c/pr122281.c' for non-USM offloading execution [PR122281]

2025-11-03 Thread Thomas Schwinge
... where it currently runs into: libgomp: cuCtxSynchronize error: an illegal memory access was encountered ... for nvptx, or similarly for GCN: Memory access fault by GPU node-1 (Agent handle: 0x34d77290) on address 0x7fff3c553000. Reason: Page not present or supervisor privilege. Fix

[COMMITTED 26/37] ada: Get rid of Sy/Sm mixing (Expression)

2025-11-03 Thread Marc Poulhiès
From: Bob Duff We should not mix "syntactic" and "semantic" for the same field in different node kinds. The Expression field was both syntactic (in N_Exception_Declaration) and semantic (in all other node kinds). This patch makes it always syntactic. Expression is the last such field, so we rem

[COMMITTED 29/37] ada: Crash on call to a dispatching op with if_expr and tag-indeterminate calls

2025-11-03 Thread Marc Poulhiès
From: Gary Dismukes The compiler can crash with a Storage_Error for a failed precondition when compiling a call to a dispatching subprogram where an actual for a controlling formal is given by an if_expression whose dependent expressions are tag-indeterminate calls. This problem showed up on a b

[COMMITTED 34/37] ada: Decouple compile-time evaluation from while loop source locations

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek The compile-time evaluation relied on source locations to decide whether a variable reference occurs within a WHILE loop where the evaluation can assume the loop condition. Now this relies exclusively on the AST structure. gcc/ada/ChangeLog: * exp_util.adb (Find_In_

[COMMITTED 35/37] ada: Adjust outdated reference in comment

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou The Apply_Alignment_Check procedure no longer exists. gcc/ada/ChangeLog: * checks.adb (Apply_Address_Clause_Check): Adjust self-reference in the opening comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/checks.adb | 7 --- 1 file

[COMMITTED 32/37] ada: Preserve AST structure when copying tree with discrete types

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek When copying AST we created an orphaned copy of a scalar range. This was confusing the compile-time evaluator, because we couldn't determine location of a scalar range within an IF statement by looking at its parenthood chain. gcc/ada/ChangeLog: * sem_util.adb (Upda

[COMMITTED 30/37] ada: Fix box accepted as second association of a generic formal package

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou The syntax is plain invalid because a box can be accepted as a positional parameter only in the first place. gcc/ada/ChangeLog: PR ada/61127 * sem_ch12.adb (Associations.Match_Positional): Remove the always false condition that guards the error on a p

[COMMITTED 25/37] ada: Reject nonconfirming size clauses on objects of floating-point types

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou The RM 13.1(7/5) subclause contains the following sentences: "If the size of an object is greater than that of its subtype, the additional bits are padding bits. For an elementary object, these padding bits are normally read and updated along with the others." GNAT implements

[COMMITTED 24/37] ada: Fix spurious check on 'Put_Image for an array of characters

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek gcc/ada/ChangeLog: * exp_attr.adb (Rewrite_Attribute_Proc_Call): Fix call to Analyze. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_attr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_attr.adb b/gc

[COMMITTED 16/37] ada: Remove outdated comment

2025-11-03 Thread Marc Poulhiès
The comment has been documenting a 'Present(S)' that has been long gone (>17y). gcc/ada/ChangeLog: * sem_aux.adb (Enclosing_Dynamic_Scope): Remove comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_aux.adb | 3 --- 1 file changed, 3 deletions(-) diff --git a/

[COMMITTED 19/37] ada: Direct attribute definition for constructors

2025-11-03 Thread Marc Poulhiès
From: Denis Mazzucato This patch introduces the 'Constructor attribute and implements its direct attribute definition syntax within subprogram specification. This new shorthand avoids having to come up with an arbitrary subprogram name and to type out the constructor aspect. Before, constructors

[COMMITTED 15/37] ada: Get rid of unused node/entity fields (neither set nor get)

2025-11-03 Thread Marc Poulhiès
From: Bob Duff The following fields are not used in GNAT nor in any of its clients. Neither the setters nor the getters are called. Node fields: Do_Storage_Check Enclosing_Variant Handler_List_Entry Is_Subprogram_Descriptor Renaming_Exception D

[COMMITTED 31/37] ada: Keep source locations for inlined subprograms from predefined units

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek Frontend inlining, which is now deprecated and only enabled with switch -gnatN is used, used to reset source locations for subprograms from predefined units. This was a workaround to prevent the debugger from visiting internal code in Ada.Tags, but this problem no longer occu

[COMMITTED 23/37] ada: Remove workaround for a freezing issue with address of a slice

2025-11-03 Thread Marc Poulhiès
From: Piotr Trojanek Rewriting of an address of a slice, e.g. "X (Low .. High)'Address" into an address of an indexed component, e.g. "X (Low)'Address", was only done as a workaround for some freezing issue. Apparently this freezing issue is now solved and the rewriting is causing problems for GN

[COMMITTED 21/37] ada: Avoid Ignored ghost code behavior in Codepeer_Mode

2025-11-03 Thread Marc Poulhiès
From: Viljar Indus When the frontend is called by it should treat all ghost code as checked. Avoid removing expansion in ignored ghost code regions when Codepeer_Mode is active. gcc/ada/ChangeLog: * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Avoid disabling the expander for i

[COMMITTED 28/37] ada: Fix another incorrectly nested procedure

2025-11-03 Thread Marc Poulhiès
When unnesting a loop, its body is moved inside a procedure, and inner entities have their scope adjusted. The current GNAT Tree at this stage is incoherent wrt scope information, and some nested entities are incorrectly scoped, possibly leading to a crash of the unnester. The existing Fixup_Inner

[COMMITTED 14/37] ada: Add missing runtime procedure for CHERI

2025-11-03 Thread Marc Poulhiès
From: Ronan Desplanques A recent patch added a procedure in the spec of System.Stream_Attributes but failed to add the corresponding body in the CHERI-specific body of this package. This patch fixes this. gcc/ada/ChangeLog: * libgnat/s-stratt__cheri.adb (W_80IEEE): New procedure. Teste

[COMMITTED 18/37] ada: Tidy up code dealing with visibility in instances of formal packages

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou The actuals for parameters of formal packages are visible in the instance if the formal packages either are declared with a box or contain defaulted parameters. This is essentially implemented in Check_Generic_Actuals and Restore_Private_Views, with the help of the Is_Visible

[COMMITTED 36/37] ada: Restore alignment check for address clause given with alignment clause

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou The alignment check for address clauses had historically been performed universally by GNAT, until a decade ago when it was disabled by default on non-strict-alignment platforms. This seems questionable when an alignment clause is also given for the entity since the intent is

[COMMITTED 22/37] ada: Fix Put_Image for Multiway_Trees

2025-11-03 Thread Marc Poulhiès
From: Viljar Indus Put_Image should start printing the tree from the Root instead of the First_Child. gcc/ada/ChangeLog: * libgnat/a-cbmutr.adb (Put_Image): Fix the condition and starting point for printing the tree. * libgnat/a-cimutr.adb (Put_Image): Likewise.

[COMMITTED 10/37] ada: Remove exception handler in Check_Vanishing_Fields

2025-11-03 Thread Marc Poulhiès
From: Bob Duff Check_Vanishing_Fields calls Same_Node_To_Fetch_From, which was calling Node_To_Fetch_From, which will raise an exception (as it should) on ..._Type_Only fields if called early (when the Base_Type, Implementation_Base_Type, or Root_Type has not yet been set). Other exceptions can a

[COMMITTED 11/37] ada: Add ctor call after address clause

2025-11-03 Thread Marc Poulhiès
From: Alexandre Oliva An object initialized by a C++-imported constructor call has the constructor function call transformed into a procedure call, and the call is inserted after the object declaration. If the object has say an address clause, that transformation separates the declaration from t

[COMMITTED 09/37] ada: Make Long_Long_Float'Write deterministic

2025-11-03 Thread Marc Poulhiès
From: Ronan Desplanques On some platforms, Long_Long_Float'Size (and Long_Long_Float'Stream_Size) is 128 but only 80 bits are effectively used. This pack makes it so 'Write in this case write zeros for the padding bits instead of unspecified values. gcc/ada/ChangeLog: * gen_il-fields.ad

[COMMITTED 12/37] ada: Get rid of unused node/entity fields (Set_ only)

2025-11-03 Thread Marc Poulhiès
From: Bob Duff The following fields are Set_ but not used in GNAT. We get rid of them or document them as follows: - Has_Pragma_Controlled Remove. - Corresponding_Entry_Body Document that it is used by codepeer. - Is_Activation_Record Document that it is used

[COMMITTED 27/37] ada: Tweak Is_Predefined_File_Name

2025-11-03 Thread Marc Poulhiès
From: Ronan Desplanques This patch extends the set of names recognized by Is_Predefined_File_Name so that names that start with "a-" and are longer than 12 characters are considered predefined. This is motivated by the need to make gprname work with the in-tree a-strunb__shared.ads file that use

[COMMITTED 13/37] ada: Move constant declaration

2025-11-03 Thread Marc Poulhiès
From: Ronan Desplanques This patch reduces the scope of a recently introduced variable because it was much larger than it needed to be. gcc/ada/ChangeLog: * libgnat/s-stratt.adb (W_80IEEE): Make constant local. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s

[COMMITTED 04/37] ada: Fix visibility issue in nested instance with use clause for formal package

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou The compiler gives a spurious visibility error for a formal object parameter of a formal package with a use clause, present in a parent instance, when an instance of a child generic unit is compiled, while this does not happen in the same circumstances for a formal type parame

[COMMITTED 08/37] ada: Fix incorrect static string concatenation with null left string

2025-11-03 Thread Marc Poulhiès
From: Eric Botcazou It comes from the implementation of an optimization for static concatenation in Resolve_String_Literal, which causes the original subtype of the literal to be lost. Now this subtype must be preserved in the case where the left operand of the concatenation may be null, per the

[COMMITTED 02/37] ada: Get rid of Sy/Sm mixing (Chars)

2025-11-03 Thread Marc Poulhiès
From: Bob Duff We should not mix "syntactic" and "semantic" for the same field in different node kinds. The Chars field is both syntactic and semantic. This patch makes it always syntactic, and does some other Chars-related cleanups. An attempt was made to instead rename the semantic field to b

[COMMITTED 20/37] ada: Avoid triggering ghost context errors on prefixed names

2025-11-03 Thread Marc Poulhiès
From: Viljar Indus Errors for ghost incompatibilities of qualified names should not be applied to prefixes but rather only the final selector. gcc/ada/ChangeLog: * ghost.adb (Is_Ok_Context): consider ghost prefix to always be a valid ghost context. Tested on x86_64-pc-linux-gnu

[COMMITTED 06/37] ada: Get rid of Sy/Sm mixing (Default_Expression)

2025-11-03 Thread Marc Poulhiès
From: Bob Duff We should not mix "syntactic" and "semantic" for the same field in different node kinds. Change the name of Default_Expression (a syntactic field) on N_Formal_Object_Declaration to be Expression. This avoids the conflict with the name-named semantic field of N_Parameter_Specificat

[COMMITTED 17/37] ada: Get rid of Sy/Sm mixing (Actions)

2025-11-03 Thread Marc Poulhiès
From: Bob Duff We should not mix "syntactic" and "semantic" for the same field in different node kinds. The Actions field is both syntactic and semantic. This patch makes it always syntactic. No change in overall compiler behavior. gcc/ada/ChangeLog: * gen_il-gen.adb (N_Short_Circuit)

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

2025-11-03 Thread Marc Poulhiès
From: Gary Dismukes There are cases where GNAT introduces a dependence on the secondary stack in a build-in-place function with a result subtype that is definite, when this dependence could be avoided. In particular this is done for record types that requires finalization due to having a control

[COMMITTED 05/37] ada: Incorrect warning redundant parens on in

2025-11-03 Thread Marc Poulhiès
From: Bob Duff This patch fixes a bug where GNAT gives a warning about redundant parentheses on expressions like "(X in S) = B". In fact, the parentheses are required in this case. The bug is caused by constant-folding the expression into an expression that does not require parentheses, but in a

[COMMITTED 01/37] ada: Catch Constraint_Errors on non-scalar streaming attributes

2025-11-03 Thread Marc Poulhiès
From: Viljar Indus The specs for the streaming methods should use the first subtype of the prefix attribute for the Item argument if the prefix has a non-scalar type instead of the underlying type. This will catch size errors for is smaller size are used for the Item argument that has a constrai

[COMMITTED 03/37] ada: Add System.Traceback.Symbolic.Calling_Entity

2025-11-03 Thread Marc Poulhiès
From: Ronan Desplanques This patch adds a new convenience function to the runtime library, intended to help with logging. gcc/ada/ChangeLog: * libgnat/s-trasym.ads (Calling_Entity): New function. * libgnat/s-trasym.adb (Calling_Entity): Add dummy body. * libgnat/s-trasym

[PATCH v2 2/2] aarch64: Add new target options for 2024 Architecture Extension and Armv9.6-A

2025-11-03 Thread Alfie Richards
This does not add support for these version (and the corresponding __ARM_FEATURE_ macros aren't implemented for this reason) but accepts the command line strings and allows these to be passed on to the assembler. Armv9.6-A is supported by the new "armv9.6-a" option and defined as "armv9.5-a+cmpbr+

[PATCH v2 1/2] aarch64: Split sve2-X extensions into sve2 + sve-X extension.

2025-11-03 Thread Alfie Richards
Changes the "sve2-sm4", "sve2-sha3", "sve2-bitperm", and "sve2-aes" to be aliases which imply both "sve2" and the new option "sve-sm4", "sve-sha3", "sve-bitperm", or "sve-aes" respectively. This granularity is needed to model the 2024 Architecture Extensions dependencies. gcc/ChangeLog:

[PATCH v2 0/2] aarch64: Updates to architecture extension command line

2025-11-03 Thread Alfie Richards
Hi, This version adds some tests I missed some tests from the V1. Reg tested on aarch64. Okay for master? Alfie Alfie Richards (2): aarch64: Split sve2-X extensions into sve2 + sve-X extension. aarch64: Add new target options for 2024 Architecture Extension and Armv9.6-A gcc/config/a

Re: [PATCH] vrp: Infer ranges from loads from constant aggregates with initializers

2025-11-03 Thread Martin Jambor
Hi, On Mon, Nov 03 2025, Richard Biener wrote: > On Sun, Nov 2, 2025 at 10:24 AM Richard Biener > wrote: >> >> On Fri, Oct 31, 2025 at 10:47 PM Martin Jambor wrote: >> > >> > Hi, >> > >> > this patch adds the ability to infer ranges from loads from global >> > constant static aggregates which ha

[PUSHED] ipa: Fix pritting of symtab_node type: Fix 'static_assert' [PR122512]

2025-11-03 Thread Thomas Schwinge
Fix-up for commit r16-4914-ga3ee90fd3dc5d5c98f63a16f9cdd788c5d5c3335 "ipa: Fix pritting of symtab_node type [PR122512]": ../../source-gcc/gcc/symtab.cc:885:61: error: expected ‘,’ before ‘)’ token static_assert (ARRAY_SIZE(toplevel_type_names)==TOPLEVEL_MAX);

[patch,avr,applied] Fix testcase for PR92606

2025-11-03 Thread Georg-Johann Lay
gcc.target/avr/torture/pr92606.c used LPM Z+ no matter what, so that it failed when only LPM is available. This patch always uses LPM since performance is not an issue. Applied as obvious. Johann -- AVR: Fix gcc.target/avr/torture/pr92606.c that failed without LPMx. gcc/testsuite/

  1   2   >