Re: [PATCH] xtensa: Remove TARGET_PROMOTE_FUNCTION_MODE

2025-06-30 Thread Takayuki 'January June' Suwa
On 2025/07/01 7:40, H.J. Lu wrote: On Mon, Jun 23, 2025 at 5:41 AM Takayuki 'January June' Suwa wrote: On 2025/06/23 6:20, H.J. Lu wrote: On Sun, Jun 22, 2025 at 9:54 PM Max Filippov wrote: On Sun, Jun 22, 2025 at 5:49 AM Takayuki 'January June' Suwa wrote: On 2025/06/22 6:41, Max Filip

[PATCH v2 2/2] RISC-V: Add testcases for signed scalar SAT_ADD IMM form 2

2025-06-30 Thread Ciyan Pan
From: panciyan This patch adds testcase for form2, as shown below: T __attribute__((noinline)) \ sat_s_add_imm_##T##_fmt_2##_##INDEX (T x)\ {\ T sum = (T)((UT)x + (UT)IMM);

[PATCH] [RISC-V] Fix shift type for RVV interleaved stepped patterns [PR120356]

2025-06-30 Thread Alexey Merzlyakov
It corrects the shift type of interleaved stepped patterns for const vector expanding in LRA. The shift instruction was initially LSHIFTRT, and it seems still should be the same type for both LRA and other cases. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_const_vector_interl

[PATCH] Fix "void debug (const tree_node *ptr)"

2025-06-30 Thread H.J. Lu
Calling "debug (const tree_node *ptr)" does nothing. Change it to call debug_tree so that we can do this in gdb: (gdb) whatis type type = const_tree (gdb) call debug (type) constant 32> unit-size constant 4> align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffe982 f

Re: [PATCH] c-family: Check backend for argument alignment on stack

2025-06-30 Thread H.J. Lu
On Mon, Jun 30, 2025 at 10:36 PM Jason Merrill wrote: > > On 6/28/25 7:00 AM, H.J. Lu wrote: > > Since a backend may ignore user type alignment for arguments passed on > > stack, check backend for argument alignment on stack when evaluating > > __alignof. > > I assume that's reflected in DECL_ALIG

Re: [PATCH] xtensa: Remove TARGET_PROMOTE_FUNCTION_MODE

2025-06-30 Thread H.J. Lu
On Mon, Jun 23, 2025 at 5:41 AM Takayuki 'January June' Suwa wrote: > > On 2025/06/23 6:20, H.J. Lu wrote: > > On Sun, Jun 22, 2025 at 9:54 PM Max Filippov wrote: > >> > >> On Sun, Jun 22, 2025 at 5:49 AM Takayuki 'January June' Suwa > >> wrote: > >>> > >>> On 2025/06/22 6:41, Max Filippov wrote

Re: [PATCH V1] RISC-V:Add the MIPS P8700 conditional move extension instruction support.

2025-06-30 Thread Jeff Law
On 6/30/25 12:04 AM, Umesh Kalappa wrote: Thank you @Jeff Law   for the comments and >>I suspect there's something goofy in the indentation in the block above.  like clang-format ,does gcc have a code formatter we can use ? Not really. Martin Liska (IIRC, and

Re: [PATCH, V2, 1 of 3] Add -mcpu=future support.

2025-06-30 Thread Michael Meissner
On Fri, Jun 27, 2025 at 12:29:06PM -0500, Segher Boessenkool wrote: > Hi! > > On Wed, Jun 25, 2025 at 02:50:14PM -0400, Michael Meissner wrote: > > This is patch #1 of 3 that adds the support that can be used in developing > > GCC > > support for potential future PowerPC processors. With all 3 p

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-06-30 Thread Florian Weimer
* Jason Merrill: > On 6/28/25 3:17 PM, Florian Weimer wrote: >> * Jason Merrill: >> >>> Since r10-6069[1] we control the call to __cxa_finalize with >>> DEFAULT_USE_CXA_ATEXIT, so there's no need to also declare it as a weak >>> reference; if the target has __cxa_atexit, it must also have __cxa_f

[PATCH] libstdc++: Implement ranges::shift_left/right from P2440R1

2025-06-30 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? Btw, any thoughts on PR105611 which reports std::shift_left/right's use of the three-parameter version of ranges::next (on legacy iterators) is sketchy? Should we define a three-parameter std::__next analog for legacy iterators and use t

Re: [PATCH] c++, v2: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-30 Thread Jason Merrill
On 6/30/25 4:24 PM, Jakub Jelinek wrote: On Mon, Jun 30, 2025 at 03:55:46PM -0400, Jason Merrill wrote: Might go with my earlier !TREE_SIDE_EFFECTS && tree_invariant_p suggestion? If you mean the following, it passes the 2 testcases and I can surely bootstrap/regtest it tonight. Yes, that's

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-06-30 Thread Qing Zhao
Hi, David, Thank you for the info. Yes, this does sound like a general issue in this area. Is there any mechanism in GCC currently that records such original source code information for IRs after the compiler transformation? If not, shall we add such information in the IR for this purpose?

Re: [Fortran, Patch, PR120843, v2] Fix reject valid, because of inconformable coranks

2025-06-30 Thread Harald Anlauf
Am 30.06.25 um 15:25 schrieb Andre Vehreschild: Hi all, here now the version of the patch that seems to be more complete. Regtests ok on x86_64-pc-linux-gnu / F41. Ok for mainline and later backport to gcc-15? This looks good to me. OK for both. Thanks for the patch! Harald Regards,

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-06-30 Thread Joseph Myers
On Sat, 28 Jun 2025, Jason Merrill wrote: > + if (!flag_use_cxa_atexit != !DEFAULT_USE_CXA_ATEXIT) > +{ > + const char *opt, *copt; > + if (flag_use_cxa_atexit) > + opt = "-fuse-cxa-atexit", copt = "--enable-__cxa_atexit"; > + else > + opt = "-fno-use-cxa-atexit", copt

Re: [PATCH] c++, v2: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-30 Thread Jakub Jelinek
On Mon, Jun 30, 2025 at 03:55:46PM -0400, Jason Merrill wrote: > Might go with my earlier !TREE_SIDE_EFFECTS && tree_invariant_p suggestion? If you mean the following, it passes the 2 testcases and I can surely bootstrap/regtest it tonight. 2025-06-30 Jakub Jelinek PR c++/120471

Re: [PATCH] [RISC-V] Correct CFA notes for stack-clash protection [PR120714]

2025-06-30 Thread Jeff Law
On 6/27/25 12:48 AM, Alexey Merzlyakov wrote: Fixes incorrect SP-addresses used in CFA notes for the stack probes unrelative to the frame's top. It applied to the RISC-V targets code generation when the stack-clash protection is enabled. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_

Re: [PATCH] c++, v2: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-30 Thread Jason Merrill
On 6/30/25 1:06 PM, Jakub Jelinek wrote: On Mon, Jun 30, 2025 at 05:14:06PM +0200, Jakub Jelinek wrote: 1) for idx being INTEGER_CST (case for which I believe the change has been added) it keeps doing what it did 2) if both op1 and op2 are arrays with invariant address or pointers to som

Re: [Fortran, Patch, PR120846, v1] Fix ICE when a function is called more than once in a coarray expression.

2025-06-30 Thread Harald Anlauf
Am 30.06.25 um 15:29 schrieb Andre Vehreschild: Hi all, attached patch fixes an ICE when in an expression with a coindex a function was used more than once. E.g. coarray(mod( something ), mod( something else ))[i] ICE'd because a component for aliasing the second mod() could not be created. Reg

Re: [pushed: r16-1830] diagnostics: remove "json" output format

2025-06-30 Thread David Malcolm
On Mon, 2025-06-30 at 15:24 -0400, David Malcolm wrote: > The "json" output format for diagnostics was deprecated in GCC 15, > with > advice to users seeking machine-readable diagnostics from GCC to use > SARIF instead. > > This patch eliminates it from GCC 16, simplifying the diagnostics > subsys

[pushed: r16-1831] diagnostics: convert diagnostic_event::meaning enums to enum class

2025-06-30 Thread David Malcolm
Modernization; no functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-1831-g8ac43bfa380b5c. gcc/analyzer/ChangeLog: * checker-event.cc (function_entry_event::get_meaning): Convert diagnostic_event::meaning enums to enum

[pushed: r16-1832] diagnostics: use nullptr rather than NULL

2025-06-30 Thread David Malcolm
Modernization; no functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-1832-g5bcb841f29a861. gcc/ChangeLog: * diagnostic-color.cc: Use nullptr rather than NULL. * diagnostic-format-sarif.cc: Likewise. * diagnosti

[pushed: r16-1830] diagnostics: remove "json" output format

2025-06-30 Thread David Malcolm
The "json" output format for diagnostics was deprecated in GCC 15, with advice to users seeking machine-readable diagnostics from GCC to use SARIF instead. This patch eliminates it from GCC 16, simplifying the diagnostics subsystem somewhat. Note that the Ada frontend seems to have its own implem

Re: [PATCH v4 2/6] dwarf: create annotation DIEs for btf tags

2025-06-30 Thread David Faust
On 6/30/25 06:11, Richard Biener wrote: >> +static void >> +gen_btf_decl_tag_dies (tree t, dw_die_ref target, dw_die_ref context_die) >> +{ >> + if (t == NULL_TREE || !DECL_P (t) || !target) >> +return; >> + >> + tree attr = lookup_attribute ("btf_decl_tag", DECL_ATTRIBUTES (t)); >> + if

Re: [Patch] builtins.def: Enable OpenMP/OpenACC builtins also with -fno-nonansi-builtins

2025-06-30 Thread Thomas Schwinge
Hi! On 2025-06-05T10:42:00+0200, Tobias Burnus wrote: > Currently, using the ISO version of C and C++ will disable the > OpenMP and OpenACC intrinsics, which is rather surprising. The > reason is that those imply -fno-nonansi-builtins and the > OpenMP/OpenACC are marked as non-ansi builtins. > >

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-06-30 Thread David Malcolm
On Mon, 2025-06-30 at 16:47 +, Qing Zhao wrote: [...snip...] > The output with -fdiagnostics-show-context=1 is: > > /home/opc/Work/GCC/latest-gcc- > write/gcc/testsuite/gcc.dg/pr109071_7.c: In function ‘foo’: > /home/opc/Work/GCC/latest-gcc- > write/gcc/testsuite/gcc.dg/pr109071_7.c:12:6: wa

[COMMITTED] Regenerate common.opt.urls

2025-06-30 Thread Mark Wielaard
When -fauto-profile-inlining was added it was documented, but common.opt.urls wasn't regenerated. Fixes: aaf55e09b3d9 ("Add -fauto-profile-inlining") gcc/ChangeLog: * common.opt.urls: Regenerate. --- gcc/common.opt.urls | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/common.o

Re: [PATCH] c++, v2: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-30 Thread Jakub Jelinek
On Mon, Jun 30, 2025 at 05:14:06PM +0200, Jakub Jelinek wrote: > 1) for idx being INTEGER_CST (case for which I believe the change has been >added) it keeps doing what it did > 2) if both op1 and op2 are arrays with invariant address or pointers to >something with invariant address, it uses

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-30 Thread Alexander Monakov
On Mon, 30 Jun 2025, Richard Biener wrote: > > * gcc.target/i386/pr116979.c > > > > Here we check that FMA is used for complex multiplication. This is a case > > where use of FMA is detrimental for accuracy, but I guess we can choose > > to preserve the status quo. I can look into teaching > > e

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-06-30 Thread Qing Zhao
> On Jun 30, 2025, at 07:33, Richard Biener wrote: > > On Fri, Jun 27, 2025 at 3:39 PM Qing Zhao wrote: >> >> Hi, >> >> A status update on this patch: (Actually a good news!) >> >>> On Jun 10, 2025, at 11:32, Qing Zhao wrote: >>> >>> >>> >> > > It's difficult to do any me

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-06-30 Thread Qing Zhao
> On Jun 30, 2025, at 07:27, Richard Biener wrote: > > On Tue, Jun 10, 2025 at 5:28 PM Qing Zhao wrote: >> >> >> >>> On Jun 10, 2025, at 09:37, Richard Biener >>> wrote: >>> >>> On Mon, Jun 9, 2025 at 8:06 PM Qing Zhao wrote: > On Jun 6, 2025, at 03:31, Richard Bie

Re: [PATCH 2/2] libstdc++: Use ranges::iter_move in ranges::remove_if [PR120789]

2025-06-30 Thread Jonathan Wakely
OK for trunk and backports. On Fri, 27 Jun 2025 at 03:51, Patrick Palka wrote: > > PR libstdc++/120789 > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_algo.h (__remove_if_fn::operator()): Use > ranges::iter_move(iter) instead of std::move(*iter). > * testsuit

Re: [PATCH 1/2] libstdc++: Use ranges::iter_move in ranges::unique [PR120789]

2025-06-30 Thread Jonathan Wakely
On Fri, 27 Jun 2025 at 03:44, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps > 15/14? Yes for trunk and backports. > > -- >8 -- > > PR libstdc++/120789 > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_algo.h (__unique_fn::oper

Re: [PATCH 1/1] ivopts: Fix scan-assembler-not regexes for aarch64/sve test

2025-06-30 Thread Richard Sandiford
Christopher Bazley writes: > The test added by r16-1671-ge7ff8e8d77df74 passed despite using > regular expressions that would never match real assembly language > output from the compiler. Because the regular expressions were not > expected to match, and didn't, this was not noticeable; however, >

[PATCH] tailc: Handle musttail in case of non-cleaned-up cleanups, especially ASan related [PR120608]

2025-06-30 Thread Jakub Jelinek
Hi! The following testcases FAIL at -O0 -fsanitize=address. The problem is we end up with something like _26 = foo (x_24(D)); [must tail call] // predicted unlikely by early return (on trees) predictor. finally_tmp.3_27 = 0; goto ; [INV] ... : # _6 = PHI <_26(3), _23(D)(4)> # final

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071,PR85788,PR88771,PR106762,PR1

2025-06-30 Thread Qing Zhao
> On Jun 27, 2025, at 15:24, Kees Cook wrote: > > On Fri, Jun 27, 2025 at 01:38:51PM +, Qing Zhao wrote: >> The good news is: With the above simple heuristic and a simple back tracing >> of the CFG, all the >> current testing cases for the following PRs passed without any issue: >>

[PATCH v3] AArch64 SIMD: convert mvn+shrn into mvni+subhn

2025-06-30 Thread Remi Machet
Hi, Attached is the updated patch for the aarch64 conversion of some mvn+shrn patterns into a mvni+subhn. Hopefully attachment fixes the tab issues, the cover letter was updated to better explain what the patch does, code was changed to use emit_move_insn, and testcase was cleaned up per Richa

Re: [PATCH v7 0/3] extend "counted_by" attribute to pointer fields of structures

2025-06-30 Thread Qing Zhao
Hi, Richard or Jakub, Could you please approve the Middle-end part of this patch set? (Patch #2) (The C FE part of the patch, Patch #1 and #3 have been approved by Joseph already; The Middle-end part of the patch has been reviewed by Sid and Richard, I have included all the changes based o

Re: [PATCH] libphobos: Fully enable Darwin/i386 support

2025-06-30 Thread Iain Sandoe
Hi Rainer, > On 30 Jun 2025, at 12:58, Rainer Orth wrote: > > I recently noticed that libphobos isn't enable by default on 32-bit > Darwin with the target triples determined by config.guess. E.g. on a > Darwin 15 system the target triple is something like > i386-apple-darwin15.6.0 while configu

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-30 Thread Steve Kargl
Andre, I've never built gcc for aarch64-freebsd. I was going to suggest doing the full bootstrap, but that seems to be too slow. On amd64, I use ../gcc/configure --prefix=$WDIR \ --enable-languages=c,c++,fortran,lto \ --enable-bootstrap \ --disable-nls \ --disable-libssp \ --disa

[PATCH] c++, v2: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-30 Thread Jakub Jelinek
On Mon, Jun 30, 2025 at 10:51:38AM -0400, Jason Merrill wrote: > > > So, kill the optimization unless idx is INTEGER_CST (am not sure > > > TREE_SIDE_EFFECTS is sufficient because it could be e.g. reading > > > from some > > > VAR_DECL), > > > > !TREE_SIDE_EFFECTS && tree_invariant_p? > > Or perh

Re: [COMMITED] contrib/mklog.py: Fix writing to a global variable

2025-06-30 Thread Alex Coplan
On 29/06/2025 10:29, Filip Kastl wrote: > The last patch of mklog.py put top-level code into function 'main()'. > Because of this, writing to global variable 'root' has to be preceded by > explicitly declaring 'root' as global. Otherwise the write only has a > local effect. > > Without this chang

RE: [PATCH V3] x86: Enable separate shrink wrapping

2025-06-30 Thread Cui, Lili
I investigated the small case in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120881. Pass_final will print "call mount" after "NOTE_INSN_PROLOGUE_END", since shrink_wrap separate doesn’t put it at the beginning of the function, the printing position is changed. Thanks, Lili. From: H.J. Lu

Re: [PATCH] c++: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-30 Thread Jason Merrill
On 6/29/25 2:19 PM, Jason Merrill wrote: On 6/28/25 3:08 AM, Jakub Jelinek wrote: On Fri, Jun 27, 2025 at 06:49:12PM -0400, Jason Merrill wrote: On 6/27/25 5:58 PM, Jakub Jelinek wrote: The following testcase is miscompiled since the introduction of UBSan, cp_build_array_ref COND_EXPR handling

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

2025-06-30 Thread Bill Wendling
Despite our best efforts, the Clang Area Team has decided *not* to accept any of our suggestions to make this feature compatible between Clang and GCC: https://discourse.llvm.org/t/rfc-bounds-safety-in-c-syntax-compatibility-with-gcc/85885/65 They have also firmly rejected the idea of adding f

Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-30 Thread Jeff Law
On 6/30/25 2:18 AM, Richard Biener wrote: On Sat, 28 Jun 2025, Jeff Law wrote: On 6/27/25 12:20 PM, Andrew Pinski wrote: I have been trying to most of the phiopt to over to use match and simplify (via match.pd patterns). Is there an issue why this can't be a match pattern instead? I

Re: [COMMITTED] cobol: Normalize generating and using function_decls.

2025-06-30 Thread Rainer Orth
Hi Robert, > These changes have been shown to generate more sensible code on both > x86_64. > > On x86_64-pc-linux, a bootstrap build of --enable-languages=c,c++,cobol > succeeded. this patch has one change (not listed in ChangeLog) that broke 32-bit Solaris bootstrap: diff --git a/gcc/cobol/par

[COMMITTED 30/40] ada: Ignore ghost predicate in Ada.Strings.Superbounded

2025-06-30 Thread Marc Poulhiès
From: Claire Dross Add an assertion policy to ignore the ghost predicates in Ada.Strings.Superbounded. gcc/ada/ChangeLog: * libgnat/a-strsup.ads: Ignore Ghost_Predicate in the assertion policy. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/a-strsup.ads | 9 +

[COMMITTED 39/40] ada: Refine use of Has_Exit

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques The description of the Has_Exit field in Einfo makes it pretty clear that it can only be meaningful for loop entities. It was however defined in all entities until this patch, which restricts this field to E_Loop. gcc/ada/ChangeLog: * gen_il-gen-gen_entities.adb

[COMMITTED 25/40] ada: Filling in gaps in handling of inherited Pre/Post'Class aspects

2025-06-30 Thread Marc Poulhiès
From: Gary Dismukes The initial set of changes for doing proper mapping of calls to primitive functions in Pre/Post'Class aspects inherited by derived types was not handling some cases (such as when formals are referenced as part of dereferences, certain aspects such as 'Old and 'Access, and cond

[COMMITTED 38/40] ada: Make class-wide Max_Size_In_Storage_Elements return a large value

2025-06-30 Thread Marc Poulhiès
From: Bob Duff Max_Size_In_Storage_Elements is supposed to return a value greater or equal to what is passed for any heap allocation for an object of the type. For a tagged type T, we don't know the allocation size for descendants; therefore T'Class'Max_Size_In_Storage_Elements should return a hu

Re: AFDO/FDO profile comparator

2025-06-30 Thread Jan Hubicka
> Hi Honza, > > On Sun, Jun 29, 2025 at 10:45 PM Jan Hubicka wrote: > > > > > > > > > > > > On 24 Jun 2025, at 7:43 pm, Jan Hubicka wrote: > > > > > > > > External email: Use caution opening links or attachments > > > > > > > > > > > > Hi, > > > > this pass removes early-inlining from afdo pass

Re: [PATCH] c-family: Check backend for argument alignment on stack

2025-06-30 Thread Jason Merrill
On 6/28/25 7:00 AM, H.J. Lu wrote: Since a backend may ignore user type alignment for arguments passed on stack, check backend for argument alignment on stack when evaluating __alignof. I assume that's reflected in DECL_ALIGN, so could we just add PARM_DECL to else if (VAR_OR_FUNCTION_DECL_

[COMMITTED 24/40] ada: Tune name and commend document of a ghost utility routine

2025-06-30 Thread Marc Poulhiès
From: Piotr Trojanek Detection of ghost entities work similarly for names of objects (in assignment statements) and for names of subprograms (in subprogram calls). Tune routine name and its comment to match this similarity. gcc/ada/ChangeLog: * sem_util.ads (Get_Enclosing_Ghost_Entity):

[COMMITTED 31/40] ada: Fix missing rounding in System.Value_R.Scan_Raw_Real

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou The extra digit returned by the function is supposed to be rounded, either by Scan_Integral_Digits or by Scan_Decimal_Digits, but that is not the case when it is the last digit read by Scan_Integral_Digits. The problem is fixed by rounding it in Scan_Decimal_Digits in this ca

[COMMITTED 40/40] ada: Fix Execution_Successful value with exceptions

2025-06-30 Thread Marc Poulhiès
From: Viljar Indus Store the Exit_Code value and use that to generate the Exceution_Successful value in the SARIF report. gcc/ada/ChangeLog: * comperr.adb (Compiler_Abort): Pass the exit code in calls to Output_Messages. * errout.adb (Output_Messages): Add new parameter

[COMMITTED 22/40] ada: Fix bogus error for pragma No_Component_Reordering on record type

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou This happens when the record type has an incomplete declaration before its full declaration and is fixed by calling Find_Type appropriately. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Pragma) : Call Find_Type on the first argument of the pragma. Tested on x8

[COMMITTED 21/40] ada: Remove redundant `gnatls -l` switch

2025-06-30 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * gnatls.adb: remove -l switch Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gnatls.adb | 39 --- 1 file changed, 39 deletions(-) diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index 6fa232

[COMMITTED 29/40] ada: Array aggregates of mutably tagged objects

2025-06-30 Thread Marc Poulhiès
From: Javier Miranda When an array of mutably tagged class-wide types is initialized with an array aggregate, the compiler erroneously rejects it reporting that the type of the aggregate cannot be a class-wide type. In addition, Program_Error is not raised at runtime on array type or record type

Re: [PATCH 1/1] libstdc++: Implement default_accessor from mdspan.

2025-06-30 Thread Jonathan Wakely
On Mon, 30 Jun 2025 at 11:48, Tomasz Kaminski wrote: > > > > On Mon, Jun 30, 2025 at 9:58 AM Tomasz Kaminski wrote: >> >> >> >> On Mon, Jun 30, 2025 at 9:25 AM Luc Grosheintz >> wrote: >>> >>> libstdc++-v3/ChangeLog: >>> >>> * include/std/mdspan (default_accessor): New class. >>>

[COMMITTED 28/40] ada: Sort subprogram declaration in alphabetic order

2025-06-30 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ChangeLog: * sem_util.ads (Get_Enclosing_Object, Get_Enum_Lit_From_Pos, Is_Universal_Numeric_Type): Reorder declarations. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.ads | 42

[COMMITTED 34/40] ada: Fix bug in -gnatw.o switch (unreferenced out parameters)

2025-06-30 Thread Marc Poulhiès
From: Bob Duff Fixes this bug: If -gnatw.o is specified, it is ignored unless -gnatwm is also specified (either directly, or as part of a catch-all switch like -gnatwa). gcc/ada/ChangeLog: * sem_warn.adb (Warn_On_Useless_Assignments): Enable Warn_On_Useless_Assignment in the cas

[COMMITTED 16/40] ada: use pointer decay for socket address type compatibility

2025-06-30 Thread Marc Poulhiès
From: Alexandre Oliva GCC 14 is stricter about type conversions. Taking the address of an array and decaying the array to a pointer to its first element yield the same address, but the types are no longer considered compatible. The socket data structures want decayed pointers rather than address

[COMMITTED 20/40] ada: 'Size'Class and interface types documentation

2025-06-30 Thread Marc Poulhiès
From: Steve Baird Update GNAT RM documentation of the Size'Class aspect. gcc/ada/ChangeLog: * doc/gnat_rm/gnat_language_extensions.rst: Update documentation for mutably tagged types and the Size'Class aspect. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, co

[COMMITTED 32/40] ada: Remove useless Set_Scope calls

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques This patch remove calls to Set_Scope that have no effect because of subsequent calls to Append_Entity, which calls Set_Scope itself. gcc/ada/ChangeLog: * cstand.adb (Make_Aliased_Component, Make_Formal, New_Operator, Create_Standard): Remove useless calls

[COMMITTED 35/40] ada: Remove obsolete comment

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques This patch removes a comment that was left over when an exception declaration was removed. gcc/ada/ChangeLog: * sem_ch5.adb (Analyze_Loop_Statement): Remove obsolete comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch5.adb | 4

[COMMITTED 14/40] ada: Record type Put_Image procedures omitting discriminant values

2025-06-30 Thread Marc Poulhiès
From: Steve Baird If a type T has a partial view with a known_discriminant_part and no user-specified Put_Image aspect specification, then the output generated by T'Put_Image would incorrectly omit the discriminant values. gcc/ada/ChangeLog: * exp_put_image.adb (Build_Record_Put_Image_

[COMMITTED 15/40] ada: include header to declare isalpha in adaint

2025-06-30 Thread Marc Poulhiès
From: Alexandre Oliva A vxworks-specific part of adaint.c calls isalpha without including ctype.h. gcc-14 rejects calls of undeclared functions. Include the required header file when compiling for vxworks. gcc/ada/ChangeLog: * adaint.c [__vxworks]: Include ctype.h. Tested on x86_64-p

[COMMITTED 27/40] ada: Ignore unchecked type conversions while getting enclosing object

2025-06-30 Thread Marc Poulhiès
From: Piotr Trojanek This patch both makes GNAT emit warnings on unused assignments where previously they were suppressed for obscure reasons and synchronizes routine Get_Enclosing_Object with a similar routine in GNATprove (which differs in handling of explicit dereferences). gcc/ada/ChangeLog:

[COMMITTED 10/40] ada: Add entity chain debug printing subprograms

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques This patchs adds two pn-like subprograms that print entity chains. gcc/ada/ChangeLog: * treepr.ads (Print_Entity_Chain, pec, rpec): New subprograms. * treepr.adb (Print_Entity_Chain, pec, rpec): Likewise. Tested on x86_64-pc-linux-gnu, committed on maste

[COMMITTED 33/40] ada: Remove uses of E_Void for subtype declarations

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques This patch slightly reorganizes Analyze_Subtype_Declaration so that the proper Ekind of the new subtype's entity is set before anything else is done with it. A new local subprogram is introduced in the process. gcc/ada/ChangeLog: * sem_ch3.adb (Analyze_Subtype_De

[COMMITTED 36/40] ada: Reuse Snames classification of reserved words

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, Check_Future_Keyword had hardcoded lists of what reserved words were introduced in what versions of the Ada language specification. This patch makes it use the classification in Snames instead. gcc/ada/ChangeLog: * par-util.adb (Check_Future_Ke

[COMMITTED 23/40] ada: Fix detection of ghost objects in unusual procedure calls

2025-06-30 Thread Marc Poulhiès
From: Piotr Trojanek When name of a called procedure involves unusual constructs, e.g. type conversions (like in "Typ (Obj).all"), we must look at the outermost construct to decide whether the name denotes a ghost entity. gcc/ada/ChangeLog: * ghost.adb (Ghost_Entity): Remove; use Get_En

[COMMITTED 09/40] ada: Fix typo in comment

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * atree.ads (Parent_Or_List_Containing): Fix typo. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/atree.ads | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index 615d0

[COMMITTED 13/40] ada: Fix crash on nested access-to-subprogram types

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes a crash on some subprograms with anonymous access-to-subprogram parameters by removing delayed freezing of subprograms in some cases where it wasn't necessary. The -gnatD output for itypes is also improved. gcc/ada/ChangeLog: * sem_ch6.adb (Check

[COMMITTED 26/40] ada: Fix Itype-related predicate check omissions (part 2).

2025-06-30 Thread Marc Poulhiès
From: Steve Baird Add to the previous fix for this issue to better handle cases where GNATProve calls Einfo.Utils.Predicate_Function, passing in an Itype. gcc/ada/ChangeLog: * einfo-utils.adb (Predicate_Function): Look through an Itype if that takes us to another subtype of the

[COMMITTED 11/40] ada: Fix a couple of typos in the sanitizers for Ada

2025-06-30 Thread Marc Poulhiès
From: Jose Ruiz gcc/ada/ChangeLog: * doc/gnat_ugn/gnat_and_program_execution.rst: Fix a couple of minor formatting issues. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst | 6 +++--

[COMMITTED 17/40] ada: Elide copy for calls as values of nonlimited by-reference components

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou ...in aggregates. This prevents a temporary from being created on the primary stack to hold the result of the function calls before it is copied to the component of the aggregate in the nonlimited by-reference case. This requires a small tweak to Check_Function_Writable_Actu

[COMMITTED 04/40] ada: Fix Itype-related predicate check omissions.

2025-06-30 Thread Marc Poulhiès
From: Steve Baird Clean up problematic interactions between Itype subtypes and predicates, which were causing required predicate checks to be (incorrectly) omitted. gcc/ada/ChangeLog: * einfo-utils.adb (Predicate_Function): Improve handling of a case where a predicate specified

[COMMITTED 19/40] ada: Fix detection of ghost objects in assignment statements

2025-06-30 Thread Marc Poulhiès
From: Piotr Trojanek Remove duplicated and inconsistent code for detecting ghost objects on the left-hand side of assignment statements. Fix detection in the presence of attribute references (e.g. "X'Access.all"), function calls (e.g. "F.all"), qualified expressions (e.g. "T'(new Integer'(0)).all

[COMMITTED 18/40] ada: Fix fallout of latest change to aggregate expansion

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou It exposed a small loophole in the Backend_Processing_Possible predicate. gcc/ada/ChangeLog: * exp_aggr.adb (Backend_Processing_Possible.Component_Check): Return False for delayed conditional expressions. Tested on x86_64-pc-linux-gnu, committed on master.

[COMMITTED 12/40] ada: Remove redundant condition in test of System.Val_Real.Integer_To_Real

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou The second condition of the conjunction is redundant with the first. gcc/ada/ChangeLog: * libgnat/s-valrea.adb (Integer_to_Real): Rename to... (Integer_To_Real): ...this. Remove the second condition of the conjunction in the test for the zero value.

[COMMITTED 07/40] ada: Document sanitizers for Ada

2025-06-30 Thread Marc Poulhiès
From: Jose Ruiz gcc/ada/ChangeLog: * doc/gnat_ugn/gnat_and_program_execution.rst: Add the documentation about using sanitizers with Ada code. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_ugn/gnat_and_program_exec

[COMMITTED 02/40] ada: Fix internal error on expression function called for default expression

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou This happens for the default expression of a controlled component when an aggregate is used for the record type, because of a freeze node generated for the expression within an artificial block that is needed to implement the cleanup actions attached to the assignment of the c

[COMMITTED 06/40] ada: Document sanitizers for Ada

2025-06-30 Thread Marc Poulhiès
From: Jose Ruiz gcc/ada/ChangeLog: * doc/gnat_ugn/gnat_and_program_execution.rst: Add the documentation about using sanitizers with Ada code. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../gnat_ugn/gnat_and_program_execution.rs

[COMMITTED 05/40] ada: Remove dead branch from Get_Enclosing_Object

2025-06-30 Thread Marc Poulhiès
From: Piotr Trojanek The dead branch in routine Get_Enclosing_Object was most likely some experiment from the early days of GNATprove. This routine is meant to be called with the LHS of an assignment statement where an implicit dereference is always rewritten into explicit one, regardless if code

[COMMITTED 08/40] ada: Tweak handling of Parent field in Print_Node

2025-06-30 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, Print_Node failed to honor its Prefix_Char formal parameter when printing the Parent field. This had no consequences because Prefix_Char was only used to print members of Nlists, and those don't have a parent in the tree. But this patch fixes it anyway i

[COMMITTED 01/40] ada: Adjust comparisons in if-statements according to coding style

2025-06-30 Thread Marc Poulhiès
From: Johannes Kliemann The Ada coding style requires the use of short circuit forms in if-statements. Use this form consistently for all if-statements. gcc/ada/ChangeLog: * libgnat/s-valuer.adb: Switch missing if-statements to short-circuit form. * libgnat/i-cpoint.adb:

[COMMITTED 03/40] ada: Fix internal error on Ghost aspect applied to Big_Integers

2025-06-30 Thread Marc Poulhiès
From: Eric Botcazou That's a regression introduced by the rewrite of the finalization machinery, in the form of dangling references to Master_Node entities remaining in the tree after the removal of the ignored Ghost code. gcc/ada/ChangeLog: * exp_ch7.adb (Process_Transient_In_Scope): B

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-30 Thread Andre Vehreschild
Hi Steve, how to you get a recent gcc compile on aarch64-freebsd-14.3 ? I am seeing several issues in core libraries of gcc that are far away from where I touched the compiler. I am configuring with: configure --disable-multilib\ --enable-stage1-languages=c,fortran,c++\

[Fortran, Patch, PR120846, v1] Fix ICE when a function is called more than once in a coarray expression.

2025-06-30 Thread Andre Vehreschild
Hi all, attached patch fixes an ICE when in an expression with a coindex a function was used more than once. E.g. coarray(mod( something ), mod( something else ))[i] ICE'd because a component for aliasing the second mod() could not be created. Regtests ok on x86_64-pc-linux-gnu / F41. Ok for main

Re: [Fortran, Patch, PR120843, v2] Fix reject valid, because of inconformable coranks

2025-06-30 Thread Andre Vehreschild
Hi all, here now the version of the patch that seems to be more complete. Regtests ok on x86_64-pc-linux-gnu / F41. Ok for mainline and later backport to gcc-15? Regards, Andre On Fri, 27 Jun 2025 15:44:20 +0200 Andre Vehreschild wrote: > I take this patch back. It seems to be incomp

Re: [PATCH v4 2/6] dwarf: create annotation DIEs for btf tags

2025-06-30 Thread Richard Biener
On Tue, Jun 10, 2025 at 11:41 PM David Faust wrote: > > The btf_decl_tag and btf_type_tag attributes provide a means to annotate > declarations and types respectively with arbitrary user provided > strings. These strings are recorded in debug information for > post-compilation uses, and despite t

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-06-30 Thread Richard Biener
On Fri, Jun 27, 2025 at 3:39 PM Qing Zhao wrote: > > Hi, > > A status update on this patch: (Actually a good news!) > > > On Jun 10, 2025, at 11:32, Qing Zhao wrote: > > > > > > > > >>> > >>> It's difficult to do any meaningful pruning I think. Consider > >>> > >>> if (i == -1) > >>> tem

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-06-30 Thread Richard Biener
On Tue, Jun 10, 2025 at 5:28 PM Qing Zhao wrote: > > > > > On Jun 10, 2025, at 09:37, Richard Biener > > wrote: > > > > On Mon, Jun 9, 2025 at 8:06 PM Qing Zhao wrote: > >> > >> > >> > >>> On Jun 6, 2025, at 03:31, Richard Biener > >>> wrote: > >>> > >>> On Fri, May 30, 2025 at 5:13 PM Qing Z

Re: [PATCH 1/3]middle-end: support vec_cbranch_any and vec_cbranch_all [PR118974]

2025-06-30 Thread Richard Biener
On Mon, 9 Jun 2025, Tamar Christina wrote: > This patch introduces two new vector cbranch optabs vec_cbranch_any and > vec_cbranch_all. > > To explain why we need two new optabs let me explain the current cbranch and > its > limitations and what I'm trying to optimize. So sorry for the long emai

[PATCH] libphobos: Fully enable Darwin/i386 support

2025-06-30 Thread Rainer Orth
I recently noticed that libphobos isn't enable by default on 32-bit Darwin with the target triples determined by config.guess. E.g. on a Darwin 15 system the target triple is something like i386-apple-darwin15.6.0 while configure.tgt only matches i?86-*-darwin1[2-7]. This patch also allows such m

[r16-1742 Regression] FAIL: 25_algorithms/inplace_merge/constrained.cc -std=gnu++26 (test for excess errors) on Linux/x86_64

2025-06-30 Thread haochen.jiang
On Linux/x86_64, 9d3467a14bbd75469f114b047590ebbffa4a9c8b is the first bad commit commit 9d3467a14bbd75469f114b047590ebbffa4a9c8b Author: Patrick Palka Date: Fri Jun 27 13:53:26 2025 -0400 libstdc++: Directly implement ranges::inplace_merge [PR100795] caused FAIL: 25_algorithms/inplace_m

Re: [PATCH 1/2] allow contraction to synthetic single-element vector FMA

2025-06-30 Thread Richard Biener
On Mon, Jun 30, 2025 at 9:54 AM Richard Biener wrote: > > On Fri, Jun 27, 2025 at 3:45 PM Alexander Monakov wrote: > > > > > > On Fri, 27 Jun 2025, Richard Biener wrote: > > > > > > I am testing partial fixes for these issues. > > > > > > Can you check again after r16-1731-g08bdb6b4a32f1f? > > >

[PATCH] Handle SLP build operand swapping for ternaries and calls

2025-06-30 Thread Richard Biener
The following adds SLP build operand swapping for .FMA which is a ternary operator and a call. The current code only handles binary operators in assignments, thus the patch extends this to handle both calls and assignments as well as binary and ternary operators. Bootstrapped and tested on x86_64

Re: [PATCH] fold-mem-offsets: Convert from DF to RTL-SSA

2025-06-30 Thread Richard Sandiford
Christoph Müllner writes: > This patch converts the fold-mem-offsets pass from DF to RTL-SSA. > Along with this conversion, the way the pass collects information > was completely reworked. Instead of visiting each instruction multiple > times, this is now down only once. > > Most significant chan

  1   2   >