Re:[pushed] [PATCH] LoongArch: Fix awk / sed usage for compatibility

2025-04-08 Thread Lulu Cheng
Pushed to r15-9324 and r14-11545. 在 2025/4/7 上午10:31, Yang Yujie 写道: Tested with nawk, mawk, and gawk. gcc/ChangeLog: * config/loongarch/genopts/gen-evolution.awk: remove usage of "asort". * config/loongarch/genopts/genstr.sh: replace sed with awk. --- .../loongarch/g

New German PO file for 'gcc' (version 15.1-b20250316)

2025-04-08 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: https://translationproject.org/latest/gcc/de.po (This file, 'gcc-15.1-b20250316.de.po',

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Robin Dapp
On 4/8/25 16:32, Vineet Gupta wrote: Yay ! It does work. Awesome. I've uploaded the further reduced test to PR/119533 Hmm, I'm seeing the same ICE as before with my patch. Did you happen to change something else on your local tree still? Yeah I had some debug stuff lying around. In particular

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Vineet Gupta
On 4/8/25 16:32, Vineet Gupta wrote: >> Yay ! It does work. Awesome. >> I've uploaded the further reduced test to PR/119533 > Hmm, I'm seeing the same ICE as before with my patch. Did you happen to > change > something else on your local tree still? >> Yeah I had some debug s

Re: .ACCESS_WITH_SIZE and pointer ranges

2025-04-08 Thread Siddhesh Poyarekar
On 2025-04-08 15:22, Qing Zhao wrote: Changing a pointer reference to a call to .ACCESS_WITH_SIZE will impact the compiler optimization in two aspects: 1. The new call site might become a barrier that prevents code movement around it. Yeah, it's not a real problem IMO; it should only preven

Re: [PATCH v2] RISC-V: Disable unsupported vsext/vzext patterns for XTheadVector.

2025-04-08 Thread Jin Ma
On Tue, 8 Apr 2025 14:27:16 -0600, Jeff Law wrote: > > > On 4/7/25 12:26 AM, Jin Ma wrote: > > XThreadVector does not support the vsext/vzext instructions; however, > > due to the reuse of RVV optimizations, it may generate these instructions > > in certain cases. To prevent the error "Unknown op

Re: [Patch] Fortran: Add code gen for do,concurrent's LOCAL/LOCAL_INIT [PR101602]

2025-04-08 Thread Jerry D
On 4/8/25 10:44 AM, Tobias Burnus wrote: This patch is essentially the one of PR101602, comment 6. Thus, it has the same issues as that patch: * LOCAL for derived-type variables with default   initalizers do not work (not initialized) * LOCAL/LOCAL_INIT for assumed-shape arrays fails   (need s

Re: [PATCH] Fortran: fix issue with impure elemental subroutine and interface [PR119656]

2025-04-08 Thread Jerry D
On 4/8/25 1:43 PM, Harald Anlauf wrote: Hi all, the attached patch fixes a rather strange 12/13/14/15 regression. When walking through the list of procedures in an interface to find the matching one, the code could remember an inferred type from a false module procedure within the same interface

[pushed] c++: lambda in concept [PR118698]

2025-04-08 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- When normalizing is_foo for , we get to normalizing callable for , which means substituting into . Since r14-9938, because in_template_context is false we return the lambda unchanged, just with LAMBDA_EXPR_EXTRA_ARGS set, so the closure t

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

2025-04-08 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

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Vineet Gupta
On 4/8/25 13:47, Vineet Gupta wrote: > On 4/8/25 12:27, Robin Dapp wrote: > Yay ! It does work. Awesome. > I've uploaded the further reduced test to PR/119533 Hmm, I'm seeing the same ICE as before with my patch. Did you happen to change something else on your local tree s

[committed] libphobos: Merge with upstream phobos 35977c802

2025-04-08 Thread Iain Buclaw
Hi, This patch merges the D standard library with upstream phobos 35977c802. Synchronizes recent bug fixes targeted for v2.111.1. Bootstrapped and regression tested on x86_64-linux-gnu/-m32, and committed to mainline. Regards, Iain. --- libphobos/ChangeLog: * src/MERGE: Merge upstream

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

2025-04-08 Thread Martin Jambor
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 operations are made and >> must limit its precision there. This i

Re: [PATCH] libstdc++: Implement debug format for strings and charcters formatters [PR109162]

2025-04-08 Thread Patrick Palka
On Wed, 2 Apr 2025, Tomasz Kamiński wrote: > This patch implements part P2372R3 that specified debug (escaped) > format for the stings and characters sequecenes. This include both > handling of the '?' formatt specifier and set_debug_format member. > > To indicate partial support we define __glib

[PATCH] libstdc++: Fix constraint recursion in basic_const_iterator operator- [PR115046]

2025-04-08 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/14? -- >8 -- It was proposed in PR112490 to also adjust basic_const_iterator's friend operator-(sent, iter) overload alongside the r15-7757-g4342c50ca84ae5 adjustments to its comparison operators, but we lacked a concrete testcase demonst

Re: [PATCH v2] RISC-V: Disable unsupported vsext/vzext patterns for XTheadVector.

2025-04-08 Thread Jeff Law
On 4/7/25 12:26 AM, Jin Ma wrote: XThreadVector does not support the vsext/vzext instructions; however, due to the reuse of RVV optimizations, it may generate these instructions in certain cases. To prevent the error "Unknown opcode 'th.vsext.vf2'," we should disable these patterns. V2: Chang

[PATCH] Fortran: fix issue with impure elemental subroutine and interface [PR119656]

2025-04-08 Thread Harald Anlauf
Hi all, the attached patch fixes a rather strange 12/13/14/15 regression. When walking through the list of procedures in an interface to find the matching one, the code could remember an inferred type from a false module procedure within the same interface if and only if optional arguments were i

Re: [PATCH v3] libstdc++: Implement debug format for strings and charcters formatters [PR109162]

2025-04-08 Thread Jonathan Wakely
On 03/04/25 09:26 +0200, Tomasz Kamiński wrote: Further updadate, that optimized the string escape handling with padding and width, by firstly tryncating the input and checking it width against field width. This assumes that escaping will only increase estimated width. Also posted this as PR for

[pushed] testsuite: Fix gcc.dg/vect/pr99102.c command line

2025-04-08 Thread Richard Sandiford
The aarch64_sve256_hw line forced the vector length, but didn't force SVE itself. This meant that the associated: /* { dg-final { scan-tree-dump "MASK_SCATTER_STORE" "vect" { target aarch64_sve256_hw } } } */ wouldn't always fire. I imagine this was tested with SVE enabled by default, which

[pushed] testsuite: Update guality XFAILs for aarch64

2025-04-08 Thread Richard Sandiford
In previous years, I've tried to update the guality tests so that they give clean results on aarch64-linux-gnu with a recent version of GDB. This patch does the same thing for GCC 15. The version of GDB I used was 16.2. As before, there are no PRs for the XFAILs. The idea is that anyone who is

[PATCH] libgomp: Update SVE tests

2025-04-08 Thread Richard Sandiford
The new SVE tests didn't explicitly force SVE to be enabled, which meant that they wouldn't work on targets that aren't configured for SVE by default. The least invasive way of fixing that is to add a pragma, which works for most tests. However, for udr-sve.c, the global: #pragma omp declare red

Re: [PATCH v3] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread Ard Biesheuvel
On Tue, 8 Apr 2025 at 18:44, H.J. Lu wrote: > > On Tue, Apr 8, 2025 at 9:39 AM Ard Biesheuvel wrote: > > > > On Tue, 8 Apr 2025 at 15:33, H.J. Lu wrote: > > > > > > On Tue, Apr 8, 2025 at 3:46 AM Ard Biesheuvel wrote: > > > > > > > > From: Ard Biesheuvel > > > > > > > > Commit bde21de1205 ("i3

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Vineet Gupta
On 4/8/25 12:27, Robin Dapp wrote: Yay ! It does work. Awesome. I've uploaded the further reduced test to PR/119533 >>> Hmm, I'm seeing the same ICE as before with my patch. Did you happen to >>> change >>> something else on your local tree still? Yeah I had some debug stuff lying aro

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Robin Dapp
Yay ! It does work. Awesome. I've uploaded the further reduced test to PR/119533 Hmm, I'm seeing the same ICE as before with my patch. Did you happen to change something else on your local tree still? On top, I'm now seeing a ton of vsetvl test failures vs just the one I reported... No ide

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Robin Dapp
Yay ! It does work. Awesome. I've uploaded the further reduced test to PR/119533 Hmm, I'm seeing the same ICE as before with my patch. Did you happen to change something else on your local tree still? On top, I'm now seeing a ton of vsetvl test failures vs just the one I reported... No ide

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Robin Dapp
Yay ! It does work. Awesome. I've uploaded the further reduced test to PR/119533 Hmm, I'm seeing the same ICE as before with my patch. Did you happen to change something else on your local tree still? -- Regards Robin

.ACCESS_WITH_SIZE and pointer ranges

2025-04-08 Thread Siddhesh Poyarekar
On 2025-04-08 12:41, Qing Zhao wrote: For the following small example: [ counted_by_whole]$ cat t.c #include #include struct annotated { size_t count; char other; char array[] __attribute__((counted_by (count))); }; #define MAX(A, B) (A > B) ? (A) : (B) #define ALLOC_SIZE_ANNOTATED(

Re: [PATCH] bootstrap/119680 - fix cross-compiler build with --enable-host-shared

2025-04-08 Thread Ian Lance Taylor
Jakub Jelinek writes: > On Tue, Apr 08, 2025 at 03:03:03PM +0200, Richard Biener wrote: >> It seems that at least when cross-compiling at least collect2 pulls >> in objects from libbacktrace.a which is linked via LIBDEPS. But >> libbacktrace for the host is only built -fPIC with --enable-host-sh

[Patch] Fortran: Add code gen for do,concurrent's LOCAL/LOCAL_INIT [PR101602]

2025-04-08 Thread Tobias Burnus
This patch is essentially the one of PR101602, comment 6. Thus, it has the same issues as that patch: * LOCAL for derived-type variables with default initalizers do not work (not initialized) * LOCAL/LOCAL_INIT for assumed-shape arrays fails (need some 'malloc'/'free' calls + some more other

Re: [pushed] c++: lambda in requires outside template [PR99546]

2025-04-08 Thread Patrick Palka
On Fri, 4 Apr 2025, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > Since r10-7441 we set processing_template_decl in a requires-expression so > that we can use tsubst_expr to evaluate the requirements, but that confuses > lambdas terribly; begin_lambda_typ

Re: [PATCH] cobol: Fix up update_web_docs_git for COBOL [PR119227]

2025-04-08 Thread Simon Sobisch
Note that there's still an index.html missing, compare https://gcc.gnu.org/onlinedocs/gfortran/index.html and https://gcc.gnu.org/onlinedocs/gcobol/index.html (not found) Simon

[PATCH GCC 14] c++: ICE with nested default targ lambdas [PR119574]

2025-04-08 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for the 14 branch? -- >8 -- In GCC 14 we fixed PR116567 in a more conservative way that doesn't distinguish between the two kinds of deferred substitutions, and we instead ICE from get_innermost_template_args due to TMPL_PARMS_D

[COMMITTED] Doc: Copy-edit text about -Wno-xxx [PR90468]

2025-04-08 Thread Sandra Loosemore
The issue is specifically about a missing word, but I spotted other copy-editing issues like misplaced hyphens in nearby text. I also thought that the -Wimplicit example was anachronistic because it's a hard error in modern C dialects rather than a warning, and replaced it with something users are

Re: [PATCH v3] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread H.J. Lu
On Tue, Apr 8, 2025 at 9:59 AM Ard Biesheuvel wrote: > > On Tue, 8 Apr 2025 at 18:44, H.J. Lu wrote: > > > > On Tue, Apr 8, 2025 at 9:39 AM Ard Biesheuvel wrote: > > > > > > On Tue, 8 Apr 2025 at 15:33, H.J. Lu wrote: > > > > > > > > On Tue, Apr 8, 2025 at 3:46 AM Ard Biesheuvel > > > > wrote

Re: [PATCH v3] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread H.J. Lu
On Tue, Apr 8, 2025 at 9:39 AM Ard Biesheuvel wrote: > > On Tue, 8 Apr 2025 at 15:33, H.J. Lu wrote: > > > > On Tue, Apr 8, 2025 at 3:46 AM Ard Biesheuvel wrote: > > > > > > From: Ard Biesheuvel > > > > > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > > > __fentry__")

Re: [Stage1][Middle-end][object-size][PATCH v1] Evaluate the object size by the size of the pointee type

2025-04-08 Thread Qing Zhao
> On Apr 8, 2025, at 12:54, Siddhesh Poyarekar wrote: > > On 2025-04-08 12:41, Qing Zhao wrote: >> The gimple IR is: >> 1 int main () >> 2 { >> 3 int D.5072; >> 4 >> 5 { >> 6 struct annotated * q; >> 7 >> 8 q = alloc_buf (10); >> 9 _1 = __builtin_dynamic_object

Re: [Stage1][Middle-end][object-size][PATCH v1] Evaluate the object size by the size of the pointee type

2025-04-08 Thread Qing Zhao
Hi, Sid, I further studied the approach to generate .ACCESS_WITH_SIZE in C FE for the pointer with a STRUCTURE TYPE with counted-by FAM. One thing bother me is the following: For the following small example: [ counted_by_whole]$ cat t.c #include #include struct annotated { size_t count;

Re: [COMMITTED] gcc-15/changes: Document Ada changes

2025-04-08 Thread Eric Botcazou
> Thanks Fernando, Seconded. > I've pushed the attached changes. I have made a few subsequent tweaks (attached). -- Eric Botcazou diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-15/changes.html index 8220d130..e29fca9d 100644 --- a/htdocs/gcc-15/changes.html +++ b/htdocs/gcc-15/changes.ht

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Vineet Gupta
On 4/8/25 02:12, Robin Dapp wrote: >> However we still see lift up using those blocks - the earliest set computed >> contained the supposedly elided bbs. >> >>   Try lift up 0. >> >>   earliest: >>     Edge(bb 16 -> bb 17): n_bits = 3, set = {1 } >> >>   Try lift up 1. >> >>

[committed] riscv: Fix a typo in config/riscv/freebsd.h [PR119678]

2025-04-08 Thread Jakub Jelinek
Hi! The r15-1124 commit had a typo in one of the FBSD_LINK_PG_NOTE macro uses. Fixed thusly, tested with ../configure --target riscv64-unknown-freebsd14 --disable-bootstrap --enable-languages=c --disable-libsanitizer --disable-libgomp make -j32 Before it failed while compiling gcc.cc: In file in

Re: [PATCH] libcpp: Fix error recovery after use of __VA_ARGS__ as macro argument [PR118674]

2025-04-08 Thread Marek Polacek
On Tue, Apr 08, 2025 at 10:19:58AM +0200, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs after emitting one pedwarn (about using > __VA_ARGS__ in a place where it shouldn't be used) and one error. > The error is emitted by _cpp_save_parameter where it sees the node > has been used alre

[PATCH GCC 15] c++: ICE with nested default targ lambdas [PR119574]

2025-04-08 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Here we substitute into the inner lambda twice, first during default argument substitution for the outer template parameters, then during that for the inner template parameters. For the second testcase (whic

Re: [PATCH] bootstrap/119680 - fix cross-compiler build with --enable-host-shared

2025-04-08 Thread Jakub Jelinek
On Tue, Apr 08, 2025 at 03:03:03PM +0200, Richard Biener wrote: > It seems that at least when cross-compiling at least collect2 pulls > in objects from libbacktrace.a which is linked via LIBDEPS. But > libbacktrace for the host is only built -fPIC with --enable-host-shared > but not -fPIE with --e

Re: [PATCH v3] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread H.J. Lu
On Tue, Apr 8, 2025 at 3:46 AM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > __fentry__") updated the logic that emits mcount() / __fentry__() calls > into function prologues when profiling is enabled, to avoid GOT-based

Re: [PATCH v2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread H.J. Lu
On Tue, Apr 8, 2025 at 3:15 AM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > __fentry__") updated the logic that emits mcount() / __fentry__() calls > into function prologues when profiling is enabled, to avoid GOT-based

[COMMITTED 26/32] gccrs: Adapt testcase to name resolution 2.0

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry Name resolution 2.0 behavior matches more closely rustc's behavior and trying to prevent undeclared label error emission would break some other test. gcc/testsuite/ChangeLog: * rust/compile/invalid_label_name.rs: Adapt test to nr2. Signed-off-by: Pierre-Emma

[PATCH] bootstrap/119680 - fix cross-compiler build with --enable-host-shared

2025-04-08 Thread Richard Biener
It seems that at least when cross-compiling at least collect2 pulls in objects from libbacktrace.a which is linked via LIBDEPS. But libbacktrace for the host is only built -fPIC with --enable-host-shared but not -fPIE with --enable-host-pie so this fails. The following teaches libbacktrace about

[pushed] c++: self-dependent alias template [PR117530]

2025-04-08 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Here, instantiating B means instantiating A, which means instantiating B. And then when we go to register the initial instantiation, it conflicts with the inner one. Fixed by checking after tsubst whether there's already something in the h

Re: [Stage1][Middle-end][object-size][PATCH v1] Evaluate the object size by the size of the pointee type

2025-04-08 Thread Qing Zhao
> On Apr 7, 2025, at 13:43, Siddhesh Poyarekar wrote: > > On 2025-04-07 11:56, Qing Zhao wrote: >> when the type is a structure with flexible array member. > > Not just when the structure has a flexible array member, also when the FAM > size is recorded in a __counted_by__, isn't it? Yes, yo

Re: [PATCH v3] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread Michael Matz
Hey, On Tue, 8 Apr 2025, Uros Bizjak wrote: > > From: Ard Biesheuvel > > > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > > __fentry__") updated the logic that emits mcount() / __fentry__() calls > > into function prologues when profiling is enabled, to avoid GOT-based

Re: vsetvl abormal edge (was Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533])

2025-04-08 Thread Robin Dapp
Hi Vineet, However we still see lift up using those blocks - the earliest set computed contained the supposedly elided bbs.   Try lift up 0.   earliest:     Edge(bb 16 -> bb 17): n_bits = 3, set = {1 }   Try lift up 1.   earliest:     Edge(bb 15 -> bb

Re: [PATCH] expr: Use constant_lower_bound classifying constructor els [PR116595].

2025-04-08 Thread Richard Biener
On Tue, Apr 8, 2025 at 2:25 PM Robin Dapp wrote: > > Hi, > > in categorize_ctor_elements_1 we do > VECTOR_CST_NELTS (value).to_constant () > but VALUE's type can be a VLA vector (since r15-5780-g17b520a10cdaab). > > This patch uses constant_lower_bound instead. > > Bootstrapped and regtested on

[COMMITTED 28/32] gccrs: Rename label getter in ContinueExpr

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Call unchecked getter. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise. * ast/rust-ast.cc (ContinueExpr::as_string): Likewise. * hir

[PUSHED 1/2] GCN, nvptx: Define '_Unwind_DeleteException'

2025-04-08 Thread Thomas Schwinge
This resolves GCN: ld: error: undefined symbol: _Unwind_DeleteException >>> referenced by eh_catch.cc:109 ([...]/source-gcc/libstdc++-v3/libsupc++/eh_catch.cc:109) >>> eh_catch.o:(__cxa_end_catch) in archive [...]/build-gcc/amdgcn-amdhsa/libstdc++-v3/src/.libs/libstdc++

Re: [PATCH v3] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread Uros Bizjak
On Tue, Apr 8, 2025 at 12:47 PM Ard Biesheuvel wrote: > > From: Ard Biesheuvel > > Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling > __fentry__") updated the logic that emits mcount() / __fentry__() calls > into function prologues when profiling is enabled, to avoid GOT-base

[Patch] OpenMP: Fix append_args handling in modify_call_for_omp_dispatch

2025-04-08 Thread Tobias Burnus
While the tree dump looked fine to a C coder, passing an array argument requires the '&' to take the address. Additionally, it makes sense to associate the call line number to the library calls - making the stepping through in the debugger more consistent. I was considering putting the init/clean

Re: [PATCH] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread Alexander Monakov
On Sun, 6 Apr 2025, Ard Biesheuvel wrote: > > Note that this patch touches only 64-bit codegen, -m32 will yield > > call *mcount@GOT as before (the previous patch also touched only 64-bit > > case). > > > > I will mention this in the commit log. Just wanted to remind about this, since v2 seem

[PUSHED 2/2] GCN, nvptx: Define '_Unwind_RaiseException', '_Unwind_Resume_or_Rethrow'

2025-04-08 Thread Thomas Schwinge
This resolves GCN: ld: error: undefined symbol: _Unwind_RaiseException >>> referenced by eh_throw.cc:93 ([...]/source-gcc/libstdc++-v3/libsupc++/eh_throw.cc:93) >>> eh_throw.o:(__cxa_throw) in archive /srv/data/tschwinge/amd-instinct2/gcc/build/submit-light-target_gcn/b

[PUSHED] nvptx: In offloading compilation, special-case certain host-setup symbol aliases: avoid unused label 'emit_ptx_alias' diagnostic

2025-04-08 Thread Thomas Schwinge
Minor fix-up for commit 65b31b3fff2fced015ded1026733605f34053796 "nvptx: In offloading compilation, special-case certain host-setup symbol aliases [PR101544]", as of which we see for non-offloading configurations: +[...]/source-gcc/gcc/config/nvptx/nvptx.cc: In function 'void nvptx_asm_outpu

[PATCH v2] i386: Prefer PLT indirection for __fentry__ calls under -fPIC

2025-04-08 Thread Ard Biesheuvel
From: Ard Biesheuvel Commit bde21de1205 ("i386: Honour -mdirect-extern-access when calling __fentry__") updated the logic that emits mcount() / __fentry__() calls into function prologues when profiling is enabled, to avoid GOT-based indirect calls when a direct call would suffice. There are two

[Patch] libgomp: Add -Wno-c-binding-type for omp_lib.f90 compilation

2025-04-08 Thread Tobias Burnus
Let's finally fix this issue. gfortran tries to make sure that BIND(C) functions are really compatible with C, e.g. by nagging (warning) when 'integer' instead of 'integer(kind=c_int)' is used, with c_int coming from the ISO_C_binding module. While making sense, in general, to use those - it doe

Re: [PATCH] simplify-rtx: Fix up POPCOUNT optimization [PR119672]

2025-04-08 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > The gcc.dg/vect/pr113281-1.c test and many others ICE on riscv since > presumably the r15-9238 change which allowed more cases of vector modes > in simplify_const_relational_operation. > In the testcase it is EQ of > (popcount:SI (unspec:RVVMF32BI [ > (a

Re: [PATCH] cse, v3: Fix up delete_trivially_dead_insns [PR119594]

2025-04-08 Thread Richard Biener
On Sat, 5 Apr 2025, Jakub Jelinek wrote: > On Fri, Apr 04, 2025 at 07:51:54PM +0200, Jakub Jelinek wrote: > > On Fri, Apr 04, 2025 at 03:06:52PM +0100, Richard Sandiford wrote: > > > > 2025-04-04 Jakub Jelinek > > > > > > > > PR rtl-optimization/119594 > > > > * cse.cc (count_re

[PATCH] simplify-rtx: Fix up POPCOUNT optimization [PR119672]

2025-04-08 Thread Jakub Jelinek
Hi! The gcc.dg/vect/pr113281-1.c test and many others ICE on riscv since presumably the r15-9238 change which allowed more cases of vector modes in simplify_const_relational_operation. In the testcase it is EQ of (popcount:SI (unspec:RVVMF32BI [ (and:RVVMF32BI (const_vector:RVVMF32BI r

Re: [PATCH] cobol: Incremental fix to fix up cobol cross-compilation from 32-bit arches [PR119364]

2025-04-08 Thread Richard Biener
On Tue, Apr 8, 2025 at 10:53 AM Jakub Jelinek wrote: > > Hi! > > Here is an incremental fix on top of the > https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680256.html > patch. As I said, there were various FAILs in make check-cobol > when using the cross compiler from 32-bit host to x86_64-

Re: [PATCH] lto: Add & ~CF_SET into lto-opts.cc [PR119625]

2025-04-08 Thread Richard Biener
On Tue, 8 Apr 2025, Jakub Jelinek wrote: > Hi! > > The following patch uses & ~CF_SET so that we get the -fcf-protection= > options into .gnu.lto_.opts section even when it has CF_SET bit set. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. > 2025-04-08 Jakub Jeli

[COMMITTED] gcc-15/changes: Document Ada changes

2025-04-08 Thread Marc Poulhiès
From: Fernando Oleo Blanco Co-authored-by: Marc Poulhiès --- Thanks Fernando, I've pushed the attached changes. Marc htdocs/gcc-15/changes.html | 112 - 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-15/changes.html b/htdocs/gcc-

[COMMITTED 31/32] gccrs: nr2.0: Adjust test issue-2812.rs

2025-04-08 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/issue-2812.rs: Avoid multiple definition error. * rust/compile/nr2/exclude: Remove issue-2812.rs. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/issue-2812.rs | 4 ++-- gcc/testsuite/rust/compile/nr2/exclude

[PATCH] lto: Add & ~CF_SET into lto-opts.cc [PR119625]

2025-04-08 Thread Jakub Jelinek
Hi! The following patch uses & ~CF_SET so that we get the -fcf-protection= options into .gnu.lto_.opts section even when it has CF_SET bit set. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2025-04-08 Jakub Jelinek PR lto/119625 * lto-opts.cc (lto_write

[COMMITTED 27/32] gccrs: Change optional to expected for parse_loop_label

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_loop_label): Change function return type to expected. (Parser::parse_labelled_loop_expr): Adapt call location to new return type. * parse/rust-parse.h (enum class): Up

[PATCH] libcpp: Fix error recovery after use of __VA_ARGS__ as macro argument [PR118674]

2025-04-08 Thread Jakub Jelinek
Hi! The following testcase ICEs after emitting one pedwarn (about using __VA_ARGS__ in a place where it shouldn't be used) and one error. The error is emitted by _cpp_save_parameter where it sees the node has been used already earlier. But unlike the other _cpp_save_parameter caller which does go

[COMMITTED 23/32] gccrs: Migrate error state to optionals

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::self_ref_param): Remove error state and use optional. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Check label before visiting. * ast/rust-ast.cc (ContinueExpr::as

[COMMITTED 32/32] gccrs: nr2.0: Adjust test macro6.rs

2025-04-08 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/macros/mbe/macro6.rs: Remove call of undefined function. * rust/compile/nr2/exclude: Remove macros/mbe/macro6.rs. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/macros/mbe/macro6.rs | 2 +- gcc/testsuit

[PATCH] cobol: Incremental fix to fix up cobol cross-compilation from 32-bit arches [PR119364]

2025-04-08 Thread Jakub Jelinek
Hi! Here is an incremental fix on top of the https://gcc.gnu.org/pipermail/gcc-patches/2025-April/680256.html patch. As I said, there were various FAILs in make check-cobol when using the cross compiler from 32-bit host to x86_64-linux. This patch fixes most of them, except for Running /home/jaku

[COMMITTED 22/32] gccrs: Update ast visitor with proper check for looplabel

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry The visitor was visiting loop label even when they did not exist. gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Add check for loop label before visiting it. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast-

[COMMITTED 30/32] gccrs: fix ICE segfault with empty feature gate

2025-04-08 Thread arthur . cohen
From: Matty Kuhn This patch fixes an issue where an empty feature gate would segfault, instead of reporting a syntax error to the user. gcc/rust/ChangeLog: * ast/rust-ast.h: (AST::Attribute): add empty_input function * checks/errors/rust-feature-gate.cc: (FeatureGate::visit): ch

[COMMITTED 25/32] gccrs: Resolve labels within break or continue expressions

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add call to label resolution if there is one label. (Late::resolve_label): Look for labels and emit an error message on failure. * resolve/rust-late-nam

[COMMITTED 13/32] gccrs: nr2.0: Remove duplicate self visit

2025-04-08 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Remove explicit visitation of a function's self parameter, as if it exists it'll be visited as one of the function parameters. gcc/testsuite/ChangeLog: * rust/comp

RE: [gcc-wwwdocs PATCH] gcc-14/15: Mention recent change for Intel x86_64

2025-04-08 Thread Jiang, Haochen
> From: Gerald Pfeifer > Sent: Sunday, March 30, 2025 4:23 AM > > On Mon, 24 Mar 2025, Haochen Jiang wrote: > > Mention AVX10.1 option changes, revise AVX10.2 option and mention > > APX_F new feature in GCC 15. > > --- > > >New ISA extension support for Intel AVX10.1 was added. > > - AV

[COMMITTED 29/32] gccrs: Rename label getter to unchecked

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Update label getter call. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise. * ast/rust-ast.cc (BreakExpr::as_string): Likewise. * hir/rust-as

[COMMITTED 12/32] gccrs: Fix ICE for reserved lifetime name

2025-04-08 Thread arthur . cohen
From: Philip Herron This is a reserved name so this changes the assertion to a diagnostic. Fixes Rust-GCC#3647 gcc/rust/ChangeLog: * typecheck/rust-typecheck-context.cc (TypeCheckContext::lookup_lifetime): emit error gcc/testsuite/ChangeLog: * rust/compile/issue-3647.rs: New

[COMMITTED 18/32] gccrs: Add check for label

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit loop label only if it exists. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove passing test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/r

[COMMITTED 20/32] gccrs: Make loop label truly optional

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry A loop label error state was in use to represent missing loop label but this may be easily forgotten and the optional nature of the label was misrepresented. gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (Builder::block): Call with a nullopt instead o

[COMMITTED 14/32] gccrs: nr2.0: Improve test script

2025-04-08 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/nr2/compile.exp: Avoid absolute paths in output, adjust phrasing of output, and avoid false XPASS output when tests are run in parallel. Signed-off-by: Owen Avery --- gcc/testsuite/rust/compile/nr2/compile.exp |

[COMMITTED 19/32] gccrs: Visit loop label before predicate expression

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry If the label is referenced within the while predicate expression it has to be resolved before the latter. gcc/rust/ChangeLog: * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Change default visit order. gcc/testsuite/ChangeLog: * rust/c

[COMMITTED 05/32] gccrs: Fix ICE when there are 2 functions named main

2025-04-08 Thread arthur . cohen
From: Philip Herron We need to setup the main_identifier_node for MAIN_DECL_P checks in the middle-end. But it is valid to have a main function/method on impl blocks. So we need to flag if this is a "root" item or not, which is one that is jsut an HIR::Function on part of the Crate::items as oppp

[COMMITTED 11/32] gccrs: hir: Add default qualifier to function, lower it properly

2025-04-08 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast.cc (Function::Function): Rename is_default -> has_default. (Function::operator=): Likewise. * ast/rust-item.h (class Function): Add `is_default` method. * hir/rust-ast-lower-implitem.cc (ASTLowerImplItem::visi

[COMMITTED 09/32] gccrs: Fix ICE when hitting invalid types for generics

2025-04-08 Thread arthur . cohen
From: Philip Herron We need to check upfront if the type is valid or not. Then error with a decent message. Fixes Rust-GCC#3643 Fixes Rust-GCC#3646 Fixes Rust-GCC#3654 Fixes Rust-GCC#3663 Fixes Rust-GCC#3671 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePat

[COMMITTED 16/32] gccrs: Revert part of 44ffe1193269

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry This commit got rid of msvc specific code and remove the else clause, this triggered warning with tl::expected::value function. gcc/rust/ChangeLog: * util/expected.h: Use gcc_unreachable within gcc context. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust

[COMMITTED 08/32] gccrs: Fix ICE on raw reference

2025-04-08 Thread arthur . cohen
From: Philip Herron This patch adds support for raw references which enforce the pointer type away from a reference type. Fixes Rust-GCC#3667 gcc/rust/ChangeLog: * backend/rust-compile-base.cc (HIRCompileBase::address_expression): allow optional type * backend/rust-compile-bas

[COMMITTED 17/32] gccrs: Resolve labels

2025-04-08 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * hir/rust-ast-lower.cc (ASTLoweringBlock::visit): Lower label only if it exists. * hir/tree/rust-hir-expr.cc (BlockExpr::BlockExpr): Make loop label optional. (BaseLoopExpr::BaseLoopExpr): Likewise.

[COMMITTED 15/32] gccrs: refactoring rust_error_at "redefined multiple times"

2025-04-08 Thread arthur . cohen
From: Sri Ganesh Thota gcc/rust/ChangeLog: * resolve/rust-ast-resolve-base.h (redefined_error): created a function for rust_error_at for redefined at multiple times. * resolve/rust-ast-resolve-implitem.h: changed rust_error_at to redefined_error. * resolve/rust-

[COMMITTED 01/32] gccrs: Evaluate the enum's discriminant in a const context

2025-04-08 Thread arthur . cohen
From: Ryutaro Okada <1015ry...@gmail.com> gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc: Evaluate the enum's discriminant in a const context gcc/testsuite/ChangeLog: * rust/compile/enum_discriminant1.rs: New test. Signed-off-by: Ryutaro Okada <1015ry...@gmail.com>

[COMMITTED 06/32] gccrs: Fix recusive type query and nullptr on type path

2025-04-08 Thread arthur . cohen
From: Philip Herron This was a small fix to sort out the segfault to check for nullptr on the TypePath cases for query type. But when this happened opened up a few bugs that were hidden under the carpet namely: compile/issue-2905-{1,2}.rs which has a recursive type query which needs to ne handled

[COMMITTED 02/32] gccrs: nr2.0: Handle global paths

2025-04-08 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack::ForeverStack): Initialize extern_prelude. (ForeverStack::resolve_path): Add parameter has_opening_scope_resolution. (ForeverStack::extern_prelude): Add field. * reso

[COMMITTED 03/32] gccrs: Fix ICE when doing shift checks on const decl

2025-04-08 Thread arthur . cohen
From: Philip Herron Const decls are just delcarations wrapping the value into the DECL_INITIAL and the shift checks we have assume no decls are involved and its just flat values. This patch simply unwraps the constant values if they exist. Fixes Rust-GCC#3665 gcc/rust/ChangeLog: * rust

Re: [RFC PATCH 6/7] ipa: Remove type checks in arithmetic pass-through jfunc construction

2025-04-08 Thread Jan Hubicka
> After reviewing the code involving arithmetic pass-through jump > functions I found out that we actually do check that the type of the > LHS is compatible with the type of the first operand on the RHS. Now > that we stream the types of the LHS of these operations, this is no > longer necessary -

Re: [PATCH 4/7] ipa-cp: Use the stored and streamed pass-through types in ipa-vr (PR118785)

2025-04-08 Thread Jan Hubicka
> This patch revisits the fix for PR 118785 and intead of deducing the > necessary operation type it just uses the value collected and streamed > by an earlier patch. > > gcc/ChangeLog: > > Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for > master? > > Thanks, > > Martin >

Re: [PATCH 3/7] ipa-cp: Make dumping of widest_ints even more sane

2025-04-08 Thread Jan Hubicka
> This patch just introduces a form of dumping of widest ints that only > have zeros in the lowest 128 bits so that instead of printing > thousands of f's the output looks like: > >Bits: value = 0x, mask = all ones folled by > 0x > > and then makes sur

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

2025-04-08 Thread Jan Hubicka
> 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 operations are made and > must limit its precision there. This implements just that, using the > newly collected

  1   2   >