[PATCH] Apply lambda section attributes to static thunks

2024-12-12 Thread Campbell Suter
Each lambda that can be converted to a plain function pointer has a thunk generated for it, which invokes the body of the lambda function. When a section attribute is added to a lambda function, it only applies to the body of the lambda function, and not the thunk. When a lambda is only ever used

[PATCH v1] RISC-V: Make vector strided load alias all other memories

2024-12-12 Thread pan2 . li
From: Pan Li The vector strided load doesn't include the (mem:BLK (scratch)) to alias all other memories. It will make the alias analysis only consider the base address of strided load and promopt the store before the strided load. For example as below #define STEP 10 char d[225]; int e

[COMMITTED] Fix -fstrict-flex-arrays documentation, again [PR111659]

2024-12-12 Thread Sandra Loosemore
My previous attempt to fix this issue ended up garbling the text instead. Trying again to make the descriptions of the attribute and command-line option consistent. gcc/ChangeLog PR middle-end/111659 * doc/extend.texi (Common Variable Attributes): Copy-edit description of

Re: [PATCH] c++: Only prune capture proxies for constant variables at instantiation time [PR114292]

2024-12-12 Thread Marek Polacek
On Thu, Dec 12, 2024 at 07:07:38PM +, Simon Martin wrote: > We currently ICE upon the following valid (under -Wno-vla) code > > === cut here === > void f(int c) { > constexpr int r = 4; > [&](auto) { int t[r * c]; }(0); > } > === cut here === > > The problem is that when parsing the lambd

[committed] libstdc++: Fix some -Wsign-compare warnings in the testsuite

2024-12-12 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * testsuite/23_containers/unordered_map/modifiers/reserve.cc: Cast to size_t to fix -Wsign-compare warning. * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Likewise. * testsuite/23_containers/unordered_set/insert/move_ra

[committed] libstdc++: Fix -Wsign-compare warnings in bits/hashtable_policy.h

2024-12-12 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/hashtable_policy.h (_Local_iterator_base): Fix -Wsign-compare warnings. --- Tested x86_64-linux. Pushed to trunk. libstdc++-v3/include/bits/hashtable_policy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-12 Thread Martin Uecker
Am Donnerstag, dem 12.12.2024 um 13:59 -0800 schrieb Bill Wendling: > On Thu, Dec 12, 2024 at 1:28 PM Martin Uecker wrote: > > > > Am Montag, dem 09.12.2024 um 16:20 + schrieb Qing Zhao: > > > > > > > On Dec 7, 2024, at 03:57, Martin Uecker wrote: > > > > > > > > Am Freitag, dem 06.12.2024

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-12 Thread Bill Wendling
On Thu, Dec 12, 2024 at 1:28 PM Martin Uecker wrote: > > Am Montag, dem 09.12.2024 um 16:20 + schrieb Qing Zhao: > > > > > On Dec 7, 2024, at 03:57, Martin Uecker wrote: > > > > > > Am Freitag, dem 06.12.2024 um 16:13 + schrieb Qing Zhao: > > > > > > > > > On Dec 6, 2024, at 10:56, Martin

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-12-12 Thread Martin Uecker
Am Montag, dem 09.12.2024 um 16:20 + schrieb Qing Zhao: > > > On Dec 7, 2024, at 03:57, Martin Uecker wrote: > > > > Am Freitag, dem 06.12.2024 um 16:13 + schrieb Qing Zhao: > > > > > > > On Dec 6, 2024, at 10:56, Martin Uecker wrote: > > > > > > > > Am Freitag, dem 06.12.2024 um 14:1

[committed] libstdc++: Fix typo in comment in src/c++17/fs_dir.cc

2024-12-12 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * src/c++17/fs_dir.cc: Fix typo in comment. --- Pushed as obvious. libstdc++-v3/src/c++17/fs_dir.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++17/fs_dir.cc b/libstdc++-v3/src/c++17/fs_dir.cc index 8fe9e5e4cc8..f0529f927

[PATCH] c++: tf_partial and instantiate_template [PR117887]

2024-12-12 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk only? The original testcase from the PR seems to compile successfully on the release branches so I'm avoiding doing anything on the release branches for now. -- >8 -- Ever since r15-3530-gdfb63765e994be the extra-args

[PATCH 2/2] c++: constexpr potentiality of CAST_EXPR [PR117925]

2024-12-12 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/14? This fixes the testcase in the PR but doesn't thoroughly fix the underlying issue since if we replace fnPtr with e.g. a constexpr variable so that the callee is truly potentially constant then the ICE reappears (due

[PATCH 1/2] c++: relax ICE for unexpected trees during constexpr [PR117925]

2024-12-12 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhpas 14? -- >8 -- When we encounter an unexpected (likely templated) tree code during constexpr evaluation we currently ICE even in release mode. But it seems more user-friendly to just gracefully treat the exp

[committed] hppa: Remove extra clobber from divsi3, udivsi3, modsi3 and umodsi3 patterns

2024-12-12 Thread John David Anglin
Tested on hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu. Committed to trunk. Dave --- hppa: Remove extra clobber from divsi3, udivsi3, modsi3 and umodsi3 patterns The $$divI, $$divU, $$remI and $$remU millicode calls clobber r1, r26, r25 and the return link register (r31 or r2). We don't need

[COMMITTED] Regenerate attr-urls.def.

2024-12-12 Thread Sandra Loosemore
I noticed there is this new generated file that needs to be updated by "make regenerate-attr-urls" similarly to "make regenerate-opt-urls", but nobody had done that recently as the buildbot does not nag about it yet. gcc/ChangeLog * attr-urls.def: Regenerate. --- gcc/attr-urls.def | 9 ++

[COMMITTED] Clean up documentation of -Wsuggest-attribute= [PR115532]

2024-12-12 Thread Sandra Loosemore
The list of -Wsuggest-attribute= variants was out of date in the option summary (and getting too long to fit on one line), and an index entry was missing for -Wsuggest-attribute=returns_nonnull. gcc/c-family/ChangeLog PR c/115532 * c.opt.urls: Regenerated. gcc/ChangeLog PR

[PATCH] c++: current inst w/ indirect dependent bases [PR117993]

2024-12-12 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? The older regression does not seem worth fixing. -- >8 -- In the first testcase we're overeagerly diagnosing qualified name lookup failure for f from the current instantiation B::C ahead of time because we (correctly

[PATCH] c++: Only prune capture proxies for constant variables at instantiation time [PR114292]

2024-12-12 Thread Simon Martin
We currently ICE upon the following valid (under -Wno-vla) code === cut here === void f(int c) { constexpr int r = 4; [&](auto) { int t[r * c]; }(0); } === cut here === The problem is that when parsing the lambda body, and more specifically the multiplication, we mark the lambda as LAMBDA_EXP

[PATCH] c++: ICE in TARGET_EXPR evaluation in cp_fold_r [PR117980]

2024-12-12 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This ICE started with the recent prvalue optimization (r15-6052). In cp_fold_r we have: if (tree &init = TARGET_EXPR_INITIAL (stmt)) { cp_walk_tree (&init, cp_fold_r, data, NULL); // ...

Re: [PATCH 1/2]AArch64: Add CMP+CSEL and CMP+CSET for cores that support it

2024-12-12 Thread Andrew Pinski
On Wed, Dec 11, 2024 at 4:17 AM Richard Earnshaw (lists) wrote: > > On 11/12/2024 09:54, Tamar Christina wrote: > >> -Original Message- > >> From: Richard Sandiford > >> Sent: Wednesday, December 11, 2024 9:50 AM > >> To: Tamar Christina > >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Ear

Re: [PATCH] Fix toplevel-asm-1.c failure for riscv

2024-12-12 Thread Jakub Jelinek
On Thu, Dec 12, 2024 at 06:05:31PM +0100, Andreas Schwab wrote: > Don't use 'c' modifier with a symbolic address. The riscv target doesn't > accept it as a CONSTANT_ADDRESS_P and doesn't support 'c' with SYMBOL_REF. > > * c-c++-common/toplevel-asm-1.c: Remove 'c' from %3 and %4. The intent

[PATCH] Fix toplevel-asm-1.c failure for riscv

2024-12-12 Thread Andreas Schwab
Don't use 'c' modifier with a symbolic address. The riscv target doesn't accept it as a CONSTANT_ADDRESS_P and doesn't support 'c' with SYMBOL_REF. * c-c++-common/toplevel-asm-1.c: Remove 'c' from %3 and %4. --- gcc/testsuite/c-c++-common/toplevel-asm-1.c | 2 +- 1 file changed, 1 insert

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-12-12 Thread Jennifer Schmitz
> On 6 Dec 2024, at 08:41, Jennifer Schmitz wrote: > > > >> On 5 Dec 2024, at 20:07, Richard Sandiford wrote: >> >> External email: Use caution opening links or attachments >> >> >> Jennifer Schmitz writes: On 5 Dec 2024, at 11:44, Richard Biener wrote: External email: U

Re: [PATCH v2] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-12 Thread Jonathan Wakely
On Thu, 12 Dec 2024 at 14:24, Giuseppe D'Angelo wrote: > > Hi, > > On 12/12/2024 01:04, Jonathan Wakely wrote: > >> I'll prepare a patch to do that, > > Et voila: > > https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671432.html > > Thanks! All done, new patch is attached. Thanks. Do you ha

Re: [PATCH] testsuite: arm: Update expected assembler for pr43920-2.c test

2024-12-12 Thread Richard Earnshaw (lists)
On 12/12/2024 13:47, Torbjorn SVENSSON wrote: On 2024-12-12 12:02, Richard Earnshaw (lists) wrote: On 10/11/2024 10:02, Torbjörn SVENSSON wrote: Ok for trunk, releases/gcc-12, releases/gcc-13 and releases/gcc-14? -- In version 6-2017-q1-update of the "GNU Arm Embedded Toolchain" build, ther

[Ada] Fix PR ada/117996

2024-12-12 Thread Eric Botcazou
This fixes a precondition failure triggered when the Eigenvalues routine of Ada.Numerics.Generic_Real_Arrays is instantiated with -gnata, beause it calls Sort_Eigensystem on an empty vector. Tested on x86-64/Linux, applied on all active branches. 2024-12-12 Eric Botcazou PR ada/117

Re: [PATCH] match.pd: Defer some CTZ/CLZ foldings until after ubsan pass for -fsanitize=builtin [PR115127]

2024-12-12 Thread Richard Biener
> Am 12.12.2024 um 11:28 schrieb Jakub Jelinek : > > Hi! > > As the following testcase shows, -fsanitize=builtin instruments the > builtins in the ubsan pass which is done shortly after going into > SSA, but if optimizations optimize the builtins away before that, > nothing is instrumented.

[PATCH 3/3 v2] lto: Remap node order for stability.

2024-12-12 Thread Michal Jires
On Sun, 2024-11-17 at 19:15:04 +, Jan Hubicka wrote: > > I would suggest renaming produce_asm to produce_symbol_asm > and making produce_asm wrapper which passes fn=NULL and output_order=-1, > so we do not have odd parameters everywhere in streaming code. > > OK with this change. > Honza Ap

[PATCH 2/3 v2] dwarf: lto: Allow die_symbol outside of comp_unit.

2024-12-12 Thread Michal Jires
On Wed, 2024-11-27 at 15:18:39 +, Richard Biener wrote: > I'm not sure it will work this way together with the output_die hunk, > instead > assemblers likely expect all this to happen close to the actual label > emission, so I suggest to only split out the visibiltiy/globalizing fancy > and emi

Re: [COMMITTED] i386: regenerate i386.opt.urls

2024-12-12 Thread Sandra Loosemore
On 12/12/24 03:53, Sam James wrote: r15-6128-gfa878dc8c45fa3 missed the regeneration of the URL doc map, so regenerate it here to make the buildbots happy. I apologize for this breakage. :-( Can someone explain how I can detect this problem *before* submitting patches, and how to fix it, so

[patch,avr.applied] Fix memcpy from address-spaces

2024-12-12 Thread Georg-Johann Lay
* rampz_rtx et al. were missing MEM_VOLATILE_P. This is needed because avr_emit_cpymemhi is setting RAMPZ explicitly with an own insn. * avr_out_cpymem was missing a final RAMPZ = 0 on EBI devices. This only affects the __flash1 ... __flash5 spaces since the other ASes use different routines,

Re: [PATCH 1/2]AArch64: Add CMP+CSEL and CMP+CSET for cores that support it

2024-12-12 Thread Kyrylo Tkachov
Thanks for doing this Tamar, > On 11 Dec 2024, at 10:54, Tamar Christina wrote: > >> -Original Message- >> From: Richard Sandiford >> Sent: Wednesday, December 11, 2024 9:50 AM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >> ; ktkac...@gcc.gnu.org >> Sub

Re: [PATCH] Add COBOL to gcc

2024-12-12 Thread Jakub Jelinek
On Wed, Dec 11, 2024 at 11:39:51AM -0500, James K. Lowden wrote: > On Thu, 12 Dec 2024 15:07:35 +0100 > Richard Biener wrote: > > > On Wed, Dec 11, 2024 at 4:19?PM James K. Lowden > > wrote: > > > > > > I think the term of art is "ping"? > > > > > > If GCC needs something from me to proceed with

Re: [PATCH] Add COBOL to gcc

2024-12-12 Thread Richard Biener
On Thu, Dec 12, 2024 at 4:05 PM James K. Lowden wrote: > > On Thu, 12 Dec 2024 15:07:35 +0100 > Richard Biener wrote: > > > On Wed, Dec 11, 2024 at 4:19?PM James K. Lowden > > wrote: > > > > > > I think the term of art is "ping"? > > > > > > If GCC needs something from me to proceed with this, p

Re: [PATCH] Add COBOL to gcc

2024-12-12 Thread James K. Lowden
On Thu, 12 Dec 2024 15:07:35 +0100 Richard Biener wrote: > On Wed, Dec 11, 2024 at 4:19?PM James K. Lowden > wrote: > > > > I think the term of art is "ping"? > > > > If GCC needs something from me to proceed with this, please tell me > > what it is. > > I think we're waiting on the rest of the

Re: [PATCH] testsuite: arm: Update expected RTL for reg_equal_test.c test

2024-12-12 Thread Richard Earnshaw (lists)
On 12/12/2024 13:36, Torbjorn SVENSSON wrote: On 2024-12-12 12:26, Richard Earnshaw (lists) wrote: On 10/11/2024 13:38, Torbjörn SVENSSON wrote: Hi Richard, I'm not sure if I'm doing something wrong here, or if it was an oversight when doing the update in r12-8108-g62082d278d1. Anyway, the

Re: [PATCH 4/7 v3] lto: Implement ltrans cache

2024-12-12 Thread Jan Hubicka
> gcc/ChangeLog: > > * Makefile.in: Add lto-ltrans-cache.o. > * lto-wrapper.cc: Use ltrans cache. > * lto-ltrans-cache.cc: New file. > * lto-ltrans-cache.h: New file. OK. > + > +/* Computes checksum for given file, returns NULL_CHECKSUM if not > + possible. > + */ As a f

Re: [PATCH v2] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-12 Thread Giuseppe D'Angelo
Hi, On 12/12/2024 01:04, Jonathan Wakely wrote: I'll prepare a patch to do that, Et voila: https://gcc.gnu.org/pipermail/gcc-patches/2024-December/671432.html Thanks! All done, new patch is attached. These mem-initializers are in the wrong order (we had an existing constructor with the sam

Re: [PATCH] Add COBOL to gcc

2024-12-12 Thread Richard Biener
On Wed, Dec 11, 2024 at 4:19 PM James K. Lowden wrote: > > I think the term of art is "ping"? > > If GCC needs something from me to proceed with this, please tell me what > it is. I think we're waiting on the rest of the patches adding the Cobol frontend at this point. Richard. > --jkl > > On T

Re: [PATCH] ifcombine field-merge: set upper bound for get_best_mode

2024-12-12 Thread Richard Biener
On Wed, Dec 11, 2024 at 6:32 PM Alexandre Oliva wrote: > > On Dec 11, 2024, Richard Biener wrote: > > > I think These 0, 0 args are supposed to indicate Maximum extent of the > > resulting Access > > Thanks, that looks much better indeed. > > > A bootstrap on aarch64-linux-gnu revealed that somet

Re: [PATCH 1/2] Refactor final_value_replacement_loop [PR90594]

2024-12-12 Thread Feng Xue OS
Updated the patch according to comments. OK for trunk? Thanks, Feng --- gcc/ PR tree-optimization/90594 * tree-scalar-evolution.cc (get_scev_final_value): New function. (apply_scev_final_value_replacement): Likewise. (final_value_replacement_loop): Call new function

Re: [PATCH] testsuite: arm: Update expected assembler for pr43920-2.c test

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-12 12:02, Richard Earnshaw (lists) wrote: On 10/11/2024 10:02, Torbjörn SVENSSON wrote: Ok for trunk, releases/gcc-12, releases/gcc-13 and releases/gcc-14? -- In version 6-2017-q1-update of the "GNU Arm Embedded Toolchain" build, there are 2 pop instructions. In version 7-2018-q2

[Fortran, Patch, PR116669, v1] Fix ICE in deallocation of derived types having cyclic dependencies

2024-12-12 Thread Andre Vehreschild
Hi all, attached patch improves analysis of cycles in derived types, i.e. type dependencies ala: type(T) type(T2), allocatable :: c end type type(T2) type(T), allocatable :: t end type are now detected and deallocating an object that is of any of the types now no longer crashes the compiler

Re: [PATCH] testsuite: arm: Update expected RTL for reg_equal_test.c test

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-12 12:26, Richard Earnshaw (lists) wrote: On 10/11/2024 13:38, Torbjörn SVENSSON wrote: Hi Richard, I'm not sure if I'm doing something wrong here, or if it was an oversight when doing the update in r12-8108-g62082d278d1. Anyway, the commit message suggest that it's only the const

Re: [Ping^2][PATCH v2 00/12] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs.

2024-12-12 Thread Tejas Belagod
Ping^2 Thanks, Tejas. On 11/4/24 10:06 AM, Tejas Belagod wrote: Ping. Thanks, Tejas. On 10/18/24 11:59 AM, Tejas Belagod wrote: Hi Jakub, Just wanted to add that I'm sorry for the delay in respinning the patchset - I was caught up with another piece of work. Thanks for the reviews so far

Re: [PATCH] arm: [MVE intrinsics] remove V2DF from MVE_vecs iterator

2024-12-12 Thread Richard Earnshaw (lists)
On 14/11/2024 10:42, Christophe Lyon wrote: V2DF is not supported by MVE, so remove it from the only iterator which contains it. gcc/ChangeLog: * config/arm/iterators.md (MVE_vecs): Remove V2DF. --- gcc/config/arm/iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [PATCH] arm: [MVE intrinsics] Fix condition for vec_extract patterns

2024-12-12 Thread Richard Earnshaw (lists)
On 14/11/2024 10:41, Christophe Lyon wrote: Remove floating-point condition from mve_vec_extract_sext_internal and mve_vec_extract_zext_internal, since the MVE_2 iterator does not include any FP mode. gcc/ChangeLog: * config/arm/mve.md (mve_vec_extract_sext_internal): Fix condit

Re: [PATCH 7/7]AArch64: Implement vector concat of partial SVE vectors

2024-12-12 Thread Richard Sandiford
Tamar Christina writes: > Hi All, > > This patch adds support for vector constructor from two partial SVE vectors > into > a full SVE vector. It also implements support for the standard vec_init obtab > to > do this. > > gcc/ChangeLog: > > PR target/96342 > * config/aarch64/aarch64-s

[PATCH v2 5/5] RISC-V: Add new constraint R for register even-odd pairs

2024-12-12 Thread Kito Cheng
Although this constraint is not currently used for any instructions, it is very useful for custom instructions. Additionally, some new standard extensions (not yet upstream), such as `Zilsd` and `Zclsd`, are potential users of this constraint. Therefore, I believe there is sufficient justification

[PATCH v2 4/5] RISC-V: Implment N modifier for printing the register number rather than the register name

2024-12-12 Thread Kito Cheng
The modifier `N`, to print the raw encoding of a register. This is used when using `.insn , `, where the user wants to pass a value to the instruction in a known register, but where the instruction doesn't follow the existing instruction formats, so the assembly parser is not expecting a register n

[PATCH v2 3/5] RISC-V: Rename internal operand modifier N to n

2024-12-12 Thread Kito Cheng
Here is a purposal that using N for printing register encoding number, so let rename the existing internal operand modifier `N` to `n`. gcc/ChangeLog: * config/riscv/corev.md (*cv_branch): Update modifier. (*branch): Ditto. * config/riscv/riscv.cc (riscv_print_operand): Up

[PATCH v2 2/5] RISC-V: Add cr and cf constraint

2024-12-12 Thread Kito Cheng
gcc/ChangeLog: * config/riscv/constraints.md (cr): New. (cf): New. * config/riscv/riscv.h (reg_class): Add RVC_GR_REGS and RVC_FP_REGS. (REG_CLASS_NAMES): Ditto. (REG_CLASS_CONTENTS): Ditto. * doc/md.texi: Document cr and cf constraint.

[PATCH v2 1/5] RISC-V: Rename constraint c0* to k0*

2024-12-12 Thread Kito Cheng
Rename those constraint since we want define other constraint start with `c`, those constraints are internal and undocumented, so it's fine to rename. gcc/ChangeLog: * config/riscv/constraints.md (c01): Rename to... (k01): ...this. (c02): Rename to... (k02): ...thi

[PATCH v2 0/5] New Asm Constraints and Modifiers - RVC, Raw Encodings, Pairs

2024-12-12 Thread Kito Cheng
This patch set implements the proposal from riscv-c-api-doc[1]. It adds two constraints and one modifier with the goal of improving the user experience for `.insn`, making it easier for users to experiment with new ISA extensions. A quick summary of this patch set: - Add R constraint for even-odd

Re: [PATCH] testsuite: arm: Use -mtune=cortex-m4 for thumb-ifcvt.c test

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 12:42, Richard Earnshaw (lists) wrote: On 21/11/2024 19:01, Torbjörn SVENSSON wrote: Ok for trunk and releases/gcc-14? -- On Cortex-M4, the code generated is: cmp r0, r1 ittene lslne r0, r0, r1 asrne r0, r0, #1 moveq r0, r1 add

Re: [PATCH] testsuite: arm: Fix build error for thumb2-slow-flash-data-3.c test

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 12:46, Richard Earnshaw (lists) wrote: On 21/11/2024 17:23, Torbjörn SVENSSON wrote: I'm not sure how to verify that adding the parameter won't destroy the test. I've tried to repoduce the ICE on old Arm builds of arm-none-eabi, but none of them ICE. I suppose it should be safe

[Patch] OpenMP: Enable has_device_addr clause for 'dispatch' in C/C++

2024-12-12 Thread Tobias Burnus
This simple patch improves the diagnostic and prepares for some future work. Note: has_device_addr for C is permitted but pointless, for C++ it requires some follow-up work to be useful. For C, a hint that 'need_device_addr' it not valid has been added and for 'has_device_addr' a middle-end warnin

Re: [PATCH v2] testsuite: arm: Check that a far jump is used in thumb1-far-jump-2.c

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 12:41, Richard Earnshaw (lists) wrote: On 22/11/2024 09:37, Torbjörn SVENSSON wrote: Changes since v1: - Rewrote the padding instructions in the macro to instead write to volatile memory. This ensures that every expansion of the base macro is exactly 2 bytes. If the `GO(

Re: [PATCH v2 2/5] testsuite: arm: Use -march=unset for bfloat16_scalar* tests

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 12:57, Richard Earnshaw (lists) wrote: On 21/11/2024 14:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/bfloat16_scalar_1_1.c: Use effective-target

Re: [PATCH 3/7]AArch64: Disable `omp declare variant' tests for aarch64 [PR96342]

2024-12-12 Thread Richard Sandiford
Tamar Christina writes: > Hi All, > > These tests are x86 specific and shouldn't be run for aarch64. > > gcc/testsuite/ChangeLog: > > PR target/96342 > * c-c++-common/gomp/declare-variant-14.c: Make i?86 and x86_64 target > only test. > * gfortran.dg/gomp/declare-variant-14

Re: [PATCH v2 4/5] testsuite: arm: Use effective-target for its.c test [PR94531]

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 19:52, Richard Earnshaw (lists) wrote: On 21/11/2024 14:24, Torbjörn SVENSSON wrote: The test case gcc.target/arm/its.c was created together with restriction of IT blocks for Cortex-M7. As the test case fails on all tunes that does not match Cortex-M7, explicitly test it for Cor

Re: [PATCH v2 3/5] testsuite: arm: Use -mcpu=unset when overriding -march

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 13:03, Richard Earnshaw (lists) wrote: On 21/11/2024 14:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.dg/pr41574.c: Added option "-mcpu=unset". * gcc.dg/

Re: [PATCH v2 5/5] testsuite: arm: Use effective-target for pr96939 test

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 19:54, Richard Earnshaw (lists) wrote: On 21/11/2024 14:24, Torbjörn SVENSSON wrote: Update test case to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/lto/pr96939_0.c: Use effective-target ar

Re: [PATCH 2/7]AArch64: Add SVE support for simd clones [PR96342]

2024-12-12 Thread Richard Sandiford
Tamar Christina writes: > diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc > b/gcc/config/aarch64/aarch64-sve-builtins.cc > index > 0fec1cd439e729dca495aac4dea054a25ede20a7..e6c2bdeb00681848a838009c833cfe3271a94049 > 100644 > --- a/gcc/config/aarch64/aarch64-sve-builtins.cc > +++ b/gcc/c

Re: [PATCH v2 1/5] testsuite: arm: Use effective-target for pr56184.C and pr59985.C

2024-12-12 Thread Torbjorn SVENSSON
On 2024-12-04 12:53, Richard Earnshaw (lists) wrote: On 21/11/2024 14:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * g++.dg/other/pr56184.C: Use effective-target arm_arch_

Re: [PATCH] testsuite: arm: Update expected RTL for reg_equal_test.c test

2024-12-12 Thread Richard Earnshaw (lists)
On 10/11/2024 13:38, Torbjörn SVENSSON wrote: Hi Richard, I'm not sure if I'm doing something wrong here, or if it was an oversight when doing the update in r12-8108-g62082d278d1. Anyway, the commit message suggest that it's only the constant that is of interrest, so I updated the test to only c

Re: [patch] Allow target to chose address-space for artificial rodata lookup tables.

2024-12-12 Thread Georg-Johann Lay
For the avr.cc part, the __flashx named address space has been approved, which means that the natural choice in the target hook would be ADDR_SPACE_FLASHX instead of ADDR_SPACE_MEMX: +/* Implement `TARGET_ADDR_SPACE_FOR_ARTIFICIAL_RODATA'. */ + +static addr_space_t +avr_addr_space_for_artificia

Re: [PATCH] testsuite: arm: Update expected assembler for pr43920-2.c test

2024-12-12 Thread Richard Earnshaw (lists)
On 10/11/2024 10:02, Torbjörn SVENSSON wrote: Ok for trunk, releases/gcc-12, releases/gcc-13 and releases/gcc-14? -- In version 6-2017-q1-update of the "GNU Arm Embedded Toolchain" build, there are 2 pop instructions. In version 7-2018-q2-update, the next version that still have a binary build

[PATCH] docs: Fix [us]abd pattern name.

2024-12-12 Thread Robin Dapp
Hi, the uabd and sabd optab names in the docs are missing a 3 suffix (for their three arguments). This patch adds it. Should be obvious enough so going push it in some days unless there are complaints. Regards Robin gcc/ChangeLog: * doc/md.texi: Add "3" suffix. --- gcc/doc/md.texi |

[COMMITTED] i386: regenerate i386.opt.urls

2024-12-12 Thread Sam James
r15-6128-gfa878dc8c45fa3 missed the regeneration of the URL doc map, so regenerate it here to make the buildbots happy. gcc/ChangeLog: * config/i386/i386.opt.urls: Regenerate. --- Committed as obvious, as the buildbots kept emailing and thought it better to get it out of the way. gcc/co

[PATCH] RISC-V: Emit vector shift pattern for const_vector [PR117353].

2024-12-12 Thread Robin Dapp
Hi, in PR117353 and PR117878 we expand a const vector during reload. For this we use an unpredicated left shift. Normally an insn like this is split but as we introduce it late and cannot create pseudos anymore it remains unpredicated and is not recognized by the vsetvl pass (where we expect all

Re: [PATCH v2 0/4] arm: [MVE intrinsics] Rework intrinsics for loads/stores/ tuples

2024-12-12 Thread Richard Earnshaw (lists)
On 09/12/2024 15:05, Christophe Lyon wrote: Changes v1->v2: - Keep MAX_TUPLE_SIZE=0 and update accesses to acle_vector_types accordingly. - implement arm_array_mode in patch 4/4 instead of 2/4 to avoid temporary regressions when running the testsuite at patch 2/4 (helps future bisects)

Re: [patch,avr] Add new 24-bit address space __flashx

2024-12-12 Thread Denis Chertykov
ср, 11 дек. 2024 г. в 16:56, Georg-Johann Lay : > > This patch adds __flashx as a new named address space that allocates > objects in .progmemx.data. The handling is mostly the same or similar > to that of 24-bit space __memx, except that the output routines are > simpler and more efficient. Load

[RFC PATCH] expr, gimplify: Optimize !complete_p CONSTRUCTOR initialization [PR116416]

2024-12-12 Thread Jakub Jelinek
Hi! As we don't have a SRA fix for PR117971, I thought I'd try to improve it using an optimization during gimplification. This is about the tree-ssa/pr78687.C testcase, which is a variant with struct option_1 { void *a, *b, *c, *d, *e; }; struct option_2 { }; variants. Since the PR116416

[committed] crc: Comment spelling fix

2024-12-12 Thread Jakub Jelinek
Hi! "replacement is succeeded" doesn't look correct to me (though, sure, I'm not native English speaker), this patch drops the is. 2024-12-12 Jakub Jelinek * gimple-crc-optimization.cc (crc_optimization::optimize_crc_loop): Comment spelling fix, is succeeded -> succeeded. ---

[COMMITTED 27/30] ada: Avoid going through symlinks in the json report

2024-12-12 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * errout.adb (Write_JSON_Location): Avoid going through symbolic links when printing the full name. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/errout.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[COMMITTED 23/30] ada: Fix internal error on loop parameter specifications

2024-12-12 Thread Marc Poulhiès
From: Piotr Trojanek Originally loop parameter specification only occurred in loops, but now it also occurs in quantified expressions. This patch guards against flagging non-loop nodes as null loop statements. This was causing internal compiler errors that were only visible with switch -gnatdk, w

[PATCH] match.pd: Defer some CTZ/CLZ foldings until after ubsan pass for -fsanitize=builtin [PR115127]

2024-12-12 Thread Jakub Jelinek
Hi! As the following testcase shows, -fsanitize=builtin instruments the builtins in the ubsan pass which is done shortly after going into SSA, but if optimizations optimize the builtins away before that, nothing is instrumented. Now, I think it is just fine if the result of the builtins isn't use

[COMMITTED 18/30] ada: Fix pragma Compile_Time_Error for sizes of nonstatic array types

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou The pragma is consistenly rejected for the sizes of nonstatic array types because Eval_Attribute does not evaluate it even if it is known. gcc/ada/ChangeLog: * sem_attr.adb (Eval_Attribute): Treat the various size attributes like Component_Size for nonstatic

[COMMITTED 19/30] ada: Fix reference manual clauses

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques The clauses in section 3.5 of the reference manual were moved around along the different Ada versions, which caused some comments in our source code to go out of date. This patch updates the references in those comments. gcc/ada/ChangeLog: * libgnat/a-tifiio.adb:

[COMMITTED 29/30] ada: Elide the copy for bit-packed aggregates in object declarations

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou The in-place expansion has been historically disabled for them, but there does not seem to be any good reason left for this. However, this requires a small trick in order for the expanded code not to be flagged as using the object uninitialized by the code generator. gcc/ada

[COMMITTED 17/30] ada: Refactor code of Check_Ambiguous_Call and Valid_Conversion

2024-12-12 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ChangeLog: * sem_res.adb (Is_Ambiguous_Operand): Add missing decoration of the operand when it is labeled overloaded but has just one interpretation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_res.adb | 3 +-- 1 fil

[COMMITTED 25/30] ada: Improve task entry context detection

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques Access parameters are not allowed in specifications of task entries. Before this patch, the compiler failed to detect that case in accept statements that were not directly in their task body's scopes. This patch fixes this issue. gcc/ada/ChangeLog: * sem_ch3.adb

[COMMITTED 24/30] ada: Refactor warning about null loops

2024-12-12 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ChangeLog: * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Move call to Comes_From_Source to the outer if-statement. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch5.adb | 17

[COMMITTED 16/30] ada: Minor refactoring in expansion of array aggregates

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou This just moves a couple of checks done in conjunction with the predicate Aggr_Assignment_OK_For_Backend into its body and adds a couple of comments. No functional changes. gcc/ada/ChangeLog: * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Add Target formal

[COMMITTED 30/30] ada: Fix reference to Ada 2020 in comment

2024-12-12 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ChangeLog: * par-ch5.adb (Test_Statement_Required): Fix comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par-ch5.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/par-ch5.adb b/gcc/ada/pa

[COMMITTED 26/30] ada: Fix minor display issue on invalid floats

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques GNAT implements a format with trailing '*' signs for the Image attribute of NaN, +inf and -inf. It was probably always intended to be the same length as the image of 1.0, but one '*' was actually missing. This patch fixes this. gcc/ada/ChangeLog: * libgnat/s-imag

[COMMITTED 28/30] ada: Defend against risk of infinite loop

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques A recently fixed bug caused an infinite loop when assertions were not checked. With assertions checked, the symptom was just an internal error caused by an assertion failure. This patch makes it so that if another bug ever causes the same condition to fail, there will neve

[COMMITTED 21/30] ada: Fix the level of the LLVM chapter in the User's Guide

2024-12-12 Thread Marc Poulhiès
From: Sebastian Poeplau gcc/ada/ChangeLog: * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Move the LLVM chapter one level up. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../building_executable_programs_with_gnat.rst

[COMMITTED 10/30] ada: Small improvements to expansion of conditional expressions

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou They comprise using a nonnull accesss type for the indirect expansion to avoid useless checks, smplifying the expansion of if expressions whose condition is known at compile time to avoid an N_Expression_With_Actions, using the indirect expansion for them in the indefinite cas

[COMMITTED 22/30] ada: Elide the copy for bit-packed aggregates in allocators

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou The in-place expansion has been historically disabled for them, but there does not seem to be any good reason left for this. gcc/ada/ChangeLog: * exp_aggr.adb (Expand_Array_Aggregate): Do not exclude aggregates of bit-packed array types in allocators from in-

[COMMITTED 20/30] ada: Accept static strings with External_Initialization

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the argument to the External_Initialization aspect had to be a string literal. This patch extends the possibilities so that any static string is accepted. A new helper function, Is_OK_Static_Expression_Of_Type, is introduced, and in addition to the main

[COMMITTED 07/30] ada: Tweak Is_Predefined_File_Name

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques This patch slightly widens the set of filenames that the compiler considers predefined. That makes it possible to build the GNAT runtime using only the file mapping facilities of the compiler, without having to rename files. gcc/ada/ChangeLog: * fname.adb (Is_Pre

[COMMITTED 15/30] ada: Fix validity check for private types

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the machinery to generate validity checks got confused in some situations involving private views of types, and ended up generating incorrect conversions from floating point types to integer types. This patch fixes this. gcc/ada/ChangeLog: * ex

[COMMITTED 14/30] ada: Add minimal support for other delayed aspects on controlled objects

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou This extends the processing done for the Address aspect to other delayed aspects. The External_Name aspect is also reclassified as a representation aspect and the three representation aspects External_Name, Link_Name and Linker_Section are moved from the Always_Delay to the R

[COMMITTED 02/30] ada: Export CHERI exception IDs

2024-12-12 Thread Marc Poulhiès
From: Daniel King This allows CHERI exceptions to be raised from C code in the runtime. gcc/ada/ChangeLog: * libgnat/i-cheri-exceptions.ads: Export CHERI exception IDs. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/i-cheri-exceptions.ads | 30 +++

[COMMITTED 13/30] ada: Fix documentation comment for Scan_Sign

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques This patches fixes a couple of details that were wrong in the documentation comment for System.Val_Util.Scan_Sign. gcc/ada/ChangeLog: * libgnat/s-valuti.ads (Scan_Sign): Fix documentation comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada

[COMMITTED 06/30] ada: Restrict External_Initialization file lookup

2024-12-12 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, External_Initialization looked for files in all directories of the source search path, which led to inconsistencies in some cases. This patch restricts the file lookup so the argument is interpreted as relative to the current source file's directory only

[COMMITTED 11/30] ada: Lift technical limitation in expansion of record aggregates

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou The mechanim deferring the expansion of record aggregates nested in other aggregates with intermediate conditional expressions is disabled in the case where they contain self-references, because of a technical limitation in the replacements done by Build_Record_Aggr_Code. Thi

[COMMITTED 09/30] ada: Fix wrong finalization with private unconstrained array type

2024-12-12 Thread Marc Poulhiès
From: Eric Botcazou The address passed to the routine attaching a controlled object to the finalization master must be that of its dope vector for an object whose nominal subtype is an unconstrained array type, but this is not the case when this subtype has a private declaration. gcc/ada/ChangeL

  1   2   >