[PATCH] [riscv] vec_dup immediate constants in pred_broadcast expand [PR118182]

2025-04-11 Thread Alexandre Oliva
pr118182-2.c fails on gcc-14 because it lacks the late_combine passes, particularly the one that runs after register allocation. Even in the trunk, the predicate broadcast for the add reduction is expanded and register-allocated as _zvfh, taking up an unneeded scalar register to hold the constan

Re: [PATCH] tailc, expand: Small incremental tweak to tail call dump [PR119718]

2025-04-11 Thread Richard Biener
> Am 11.04.2025 um 20:54 schrieb Jakub Jelinek : > > Hi! > > Here is an optional incremental tweak to the previous patch. > Instead of > > ./xgcc -B ./ -S -O2 -fdump-{tree-tailc,rtl-expand}-details pr119718.c ; grep > -B1 '^\(;; \)\?Cannot tail-call:' pr119718.c.* > pr119718.c.222t.tailc-_7

Re: [PATCH] driver: Fix up -freport-bug for ASLR [PR119727]

2025-04-11 Thread Richard Biener
> Am 11.04.2025 um 21:10 schrieb Jakub Jelinek : > > Hi! > > With --enable-host-pie -freport-bug almost never prepares preprocessed > source and instead emits > The bug is not reproducible, so it is likely a hardware or OS problem. > message even for bogus which are 100% reproducible. > The w

Re: [PATCH] bitintlower: Fix up handling of SSA_NAME copies in coalescing [PR119722]

2025-04-11 Thread Richard Biener
> Am 11.04.2025 um 21:06 schrieb Jakub Jelinek : > > Hi! > > The following patch is miscompiled, because during the limited > SSA name coalescing the bitintlower pass does we incorrectly don't > register a conflict. > This is on > [local count: 1073741824]: > # b_17 = PHI > g.4_13 = g; > _1

Re: [PATCH] tailc, expand: Tail call -fdump-{tree-tailc, expand-details} changes [PR119718]

2025-04-11 Thread Richard Biener
> Am 11.04.2025 um 21:00 schrieb Jakub Jelinek : > > Hi! > > The following patch makes some adjustments so that users can analyze what > calls weren't tail called even without using musttail attribute (though I'm > still not convinced it should be a warning, because we don't distinguish > bet

RE: [committed] cobol: Eliminate cobolworx UAT errors when compiling with -Os

2025-04-11 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Monday, April 7, 2025 03:19 > To: Robert Dubner > Cc: Sam James ; GCC Patches ; > Richard Biener > Subject: Re: [committed] cobol: Eliminate cobolworx UAT errors when > compiling with -Os > > On Fri, Apr 4, 2025 at 11:50 PM Robert Du

RE: [committed] cobol: Eliminate many getenv() calls. [PR119694]

2025-04-11 Thread Robert Dubner
> -Original Message- > From: Robert Dubner > Sent: Friday, April 11, 2025 23:06 > To: 'Patches GCC' > Subject: [committed] cobol: Eliminate many getenv() calls. [PR119694] > > A lot of those debugging getenv() calls were accumulated cruft. We took > this opportunity to get rid of most o

[committed] cobol: Eliminate many getenv() calls. [PR119694]

2025-04-11 Thread Robert Dubner
A lot of those debugging getenv() calls were accumulated cruft. We took this opportunity to get rid of most of them. The few that remain have been disabled with a #define gcobol_genenv() that returns NULL. Thank you, Richard. The remaining getenv() calls use GCOBOL_ prefixes on the environment

[COMMITTED] Doc: Correct documentation for -fstrong-eval-order [PR106618]

2025-04-11 Thread Sandra Loosemore
gcc/ChangeLog PR c++/106618 * doc/invoke.texi (Option Summary): Remove -fargs-in-order, add -fstrong-eval-order. (C++ Dialect Options): Explicitly document that -fstrong-eval-order takes an optional argument and what the choices are. Generalize refer

Re: [PATCH 2/7] ipa-cp: Make propagation of bits in IPA-CP aware of type conversions (PR119318)

2025-04-11 Thread Martin Jambor
Hello, On Wed, Apr 09 2025, Martin Jambor wrote: > Hi, > > On Tue, Apr 08 2025, Jan Hubicka wrote: >>> After the propagation of constants and value ranges, it turns out >>> that the propagation of known bits also needs to be made aware of any >>> intermediate types in which any arithmetic operatio

Re: [PATCH 1/7] ipa: Record and stream result types of arithemetic jump functions

2025-04-11 Thread Martin Jambor
Hi, On Tue, Apr 08 2025, Jan Hubicka wrote: >> In order to replace the use of somewhat unweildy >> expr_type_first_operand_type_p we need to record and stream the types >> of results of operations recorded in arithmetic jump functions. This >> is necessary so that we can then simulate them at the

[COMMITTED] Doc: Delete misleading sentence from -frounding-math docs [PR105548]

2025-04-11 Thread Sandra Loosemore
gcc/ChangeLog PR middle-end/105548 * doc/invoke.texi (Optimize Options): Delete misleading sentence about conversions. --- gcc/doc/invoke.texi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ffde9df85f

Re: [GCC16,RFC,V2 00/14] Add -fsanitize=memtag

2025-04-11 Thread Indu Bhagat
On 4/11/25 11:30 AM, Indu Bhagat wrote: Hi, For MTE stack tagging support in the GNU toolchain, one of the key pieces is the memtag sanitizer in GCC. The current series is V2 of the previously sent RFC series https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668017.html. This is now al

Re: [PATCH] c++: Fix various Wnarrowing minor issues

2025-04-11 Thread Sam James
Vishnu Mohandas writes: > Hello, > This is a possible fix for Wnarrowing warning issues. > Bootstrapped on x86_64 Linux. Please see my remarks at https://inbox.sourceware.org/gcc-patches/87iknbzfw4@gentoo.org/.

[PATCH] c++: improve constexpr call caching [PR115639]

2025-04-11 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for GCC 15 perhaps? -- >8 -- Here checking static_assert(0 == big_calc()); takes twice as much time as constexpr int ret = big_calc(); static_assert(0 == ret); ultimately because in the former, we first constexpr evalu

[PATCH] c++: improve constexpr prvalue folding [PR116416]

2025-04-11 Thread Patrick Palka
Boostrapped and regtested on x86_64-pc-linux- gnu, does this look OK for GCC 15 perhaps? -- >8 -- This patch improves upon r15-6052-g12de1942a0a673 by performing prvalue folding with mce_false rather than mce_unknown when it's safe to do so (i.e. the caller passed ff_mce_false), so that we can al

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 14:24, Martin Uecker wrote: > > Am Freitag, dem 11.04.2025 um 18:14 + schrieb Qing Zhao: >> >>> On Apr 11, 2025, at 13:37, Martin Uecker wrote: >>> >>> Am Freitag, dem 11.04.2025 um 17:08 + schrieb Qing Zhao: > On Apr 11, 2025, at 12:20, Martin Uecker

Re: [PATCH] tailc, expand: Small incremental tweak to tail call dump [PR119718]

2025-04-11 Thread Jakub Jelinek
On Fri, Apr 11, 2025 at 12:00:27PM -0700, Andrew Pinski wrote: > On Fri, Apr 11, 2025 at 11:54 AM Jakub Jelinek wrote: > > > > Hi! > > > > Here is an optional incremental tweak to the previous patch. > > Instead of > > > > ./xgcc -B ./ -S -O2 -fdump-{tree-tailc,rtl-expand}-details pr119718.c ; >

[GCC16, RFC, V2 09/14] hwasan: add support for generating MTE instructions for memory tagging

2025-04-11 Thread Indu Bhagat
Memory tagging is used for detecting memory safety bugs. On AArch64, the memory tagging extension (MTE) helps in reducing the overheads of memory tagging: - CPU: MTE instructions for efficiently tagging and untagging memory. - Memory: New memory type, Normal Tagged Memory, added to the Arm Ar

[PATCH v2] includes, Darwin: Handle modular use for macOS SDKs [PR116827].

2025-04-11 Thread Iain Sandoe
From: Iain Sandoe V2 adds a comment as suggested, otherwise NFC, re-tested on x86_64-Darwin. Unless there are further comments in the next 48h, I plan to apply this (since it is Darwin-specific) and modules is unusable without. thanks, Iain --- 8< --- Recent changes to the OS SDKs have altered

Re: [PATCH] tailc, expand: Small incremental tweak to tail call dump [PR119718]

2025-04-11 Thread Andrew Pinski
On Fri, Apr 11, 2025 at 11:54 AM Jakub Jelinek wrote: > > Hi! > > Here is an optional incremental tweak to the previous patch. > Instead of > > ./xgcc -B ./ -S -O2 -fdump-{tree-tailc,rtl-expand}-details pr119718.c ; grep > -B1 '^\(;; \)\?Cannot tail-call:' pr119718.c.* > pr119718.c.222t.tailc-_7

[PATCH] driver: Fix up -freport-bug for ASLR [PR119727]

2025-04-11 Thread Jakub Jelinek
Hi! With --enable-host-pie -freport-bug almost never prepares preprocessed source and instead emits The bug is not reproducible, so it is likely a hardware or OS problem. message even for bogus which are 100% reproducible. The way -freport-bug works is that it reruns it 3 times, capturing stdout a

[PATCH] bitintlower: Fix up handling of SSA_NAME copies in coalescing [PR119722]

2025-04-11 Thread Jakub Jelinek
Hi! The following patch is miscompiled, because during the limited SSA name coalescing the bitintlower pass does we incorrectly don't register a conflict. This is on [local count: 1073741824]: # b_17 = PHI g.4_13 = g; _14 = g.4_13 >> 50; _15 = (unsigned int) _14; _21 = b_17; _16 = (unsigned int)

Re: [PATCH] LRA: Backport PR115568 and PR119689 to release branches

2025-04-11 Thread Uros Bizjak
On Fri, Apr 11, 2025 at 6:23 PM Vladimir Makarov wrote: > > > On 4/11/25 2:29 AM, Uros Bizjak wrote: > > Hello! > > > > I would like to backport PR115568 and PR119689 to release branches. > > > > Author: Richard Biener > > Date: Wed Apr 9 14:36:19 2025 +0200 > > > > rtl-optimization/119689

[GCC16, RFC, V2 13/14] gcc: aarch64: memtag: update link spec to pass arguments to linker

2025-04-11 Thread Indu Bhagat
In context of stack tagging, the AArch64 Memtag ABI Extension to ELF specifies the usage of two dynamic tags for the dynamic loader to do the necessary tasks: - If DT_AARCH64_MEMTAG_MODE is present, the dynamic loader should (in a platform-specific specific way) enable MTE for the process.

[PATCH] tailc, expand: Tail call -fdump-{tree-tailc,expand-details} changes [PR119718]

2025-04-11 Thread Jakub Jelinek
Hi! The following patch makes some adjustments so that users can analyze what calls weren't tail called even without using musttail attribute (though I'm still not convinced it should be a warning, because we don't distinguish between calls in return call (...); statements vs. calls that just happ

[GCC16, RFC, V2 14/14] aarch64: testsuite: emit CFI directive when stack frames use MTE tagging

2025-04-11 Thread Indu Bhagat
Emit .cfi_mte_memtag_frame after .cfi_startproc for each function where the stack memory uses MTE protection. TBD: - Need to double check if checking on frame_size is the right thing to do. clang generates cfi_mte_tagged_frame directive irrespective of whether the function ended up taggi

[PATCH] [testsuite] [ppc] pr87600, pr89313: test for __PPC__ as well

2025-04-11 Thread Alexandre Oliva
gcc.dg/pr87600.h and gcc.dg/pr89313.c test for __powerpc__ and __POWERPC__ to choose ppc register names, but ppc-elf defines neither; it defines __PPC__, so test for that as well. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for

[PATCH] tailc, expand: Small incremental tweak to tail call dump [PR119718]

2025-04-11 Thread Jakub Jelinek
Hi! Here is an optional incremental tweak to the previous patch. Instead of ./xgcc -B ./ -S -O2 -fdump-{tree-tailc,rtl-expand}-details pr119718.c ; grep -B1 '^\(;; \)\?Cannot tail-call:' pr119718.c.* pr119718.c.222t.tailc-_7 = bar (0); pr119718.c.222t.tailc:Cannot tail-call: call invocation refe

[GCC16, RFC, V2 10/14] asan: memtag: enable pass_asan for memtag sanitizer

2025-04-11 Thread Indu Bhagat
Check for SANITIZER_MEMTAG in the gate function for pass_asan gimple pass; enable it. TBD: - This commit was initially carved out in order to ensure each patch works in isolation. Need to revisit and double check this. gcc/ChangeLog: * asan.cc (memtag_sanitize_p): Fix definition.

[GCC16,RFC,V2 08/14] aarch64: memtag: implement target hooks

2025-04-11 Thread Indu Bhagat
MEMTAG sanitizer, which is based on the HWASAN sanitizer, will invoke the target-specific hooks to create a random tag, add tag to memory address, and finally tag and untag memory. Implement the target hooks to emit MTE instructions if MEMTAG sanitizer is in effect. Continue to use the default ta

[GCC16,RFC,V2 03/14] aarch64: add new insn definition for st2g

2025-04-11 Thread Indu Bhagat
Store Allocation Tags (st2g) is an Armv8.5-A memory tagging (MTE) instruction. It stores an allocation tag to two tag granules of memory. TBD: - Not too sure what is the best way to generate the st2g yet; A subsequent patch will emit them in one of the target hooks. gcc/ChangeLog:

[GCC16, RFC, V2 12/14] memtag: doc: add new option -fsanitize-memtag-mode=

2025-04-11 Thread Indu Bhagat
Add new command line option -fsanitize-memtag-mode with three possible values: - sync (default) - async - asymm This allows the user to select the fault conveyance model when using MTE instructions for their applications. This option is not (sanity checked) processed in GCC at all currently.

[GCC16,RFC,V2 06/14] opts: doc: aarch64: add new memtag sanitizer

2025-04-11 Thread Indu Bhagat
Add new command line option -fsanitize=memtag with the following new params: --param memtag-instrument-stack [0,1] (default 1) to use MTE insns for enabling dynamic checking of stack variables. --param memtag-instrument-alloca [0,1] (default 1) to use MTE insns for enabling dynamic checking of st

[GCC16, RFC, V2 01/14] opts: use unsigned HOST_WIDE_INT for sanitizer flags

2025-04-11 Thread Indu Bhagat
Currently, the data type of sanitizer flags is unsigned int, with SANITIZE_SHADOW_CALL_STACK (1UL << 31) being highest individual enumerator for enum sanitize_code. Use 'unsigned HOST_WIDE_INT' data type to allow for more distinct instrumentation modes be added when needed. FIXME: 1. Is using d_u

[GCC16,RFC,V2 11/14] memtag: testsuite: add new tests

2025-04-11 Thread Indu Bhagat
Add basic tests for MEMTAG sanitizer. MEMTAG sanitizer uses target hooks to emit AArch64 specific MTE instructions. Add new target-specific tests. The currently generated code currently has the following known limitations: 1. For basic-1.c testcase, currently we generate: subgx0, x0

[GCC16, RFC, V2 07/14] targhooks: add new target hook TARGET_MEMTAG_TAG_MEMORY

2025-04-11 Thread Indu Bhagat
Add a new target hook TARGET_MEMTAG_TAG_MEMORY to tag (and untag) memory. The default implementation is empty. Hardware-assisted sanitizers on architectures providing instructions to tag/untag memory can then make use of this target hook. On AArch64, e.g., the MEMTAG sanitizer will use this hook

[GCC16,RFC,V2 04/14] aarch64: add new definition for post-index st2g

2025-04-11 Thread Indu Bhagat
Using post-index st2g is a faster way of memory tagging/untagging. Because a post-index 'st2g tag, [addr], #32' is equivalent to: stg tag, addr, #0 stg tag, addr, #16 add addr, addr, #32 TBD: - Currently generated by in the aarch64 backend. Not sure if this is the right way to do i

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 14:12, Martin Uecker wrote: > > Am Freitag, dem 11.04.2025 um 13:55 -0400 schrieb Siddhesh Poyarekar: >> On 2025-04-11 13:37, Martin Uecker wrote: My understanding is that such issue with the implicit data flow dependency information missing is only for the >>>

[GCC16,RFC,V2 00/14] Add -fsanitize=memtag

2025-04-11 Thread Indu Bhagat
Hi, For MTE stack tagging support in the GNU toolchain, one of the key pieces is the memtag sanitizer in GCC. The current series is V2 of the previously sent RFC series https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668017.html. The other two pieces, which (work in progress) are needed

[GCC16,RFC,V2 05/14] aarch64: add new definition for post-index stg

2025-04-11 Thread Indu Bhagat
Using post-index stg is a faster way of memory tagging/untagging. TBD: - Currently generated by in the aarch64 backend. Not sure if this is the right way to do it. - Also not clear how to weave in the generation of stzg. ChangeLog: * gcc/config/aarch64/aarch64.md --- [New in RF

[GCC16,RFC,V2 02/14] aarch64: add new define_insn for subg

2025-04-11 Thread Indu Bhagat
subg (Subtract with Tag) is an Armv8.5-A memory tagging (MTE) instruction. It can be used to subtract an immediate value scaled by the tag granule from the address in the source register. gcc/ChangeLog: * config/aarch64/aarch64.md (subg): New definition. --- gcc/config/aarch64/aarch64.m

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 13:55, Siddhesh Poyarekar wrote: > > On 2025-04-11 13:37, Martin Uecker wrote: >>> My understanding is that such issue with the implicit data flow dependency >>> information missing is only for the >>> counted_by attribute, not for the other TYPE which already have the bo

[PATCH] [testsuite] [ppc] use dg-do-if in vec-mul.c

2025-04-11 Thread Alexandre Oliva
The overriding of dg-do in gcc.target/powerpc/vec-mul.c I put there last year didn't quite work. It needed the newly-added dg-do-if to work the way I wished. Fix it, and simplify it. While at that, I found out that when target matched, dg-do-if didn't call dg-do correctly, because it dropped t

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Martin Uecker
Am Freitag, dem 11.04.2025 um 18:14 + schrieb Qing Zhao: > > > On Apr 11, 2025, at 13:37, Martin Uecker wrote: > > > > Am Freitag, dem 11.04.2025 um 17:08 + schrieb Qing Zhao: > > > > > > > On Apr 11, 2025, at 12:20, Martin Uecker wrote: > > > > > > > > Am Freitag, dem 11.04.2025 um 1

[PATCH] c++: Fix various Wnarrowing minor issues

2025-04-11 Thread Vishnu Mohandas
Hello, This is a possible fix for Wnarrowing warning issues. Bootstrapped on x86_64 Linux. diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc 2 │ index 45edd180173..535f1bdfa3e 100644 3 │ --- a/gcc/cp/typeck2.cc 4 │ +++ b/gcc/cp/typeck2.cc 5 │ @@ -1142,6 +1142,10 @@ check_narro

[PATCH] [testsuite] [ppc] require vsx for vec-cmpne tests

2025-04-11 Thread Alexandre Oliva
The gcc.target/powerpc/vec-cmpne.c and .../vec-cmpne-runnable.c tests need both vsx and vmx support, but vsx is taken for granted, which doesn't hold on ppc-elf. Add the appropriate requirements and options. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerp

[PATCH] [testsuite] [ppc] adjust vsx-builtin-7.c xxpermdi count for ilp32

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/vsx-builtin-7.c uses fewer xxpermdi insns than expected on ilp32. Adjust. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuite/ChangeLog * gcc.target/powerpc/vsx-builtin-7.c: Adjust xxpermdi

[PATCH] [testsuite] [ppc] tolerate -mfloat128 warning in pr99708.c

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/pr99708.c uses -mfloat128, and that causes the usual "may not be fully supported" warning that we need to prune on such tests. Tolerate it. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuite/Chang

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 13:37, Martin Uecker wrote: > > Am Freitag, dem 11.04.2025 um 17:08 + schrieb Qing Zhao: >> >>> On Apr 11, 2025, at 12:20, Martin Uecker wrote: >>> >>> Am Freitag, dem 11.04.2025 um 16:01 + schrieb Qing Zhao: > On Apr 11, 2025, at 10:53, Martin Uecker

[PATCH] [testsuite] [ppc] skip -msoft-float tests when testing with -mhard-float

2025-04-11 Thread Alexandre Oliva
Testing ppc-elf with -mhard-float conflicts with explicit -msoft-float in gcc.target/powerpc/ppc-fma-6.c and gcc.target/powerpc/pr105334.c. Skip these tests under -mhard-float. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gc

[PATCH] [testsuite] [ppc] allow implicit fuction declarations in pr92661.c

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/pr92661.c expects and tolerates errors about dfp builtins when dfp is not supported, but the C front end no longer accepts calls of undeclared functions by default, even with -w. Adding -fpermissive would do, but I thought it would be too broad, so I went for -Wno-error=implici

[PATCH] [testsuite] [ppc] add -mno-strict-align to pr111449-1.c

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/pr111449-1.c's expected results only come about without strict alignment, so disable it explicitly. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuite/ChangeLog * gcc.target/powerpc/pr1114

[PATCH] [testsuite] [ppc] require ifunc for target_clones test

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/power11-3.c uses target_clones, that depends on ifunc. Require ifunc support. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuite/ChangeLog * gcc.target/powerpc/power11-3.c: Require ifunc

[PATCH] [testsuite] [ppc] add -maltivec to pr111380-2.c

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/pr111380-2.c requires altivec to be enabled to hit the expected option mismatch and inline error, so enable it after checking for compiler support. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuit

[PATCH] [testsuite] [ppc] add -mdejagnu-cpu=power7 to pr17381.c

2025-04-11 Thread Alexandre Oliva
Below power7, it seems to be more profitable to compress the floating-point constants and use an additional fp register move to "extend" it. Only at power7 and above do we keep the constants separate and load them, getting to the expected 'fmr' count. Regstrapped on powerpc64le-linux-gnu. Also

[PATCH] [testsuite] [ppc] add -mfloat128 to pr67808.c

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/pr67808.c in some cases expects both 128-bit long double types to be defined, but -mlong-double-128 doesn't guarantee that without -mfloat128 on targets that would get the IEEE128 type as long double. Add -mfloat128 to ensure the desired IBM 128-bit floating-point type is avai

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Martin Uecker
Am Freitag, dem 11.04.2025 um 13:55 -0400 schrieb Siddhesh Poyarekar: > On 2025-04-11 13:37, Martin Uecker wrote: > > > My understanding is that such issue with the implicit data flow > > > dependency information missing is only for the > > > counted_by attribute, not for the other TYPE which alre

[PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-04-11 Thread Alexandre Oliva
gcc.target/powerpc/block-cmp-8.c is an execution test on ilp32. It tests for support for the 64-bit ISA in the compiler, but not for the ability to execute powerpc64 instructions, so the test fails on 32-bit hardware. Require powerpc64 instead. Regstrapped on powerpc64le-linux-gnu. Also teste

[PATCH] [testsuite] [ppc] disable -mpowerpc64 for various ilp32 asm-out checks

2025-04-11 Thread Alexandre Oliva
Multiple tests on ilp32 get TARGET_POWERPC64 enabled by -mdejagnu-cpu options, but the results they expect are only attained without enabling it, so disable it explicitly. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/tes

[PATCH] [testsuite] [ppc] newlib sets FE_VXSOFT on raise FE_INVALID

2025-04-11 Thread Alexandre Oliva
The implementation of the fe*except primitives in newlib sets the FE_VXSOFT bit when raising FE_INVALID, and the test doesn't expect that. Skip it: the tested builtin expansions are for glibc only anyway. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-e

[PATCH] [testsuite] [ppc] xfail pr52451.c on ppc [PR58684]

2025-04-11 Thread Alexandre Oliva
Like pr91323.c, pr52451.c fails on all powerpc variants (except where already skipped), because it uses fcmpu even when qNaNs should flag FP exceptions. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuite/ChangeLog

[PATCH] [testsuite] [ppc] add -mfloat128 to __ieee128-using bfp tests

2025-04-11 Thread Alexandre Oliva
Some ppc bfp tests use __ieee128 without ensuring it's available. Require ppc_ieee128_ok, add -mfloat128 to get the type defined, and tolerate the warning that this option may trigger. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install?

[PATCH] [testsuite] [ppc] ipa-sra-19.c: pass -Wno-psabi on powerpc-*-elf as well

2025-04-11 Thread Alexandre Oliva
Like other ppc targets, powerpc-*-elf needs -Wno-psabi to compile gcc.dg/ipa/ipa-sra-19.c without an undesired warning about vector argument passing. Regstrapped on powerpc64le-linux-gnu. Also tested with gcc-14 on x86_64-linux-x-powerpc-elf. Ok to install? for gcc/testsuite/ChangeLog

[PATCH] [testsuite] [ppc] require float128 available for copysign

2025-04-11 Thread Alexandre Oliva
The rs6000.md copysign3 expander requires the mode to satisfy FLOAT128_IEEE_P, so requiring float128 on ppc for ifn_copysign effective target is hopefully a close-enough approximation. gcc.dg/fold-copysign-1.c and gcc.dg/pr55152-2.c fail on ppc-elf without this. Regstrapped on powerpc64le-linux

[PATCH] [testsuite] [ppc] compile [PR112822] with -mvsx

2025-04-11 Thread Alexandre Oliva
g++.dg/pr112822.C uses altivec vectors explicitly, but it expects this feature to be enabled by default on targets that recognize the attribute, which is not a given on older ppc cpus, where the compiler recommends recompiling with -mvsx. Since it's just a compilation test, we don't seem to need t

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Siddhesh Poyarekar
On 2025-04-11 13:37, Martin Uecker wrote: My understanding is that such issue with the implicit data flow dependency information missing is only for the counted_by attribute, not for the other TYPE which already have the bound information there. The dependency issue is only for the size, but

Re: [PATCH] libstdc++: Fix atomic CAS hang with C++11 [PR114865]

2025-04-11 Thread Jonathan Wakely
On Fri, 11 Apr 2025 at 15:14, Tomasz Kaminski wrote: > > > > On Fri, Apr 11, 2025 at 2:25 PM Jonathan Wakely wrote: >> >> On Fri, 11 Apr 2025 at 08:23, Tomasz Kaminski wrote: >> > >> > >> > >> > On Thu, Apr 10, 2025 at 6:27 PM Jonathan Wakely wrote: >> >> >> >> The std::atomic constructor clear

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Martin Uecker
Am Freitag, dem 11.04.2025 um 17:08 + schrieb Qing Zhao: > > > On Apr 11, 2025, at 12:20, Martin Uecker wrote: > > > > Am Freitag, dem 11.04.2025 um 16:01 + schrieb Qing Zhao: > > > > > > > On Apr 11, 2025, at 10:53, Martin Uecker wrote: > > > > > > > > Am Freitag, dem 11.04.2025 um 1

Re: [patch, Fortran] Fix PR 119669

2025-04-11 Thread Harald Anlauf
Hi Thomas! Am 11.04.25 um 17:50 schrieb Thomas Koenig: Hello world, the attached patch fixes an ICE by setting the typespec of a dummy argument from a global function if known. plus setting the correct flag. This also removes the corresponding assert.  I'm not quite sure that the code with the

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 12:20, Martin Uecker wrote: > > Am Freitag, dem 11.04.2025 um 16:01 + schrieb Qing Zhao: >> >>> On Apr 11, 2025, at 10:53, Martin Uecker wrote: >>> >>> Am Freitag, dem 11.04.2025 um 10:42 -0400 schrieb Andrew MacLeod: On 4/11/25 10:27, Qing Zhao wrote: > >

Re: [PATCH] LRA: Backport PR115568 and PR119689 to release branches

2025-04-11 Thread Vladimir Makarov
On 4/11/25 2:29 AM, Uros Bizjak wrote: Hello! I would like to backport PR115568 and PR119689 to release branches. Author: Richard Biener Date: Wed Apr 9 14:36:19 2025 +0200 rtl-optimization/119689 - compare-debug failure with LRA The previous change to fix LRA rematerialization b

[PATCH] testsuite: arm: Fix unsigned-extend-2.c [PR116445]

2025-04-11 Thread Christophe Lyon
The test was designed to pass with thumb2, but code generation changed with the introduction of Low Overhead Loops, so the test can fail if one overrides the flags when running the testsuite. In addition, useless subtract / extension instructions require -O2 to remove them (-O is not sufficient),

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Andrew MacLeod
On 4/11/25 10:27, Qing Zhao wrote: On Apr 10, 2025, at 11:12, Martin Uecker wrote: Am Donnerstag, dem 10.04.2025 um 10:55 -0400 schrieb Siddhesh Poyarekar: On 2025-04-10 10:50, Andrew MacLeod wrote: Its not clear to me exactly what is being asked, but I think the suggestion is that pointe

Re: [PATCH] testsuite: arm: rename arm_v8_1_lob_ok into arm_v8_1_lob_hw

2025-04-11 Thread Christophe Lyon
Hi! On Thu, 10 Apr 2025 at 19:13, Richard Earnshaw (lists) wrote: > > On 10/04/2025 14:55, Christophe Lyon wrote: > > All arm effective-targets using check_runtime use the "_hw" or > > "_multilib" suffix, so rename arm_v8_1_lob_ok into arm_v8_1_lob_hw for > > consistency. > > > > gcc/testsuite/Ch

Re: [PATCH] cobol: Allow for undefined NAME_MAX [PR119217]

2025-04-11 Thread Rainer Orth
Andreas Schwab writes: > On Apr 11 2025, Rainer Orth wrote: > >> All users of symbols.h fail to compile on Solaris: >> >> /vol/gcc/src/hg/master/local/gcc/cobol/symbols.h: At global scope: >> /vol/gcc/src/hg/master/local/gcc/cobol/symbols.h:1365:13: error: ‘NAME_MAX’ >> was not declared in this

[patch, Fortran] Fix PR 119669

2025-04-11 Thread Thomas Koenig
Hello world, the attached patch fixes an ICE by setting the typespec of a dummy argument from a global function if known. plus setting the correct flag. This also removes the corresponding assert. I'm not quite sure that the code with the subroutine attribute can be reached, but I thought better

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Martin Uecker
Am Freitag, dem 11.04.2025 um 16:01 + schrieb Qing Zhao: > > > On Apr 11, 2025, at 10:53, Martin Uecker wrote: > > > > Am Freitag, dem 11.04.2025 um 10:42 -0400 schrieb Andrew MacLeod: > > > On 4/11/25 10:27, Qing Zhao wrote: > > > > > > > > > On Apr 10, 2025, at 11:12, Martin Uecker wrote

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 10:53, Martin Uecker wrote: > > Am Freitag, dem 11.04.2025 um 10:42 -0400 schrieb Andrew MacLeod: >> On 4/11/25 10:27, Qing Zhao wrote: >>> On Apr 10, 2025, at 11:12, Martin Uecker wrote: Am Donnerstag, dem 10.04.2025 um 10:55 -0400 schrieb Siddhesh Poyar

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Andrew MacLeod
On 4/11/25 11:36, Qing Zhao wrote: On Apr 11, 2025, at 10:42, Andrew MacLeod wrote: On 4/11/25 10:27, Qing Zhao wrote: On Apr 10, 2025, at 11:12, Martin Uecker wrote: Am Donnerstag, dem 10.04.2025 um 10:55 -0400 schrieb Siddhesh Poyarekar: On 2025-04-10 10:50, Andrew MacLeod wrote: It

Re: [PATCH V2] RISC-V: Add support for Zalasr extension

2025-04-11 Thread Andrea Parri
On Thu, Apr 10, 2025 at 02:48:36PM -0700, Edwin Lu wrote: > [1] https://github.com/riscv/riscv-zalasr > > Add minimal support for the zalasr (load-acquire/store-release) > extension > > Currently there is no toggle to opt into the abi-breaking note 3 > mappings in the PSABI doc so support for tha

[PATCH] Add diffsummary.py to contrib

2025-04-11 Thread Andi Kleen
This adds an automatic downloader for the latest test results from the mailing list archive and supports diffing test_summary to it. Useful if you don't want to run your own baseline. contrib/ChangeLog: * diffsummary.py: New file. --- contrib/diffsummary.py | 104

[PHASE1 PATCH] Use optimize free lists for alloc_pages

2025-04-11 Thread Andi Kleen
Right now ggc has a single free list for multiple sizes. In some cases the list can get mixed by orders and then the allocator may spend a lot of time walking the free list to find the right sizes. This patch splits the free list into multiple free lists by order which allows O(1) access in most c

[PATCH] Fix PR target/119673

2025-04-11 Thread Eric Botcazou
Hi, this applies the same magic to config/i386/gthr-win32.h that was applied to gthr-posix.h (https://gcc.gnu.org/cgit/gcc/commit/?id=6a4d1c374eed17) for the sake of C++ modules (thanks to Andrew for the pointer!). Built for {i686,x86_64}-w64-mingw32, OK for the mainline? 2025-04-11 Eric Botc

Re: [PATCH v3] libstdc++: Implement C++26 features (P2546R5)

2025-04-11 Thread Jonathan Wakely
On Fri, 11 Apr 2025 at 14:47, Jonathan Wakely wrote: > > This includes the P2810R4 (is_debugger_present is_replaceable) changes, > allowing std::is_debugger_present to be replaced by the program. > > It would be good to provide a macOS definition of is_debugger_present as > per https://developer.a

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 11, 2025, at 10:42, Andrew MacLeod wrote: > > > On 4/11/25 10:27, Qing Zhao wrote: >> >>> On Apr 10, 2025, at 11:12, Martin Uecker wrote: >>> >>> Am Donnerstag, dem 10.04.2025 um 10:55 -0400 schrieb Siddhesh Poyarekar: On 2025-04-10 10:50, Andrew MacLeod wrote: > Its not c

Re: [committed] modula2: Fix a comment typo

2025-04-11 Thread Gaius Mulley
Jakub Jelinek writes: > Hi! > > During make gcc.pot I've noticed among tons of other warnings (e.g. because > can't appears in non-C/C++ style comment and so gettext considers it > unterminated) a warning where the lack of " looked unintentional. > > Committed to trunk as obvious. > > 2025-04-09

Re: [PATCH] libstdc++: Fix atomic CAS hang with C++11 [PR114865]

2025-04-11 Thread Tomasz Kaminski
On Fri, Apr 11, 2025 at 2:25 PM Jonathan Wakely wrote: > On Fri, 11 Apr 2025 at 08:23, Tomasz Kaminski wrote: > > > > > > > > On Thu, Apr 10, 2025 at 6:27 PM Jonathan Wakely > wrote: > >> > >> The std::atomic constructor clears padding bits so that compare_exchange > >> will not fail due to dif

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Martin Uecker
Am Freitag, dem 11.04.2025 um 10:42 -0400 schrieb Andrew MacLeod: > On 4/11/25 10:27, Qing Zhao wrote: > > > > > On Apr 10, 2025, at 11:12, Martin Uecker wrote: > > > > > > Am Donnerstag, dem 10.04.2025 um 10:55 -0400 schrieb Siddhesh Poyarekar: > > > > On 2025-04-10 10:50, Andrew MacLeod wrote:

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Andrew MacLeod
On 4/11/25 10:05, Qing Zhao wrote: On Apr 10, 2025, at 10:55, Siddhesh Poyarekar wrote: On 2025-04-10 10:50, Andrew MacLeod wrote: Its not clear to me exactly what is being asked, but I think the suggestion is that pointer references are being replaced with a builtin function called .ACC

[pushed] c++: avoid ARM -Wunused-value [PR114970]

2025-04-11 Thread Jason Merrill
Tested by me on x86_64-pc-linux-gnu and Sam James on armv7a-unknown-linux-gnueabihf, applying to trunk. -- 8< -- Because of the __builtin_is_constant_evaluated, maybe_constant_init in expand_default_init fails, so the constexpr constructor isn't folded until cp_fold, which then calls cp_build_ini

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 10, 2025, at 10:55, Siddhesh Poyarekar wrote: > > On 2025-04-10 10:50, Andrew MacLeod wrote: >> Its not clear to me exactly what is being asked, but I think the suggestion >> is that pointer references are being replaced with a builtin function called >> .ACCESS_WITH_SIZE ?and I

[committed] [RISC-V] Fix testsuite fallout from recent changes

2025-04-11 Thread Jeff Law
Recent changes have started triggering: Tests that now fail, but worked before (3 tests): unix/-march=rv64gc_zba_zbb_zbs_zicond: gcc: gcc.target/riscv/rvv/base/pr115068-run.c (test for excess errors) unix/-march=rv64gc_zba_zbb_zbs_zicond: gcc: gcc.target/riscv/rvv/base/pr115068.c (test for ex

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-11 Thread Qing Zhao
> On Apr 10, 2025, at 11:12, Martin Uecker wrote: > > Am Donnerstag, dem 10.04.2025 um 10:55 -0400 schrieb Siddhesh Poyarekar: >> On 2025-04-10 10:50, Andrew MacLeod wrote: >>> Its not clear to me exactly what is being asked, but I think the >>> suggestion is that pointer references are being

[PATCH] libstdc++: Document thread-safety for COW std::string [PR21334]

2025-04-11 Thread Jonathan Wakely
The gcc4-compatible copy-on-write std::string does not conform to the C++11 requirements on data race avoidance in standard containers. Specifically, calling non-const member functions such as begin() and data() needs to do the "copy on write" operation and so is most definitely a modification of t

[PATCH v3] libstdc++: Implement C++26 features (P2546R5)

2025-04-11 Thread Jonathan Wakely
This includes the P2810R4 (is_debugger_present is_replaceable) changes, allowing std::is_debugger_present to be replaced by the program. It would be good to provide a macOS definition of is_debugger_present as per https://developer.apple.com/library/archive/qa/qa1361/_index.html but that isn't inc

[committed] libstdc++: Add fast_float patch to LOCAL_PATCHES

2025-04-11 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * src/c++17/fast_float/LOCAL_PATCHES: Update. --- Pushed to trunk. libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES | 1 + 1 file changed, 1 insertion(+) diff --git a/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCHES b/libstdc++-v3/src/c++17/fast_float/LOCAL_PATCH

Re: [PATCH] dwarf2out: Decrease dw_loc_descr_node and dw_attr_struct struct sizes [PR119711]

2025-04-11 Thread Richard Biener
On Thu, 10 Apr 2025, Jakub Jelinek wrote: > Hi! > > As noted by Richi on a large testcase, there are unnecessary paddings > in some heavily used dwarf2out.{h,cc} structures on 64-bit hosts. > > struct dw_val_node { > enum dw_val_class val_class;/* 0 4 */ > >

ping on fixes for cobol.1 + gcobc

2025-04-11 Thread Simon Sobisch
with GCC 15.1 in sight... ping on gcobc wrapper fixes and additions: https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680218.html (note: obviously it would be good if -Wall [1] would work (the "global" PR for -Wall was postponed to GCC16, so possibly add to gcobol as intermediate?), then

Re: [PATCH] cobol: Allow for undefined NAME_MAX [PR119217]

2025-04-11 Thread Richard Biener
On Fri, Apr 11, 2025 at 2:14 PM Rainer Orth wrote: > > Andreas Schwab writes: > > > On Apr 11 2025, Rainer Orth wrote: > > > >> All users of symbols.h fail to compile on Solaris: > >> > >> /vol/gcc/src/hg/master/local/gcc/cobol/symbols.h: At global scope: > >> /vol/gcc/src/hg/master/local/gcc/co

  1   2   >