[PATCH 1/2] Make function_decl_type a scoped enum

2025-03-19 Thread Richard Biener
The enum currently has a member named NONE which pollutes the global namespace unnecessarily. Use a scoped enum instead. Bootstrap and regtest running on x86_64-unknown-linux-gnu. OK if that succeeds? gcc/ * tree-core.h (function_decl_type): Make a scoped enum. * tree.h (set_fun

Re: [PING, REFORMAT][PATCH v2, 1/1] libstdc++: Fix localized D_T_FMT %c formatting for [PR117214]

2025-03-19 Thread Jonathan Wakely
On Sat, 1 Mar 2025 at 05:24, XU Kailiang wrote: > > Formatting a time point with %c was implemented by calling > std::vprint_to with format string constructed from locale's D_T_FMT > string, but in some locales this string does not compliant to > chrono-specs. So just use _M_locale_fmt to avoid th

Re: [Fortran, Patch, PR119272, v1] Fix handling of class' component call in associate

2025-03-19 Thread Andre Vehreschild
Hi Harald and Paul, thanks for the reviews. Committed as gcc-15-8297-g9a13dc48a3a. Paul, I am working on the change team construct at the moment. It has an association list embedded. I will finish that work hopefully soon. After that it will be safe for you to "get out your notes and restart" w/o

[PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean

2025-03-19 Thread Richard Biener
The following removes HOWEVER_GCC_DEFINES_TREE and the alternate definition of tree from symbols.h and instead ensures that both coretypes.h and tree.h are included where required. This required putting GCCs own 'NONE' in a scoped enum (see separate patch) and renaming the cobol use of UNSIGNED, S

Re: [Fortran, Patch, PR119272, v1] Fix handling of class' component call in associate

2025-03-19 Thread Andre Vehreschild
Hi Harald, thanks for the comments. > your solution looks basically correct to me, but I wonder why to > return early w/o error. Would the following logic be wrong? > > @@ -7349,7 +7357,8 @@ resolve_compcall (gfc_expr* e, const char **name) > gfc_symtree* target; > > /* Check that's real

Re: [PATCH] C++: Adjust implicit '__cxa_bad_cast' prototype to reality

2025-03-19 Thread Jonathan Wakely
On Wed, 19 Mar 2025 at 14:21, Marek Polacek wrote: > > On Wed, Mar 19, 2025 at 12:38:31PM +0100, Thomas Schwinge wrote: > > In 2001 Subversion r40924 (Git commit > > 52a11cbfcf0cfb32628b6953588b6af4037ac0b6) > > "IA-64 ABI Exception Handling", '__cxa_bad_cast' changed from 'void *' to > > 'void'

[COMMITTED 039/144] gccrs: Scaffolding asm codegen

2025-03-19 Thread arthur . cohen
From: jjasmine gcc/rust/ChangeLog: * backend/rust-compile-block.h: Scaffolding asm codegen * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise. * backend/rust-compile-expr.h: Likewise. * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (Expr

[COMMITTED 015/144] gccrs: Add location to BIR::Loan

2025-03-19 Thread arthur . cohen
From: Kushal Pal This commit adds location_t to BIR::Loan, this location will point to location is source code where the borrow occured, this information will be useful for reporting borrow-checking errors. gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-internal.h:

[COMMITTED 021/144] gccrs: [gccrs#2324] Add error message for E0532

2025-03-19 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc: Emit E0532 when trying to reference a Tuple or Struct variant using a non Tuple or Struct pattern. gcc/testsuite/ChangeLog: * rust/compile/issue-2324-1.rs: add test for E053

[COMMITTED 012/144] gccrs: Set up the hir lowering for operand

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * hir/rust-ast-lower-expr.cc (from_operand): Set up the lowering for operand (ASTLoweringExpr::visit): Likewise * hir/tree/rust-hir-expr.h (struct InlineAsmRegOrRegClass): Not necessary, kept from ast (struct A

[COMMITTED 024/144] gccrs: Subset errors with locations

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc (BorrowCheckerDiagnostics::report_subset_errors): Highlight lifetime locations while reporting subset errors. (BorrowCheckerDiagnostics::get_lifetime_param): Helper fu

[COMMITTED 023/144] gccrs: Map locations to placeholder regions

2025-03-19 Thread arthur . cohen
From: Kushal Pal Mapped placeholder regions to their respective HIR nodes so we can fetch locations during error reporting. gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder.h: Map regions to their respective HIR nodes. * checks/errors/borrowck/rust-bir.h (st

[COMMITTED 065/144] gccrs: Use FreeRegions inplace of `std::vector`

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-internal.h: Use FreeRegions instead of making a temporary vector of FreeRegion. * checks/errors/borrowck/rust-bir-builder.h: Likewise. * checks/errors/borrowck/rust-bir-fact-collector.h

[COMMITTED 016/144] gccrs: Implement resolve expr for inline asm ast

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Implement resolve expr for inline asm ast (translate_operand): Likewise. * resolve/rust-ast-resolve-expr.h: Likewise. --- gcc/rust/resolve/rust-ast-resolve-expr.cc | 67

[COMMITTED 020/144] gccrs: Eager expansion for include* gccrs#1805 gccrs#1865

2025-03-19 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * expand/rust-expand-visitor.h: remove auto keyword * expand/rust-macro-builtins-helpers.cc: allow for changing macro invoc types on eager expansions to semicoloned macros * expand/rust-macro-builtins-helpers.

[COMMITTED 059/144] gccrs: Rehaul, Apply code review from Arthur

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::visit): Change API, public/private, comments, formatting from code review (CompileAsm::asm_build_expr): Likewise. (CompileAsm::tree_codegen_asm): Likewise. * backend/r

[COMMITTED 075/144] gccrs: Used `IndexVec` for place_map

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Use strong type instead of size_t. (Dump::visit_place): Likewise. (Dump::visit_scope): Likewise. * checks/errors/borrowck/rust-bir-dump.h (class Dump): Use I

[COMMITTED 028/144] gccrs: ast: Remove PathExpr abstract class

2025-03-19 Thread arthur . cohen
From: Arthur Cohen Inherit directly from ExprWithoutBlock instead. gcc/rust/ChangeLog: * ast/rust-ast.h (class PathExpr): Remove class. * ast/rust-path.h (class PathInExpression): Inherit from ExprWithoutBlock. (class QualifiedPathInExpression): Likewise. --- gcc/rust/

[COMMITTED 042/144] gccrs: Setting up interfaces for codegen

2025-03-19 Thread arthur . cohen
From: jjasmine gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): Setting up interfaces for codegen * hir/tree/rust-hir-expr.h: Likewise. --- gcc/rust/backend/rust-compile-expr.cc | 6 -- gcc/rust/hir/tree/rust-hir-expr.h | 26 +

[COMMITTED 066/144] gccrs: Strong type LoanId

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-dump.cc (Dump::visit): Use new API, i.e get_loan_id() instead of get_loan(). * checks/errors/borrowck/rust-bir-fact-collector.h (points): Use value of LoanId in Polonius facts. * checks

[COMMITTED 127/144] gccrs: Fix some issues with canonical path fetching in name resolution 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-enumitem.cc: Add includes. (TypeCheckEnumItem::visit): Fetch canonical paths properly when name resolution 2.0 is enabled. * typecheck/rust-hir-type-check-implitem.cc: Add includes. (Type

[COMMITTED 140/144] gccrs: Load unloaded modules during toplevel resolution 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery This may load conditionally compiled modules too eagerly. gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Load unloaded modules before attempting to visit their items. gcc/testsuite/ChangeLog: * rust/compile/

[COMMITTED 051/144] gccrs: Move strip double quotes, add scaffold expand

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (strip_double_quotes): Move strip double quotes to parse phase (CompileAsm::asm_construct_string_tree): Likewise * backend/rust-compile-asm.h (strip_double_quotes): Likewise * expand/rust-

[COMMITTED 027/144] gccrs: ast: PathPattern: Remove `remove_all_segments` method

2025-03-19 Thread arthur . cohen
From: Arthur Cohen This method was used only for stripping PathPattern AST nodes during `cfg-strip`, which seems like a misnomer and makes it a good candidate for simplification. gcc/rust/ChangeLog: * ast/rust-path.h (class PathInExpression): Remove `remove_all_segments` method,

[COMMITTED 072/144] gccrs: Used `IndexVec` for BasicBlocks

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Use strong type as index and remove access to numeric value. * checks/errors/borrowck/rust-bir-builder-internal.h (struct BuilderContext):

[COMMITTED 091/144] gccrs: nr2.0: default-visitor: Conditionally visit type in self parameters.

2025-03-19 Thread arthur . cohen
From: Arthur Cohen This could trigger an assertions as `get_type` on `SelfParam` asserts that the self param does have a given type, which is not always the case. gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Do not visit self's type if it does

[COMMITTED 080/144] gccrs: [gccrs#3141] Fix incorrect handling of overflow in numeric types

2025-03-19 Thread arthur . cohen
From: JoanVC Fixes gccrs#3141. gcc/rust/ChangeLog: * backend/rust-compile-expr.cc: Fix range checking for both integers and floats. * hir/tree/rust-hir-expr.h: Add "negative_number" boolean to LiteralExpr class. gcc/testsuite/ChangeLog: * rust/compile/issue-3141.rs:

[COMMITTED 031/144] gccrs: attributes: Start handling prelude_import properly

2025-03-19 Thread arthur . cohen
From: Arthur Cohen This commit adds basic handling for the `#[prelude_import]` attribute, without doing anything functionality wise. gcc/rust/ChangeLog: * checks/errors/rust-feature-gate.cc (FeatureGate::visit): Add base feature gating for `#[feature(prelude_import)]`. *

[COMMITTED 134/144] gccrs: Provide input operand for gccrs

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_construct_inputs): Provide input operand for gccrs * expand/rust-macro-builtins-asm.cc (parse_reg_operand_in): Move expr to In (expand_inline_asm_strings): Add com

[COMMITTED 142/144] gccrs: Use name resolver 2.0 for compiling break/continue

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): Use name resolver 2.0 to lookup label definitions for break and continue statements when name resolution 2.0 is enabled. Signed-off-by: Owen Avery --- gcc/rust/backend/rus

[COMMITTED 084/144] gccrs: Fix ICE on error propagation with generic

2025-03-19 Thread arthur . cohen
From: "benjamin.thos" add a resolve expr visitor on error propagation to avoid internal compiler error when used with generics gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Add implementation of error propagation visitor * resolve/rust-ast-

[COMMITTED 099/144] gccrs: early: Do not emit errors for unresolved imports, store them instead

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes): Store errors for later. --- gcc/rust/resolve/rust-early-name-resolver-2.0.cc | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gcc/rust/r

[COMMITTED 087/144] gccrs: Add extra assertions to tl::optional

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * util/optional.h (optional): Add assertions to dereference operator overloads when C++14 is available. Signed-off-by: Owen Avery --- gcc/rust/util/optional.h | 86 1 file changed, 79 inserti

[COMMITTED,PATCH] s390: testsuite: Fix vcond-shift.c

2025-03-19 Thread Stefan Schulze Frielinghaus
Previously we optimized expressions of the form a < 0 ? -1 : 0 to (signed)a >> 31 during vcond expanding. Since r15-1638-gaac00d09859cc5 this is done in match.pd. The implementation in the back end as well as in match.pd are basically the same but still distinct. For the tests in vcond-shift.c t

[COMMITTED 093/144] gccrs: toplevel: Build list of imports for Early to resolve

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc: Comment out handle_use call and error emission. * resolve/rust-toplevel-name-resolver-2.0.h: Create ImportKind class. --- .../rust-toplevel-name-resolver-2.0.cc| 37 +++-

[PATCH 12/27] Revert "AVX10.2 ymm rounding: Support vfmaddcph and vfmaddsub{132, 231, 213}p{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit cfbc94eaf167ae7aecd21ee6054556e1cf9d7143. --- gcc/config/i386/avx10_2roundingintrin.h | 238 -- gcc/config/i386/i386-builtin.def | 13 - gcc/config/i386/sse.md| 4 +- gcc/testsuite/gcc.target/i386/avx-1.c |

[PATCH 01/27] i386: Remove 256 bit rounding for AVX10.2 minmax and convert instructions

2025-03-19 Thread Haochen Jiang
Since we will support 512 bit on both P-core and E-core, 256 bit rounding is not that useful because we currently have rounding feature directly on E-core now and no need to use 256-bit rounding as somehow a workaround. This patch will remove those in AVX10.2 minmax and convert intrins. gcc/Change

[PATCH 03/27] Revert "AVX10.2 ymm rounding: Support vsqrtp{s, d, h} and vsubp{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 7f62e7104ebc11c4570745972a023579922ef265. --- gcc/config/i386/avx10_2roundingintrin.h | 339 -- gcc/config/i386/i386-builtin.def | 6 - gcc/testsuite/gcc.target/i386/avx-1.c | 6 - .../gcc.target/i386/avx10_2-rounding-3.c | 5

[PATCH 00/27] Use avx10.x as the only option for AVX10 with 512 bit vector support while remove avx10.x-256/512 option and 256 bit rounding support

2025-03-19 Thread Haochen Jiang
Hi all, It is a little late for this change but I hope this will be a welcoming change since it will greatly simplify the compiler options and reduce confusion for AVX10 option combination with AVX512. AVX10 whitepaper just got a major change and it will impact how we design the compiler option,

[PATCH 02/27] i386: Remove 256 bit rounding for AVX10.2 saturation convert instructions

2025-03-19 Thread Haochen Jiang
Since we will support 512 bit on both P-core and E-core, 256 bit rounding is not that useful because we currently have rounding feature directly on E-core now and no need to use 256-bit rounding as somehow a workaround. This patch will remove 256 bit rounding in AVX10.2 satcvt intrins. gcc/ChangeL

[PATCH 09/27] Revert "AVX10.2 ymm rounding: Support vfnmsub{132, 231, 213}p{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 0983d406ae2e84394b25248865f51c686b119a57. --- gcc/config/i386/avx10_2roundingintrin.h | 181 -- gcc/config/i386/i386-builtin.def | 9 - gcc/config/i386/sse.md| 2 +- gcc/testsuite/gcc.target/i386/avx-1.c |

[PATCH 11/27] Revert "AVX10.2 ymm rounding: Support vfm{sub, subadd}{132, 231, 213}p{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit dd48acbe85ca55dd23ffafbb917ffe559d13b6a3. --- gcc/config/i386/avx10_2roundingintrin.h | 350 -- gcc/config/i386/i386-builtin.def | 18 - gcc/config/i386/sse.md| 2 +- gcc/testsuite/gcc.target/i386/avx-1.c |

[PATCH 10/27] Revert "AVX10.2 ymm rounding: Support vfmulcph and vfnmadd{132, 231, 213}p{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 6f0aa7add1d9177f60016b32ca9ca8b16b173a56. --- gcc/config/i386/avx10_2roundingintrin.h | 241 -- gcc/config/i386/i386-builtin.def | 11 - gcc/testsuite/gcc.target/i386/avx-1.c | 11 - .../gcc.target/i386/avx10_2-rounding-3.c | 5

[PATCH 04/27] Revert "AVX10.2 ymm rounding: Support vscalefp{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 1f86cf06c7897f6ab467443b5fe8789cc95fe0c4. --- gcc/config/i386/avx10_2roundingintrin.h | 182 -- gcc/config/i386/i386-builtin.def | 3 - gcc/config/i386/sse.md| 2 +- gcc/testsuite/gcc.target/i386/avx-1.c |

[PATCH 05/27] Revert "AVX10.2 ymm rounding: Support vreducep{s, d, h} and vrndscalep{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 9afa5081212e1fc3cb2c4efc9b4f421eecf68810. --- gcc/config/i386/avx10_2roundingintrin.h | 367 -- gcc/config/i386/i386-builtin.def | 6 - gcc/config/i386/sse.md| 4 +- gcc/testsuite/gcc.target/i386/avx-1.c |

[PATCH 15/27] Revert "AVX10.2 ymm rounding: Support vcvt{, u}w2ph and vdivp{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 3d1b5530ea1d23e26dc5ab70aa4a2e7b9dc19b50. --- gcc/config/i386/avx10_2roundingintrin.h | 286 -- gcc/config/i386/i386-builtin-types.def| 1 - gcc/config/i386/i386-builtin.def | 5 - gcc/config/i386/i386-expand.cc|

[PATCH 07/27] Revert "AVX10.2 ymm rounding: Support v{max, min}p{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit cc8a7596477e9d6ac972aadabbb2fd88baa1abf4. --- gcc/config/i386/avx10_2roundingintrin.h | 360 -- gcc/config/i386/i386-builtin.def | 6 - gcc/testsuite/gcc.target/i386/avx-1.c | 6 - .../gcc.target/i386/avx10_2-rounding-3.c | 5

[PATCH 13/27] Revert "AVX10.2 ymm rounding: Support vfmadd{132, 231, 213}p{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 0683ca355a87fd36a2e7ae1721199204ceff4c4c. --- gcc/config/i386/avx10_2roundingintrin.h | 176 -- gcc/config/i386/i386-builtin.def | 9 - gcc/config/i386/sse.md| 2 +- gcc/testsuite/gcc.target/i386/avx-1.c |

Re: [PATCH] arc: testsuite: Scan "rlc" instead of "mov.hs".

2025-03-19 Thread Claudiu Zissulescu Ianculescu
LGTM. I'll merge it once stage one is open. Cheers, Claudiu On Tue, Mar 18, 2025 at 6:23 PM Luis Silva wrote: > > Due to the patch by Roger Sayle, > 09881218137f4af9b7c894c2d350cf2ff8e0ee23, which > introduces the use of the `rlc rX,0` instruction in place > of the `mov.hs`, the add overflow tes

Re: [PATCH 1/2] arc: Add commutative multiplication patterns.

2025-03-19 Thread Claudiu Zissulescu Ianculescu
LGTM, I'll merge it once stage 1 is open. Cheers, Claudiu On Tue, Mar 18, 2025 at 6:22 PM Luis Silva wrote: > > This patch introduces two new instruction patterns: > > `*mulsi3_cmp0`: This pattern performs a multiplication > and sets the CC_Z register based on the result, while > al

Re: [PATCH 2/2] arc: Use intrinsics for __builtin_mul_overflow ()

2025-03-19 Thread Claudiu Zissulescu Ianculescu
LGTM, Cheers, Claudiu On Tue, Mar 18, 2025 at 6:23 PM Luis Silva wrote: > > This patch handles both signed and unsigned > builtin multiplication overflow. > > Uses the "mpy.f" instruction to set the condition > codes based on the result. In the event of an > overflow, the V flag is set, trigger

[committed] Remove mistakenly committed file

2025-03-19 Thread Jakub Jelinek
Hi! r15-7222 added an empty file gcc.dg/pr not mentioned in the ChangeLog nor used anywhere in that patch. Removed as obvious. 2025-03-19 Jakub Jelinek * gcc.dg/pr: Remove. diff --git a/gcc/testsuite/gcc.dg/pr b/gcc/testsuite/gcc.dg/pr deleted file mode 100644 index e69de29bb2d..

[PATCH] aarch64: Add +sve2p1 to -march=armv9.4-a flags

2025-03-19 Thread Kyrylo Tkachov
Hi all, The ArmARM says: "In an Armv9.4 implementation, if FEAT_SVE2 is implemented, FEAT_SVE2p1 is implemented." We should enable +sve2p1 as part of -march=armv9.4-a, which this patch does. This makes gcc consistent with gas. Bootstrapped and tested on aarch64-none-linux-gnu. Pushing to trunk.

[PATCH] Fortran: fix bogus bounds check for reallocation on assignment [PR116706]

2025-03-19 Thread Harald Anlauf
Dear all, the attached patch addresses an actually very long-standing issue with bogus bounds checks for components of nested derived types in assignments when an intermediate level has the POINTER attribute instead of the ALLOCATABLE attribute. It turned out that the check for a reallocatable l

[committed] libstdc++: Correct statement about default -std option

2025-03-19 Thread Jonathan Wakely
The default is -std=gnu++17 now, not -std=gnu++14. libstdc++-v3/ChangeLog: * doc/xml/manual/test.xml: Fix default for -std option. * doc/html/manual/test.html: Regenerate. --- Pushed to trunk. libstdc++-v3/doc/html/manual/test.html | 4 ++-- libstdc++-v3/doc/xml/manual/test.xml

RE: [PATCH 0/4] Fix AVX10.2 SAT CVT.

2025-03-19 Thread Liu, Hongtao
> -Original Message- > From: Hu, Lin1 > Sent: Wednesday, March 19, 2025 3:49 PM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com > Subject: [PATCH 0/4] Fix AVX10.2 SAT CVT. > > Hi, all > > This series of patches fixes three issues in AVX10.2 SAT CVT: > > 1. Adds e

[PATCH v2 2/2] PR119376: Disable clang musttail

2025-03-19 Thread Andi Kleen
From: Andi Kleen There are multiple reports (see PR 119376) now where semantic differences in the gcc musttail implementation break existing programs written for the clang variant. Even though that can be all hopefully fixed eventually, for the gcc 15 release it seems safer to disable clang::mus

[PATCH v2 1/2] PR118442: Don't instrument exit edges after musttail

2025-03-19 Thread Andi Kleen
From: Andi Kleen When -fprofile-generate is used musttail often fails because the compiler adds instrumentation after the tail calls. This patch prevents adding exit extra edges after musttail because for a tail call the execution leaves the function and can never come back even on a unwind or e

RE: [PATCH 00/27] Use avx10.x as the only option for AVX10 with 512 bit vector support while remove avx10.x-256/512 option and 256 bit rounding support

2025-03-19 Thread Liu, Hongtao
> -Original Message- > From: Jiang, Haochen > Sent: Wednesday, March 19, 2025 3:38 PM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com > Subject: [PATCH 00/27] Use avx10.x as the only option for AVX10 with 512 bit > vector support while remove avx10.x-256/512 option

Ping [PATCH 0/2] v2 Add prime path coverage to gcc/gcov

2025-03-19 Thread Jørgen Kvalsvik
Ping. On 3/5/25 20:21, Jørgen Kvalsvik wrote: Ping. On 2/21/25 19:15, Jørgen Kvalsvik wrote: Ping On 2/12/25 16:30, Jørgen Kvalsvik wrote: I have applied fixes for everything in the last review, plus some GNU style fixes that I had missed previously. We have tested and used a build with this

RE: [PATCH 0/4] Fix AVX10.2 SAT CVT.

2025-03-19 Thread Liu, Hongtao
> -Original Message- > From: Liu, Hongtao > Sent: Thursday, March 20, 2025 9:29 AM > To: Hu, Lin1 ; gcc-patches@gcc.gnu.org > Cc: ubiz...@gmail.com > Subject: RE: [PATCH 0/4] Fix AVX10.2 SAT CVT. > > > > > -Original Message- > > From: Hu, Lin1 > > Sent: Wednesday, March 19, 2

Re: [PATCH v2 1/2] PR118442: Don't instrument exit edges after musttail

2025-03-19 Thread Andrew Pinski
On Wed, Mar 19, 2025 at 6:34 PM Andi Kleen wrote: > > From: Andi Kleen > > When -fprofile-generate is used musttail often fails because the > compiler adds instrumentation after the tail calls. > > This patch prevents adding exit extra edges after musttail because for a > tail call the execution

Re: [PATCH] PR118442: Don't instrument exit edges after musttail

2025-03-19 Thread Andi Kleen
> This looks wrong to me. Even tail calls can be terminated with exit, > perform longjmp, do other things for which stmt_can_terminate_bb_p > should return true. stmt_can_terminate_bb_p is used in many places, not > just in the predict instrumentation. Okay so the check should be only used for s

[COMMITTED 082/144] gccrs: Create new test system for name resolution 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery This runs the standard compile/**.rs tests with name resolution 2.0 enabled. The exclude file can be used to exclude tests which are not yet working with name resolution 2.0. gcc/testsuite/ChangeLog: * rust/compile/nr2/compile.exp: New test. * rust/compile/nr2/e

Re: [PATCH] Fortran: fix bogus bounds check for reallocation on assignment [PR116706]

2025-03-19 Thread Steve Kargl
On Wed, Mar 19, 2025 at 11:08:58PM +0100, Harald Anlauf wrote: > > the attached patch addresses an actually very long-standing issue > with bogus bounds checks for components of nested derived types in > assignments when an intermediate level has the POINTER attribute > instead of the ALLOCATABLE

[GCC-14][committed] d: Merge upstream dmd, druntime af92b68a81, phobos c970ca67f

2025-03-19 Thread Iain Buclaw
Hi, This patch merges the D front-end and run-time libraries with the upstream dmd 2.108.1 release. D front-end changes: - Import dmd v2.108.1. D runtime changes: - Import druntime v2.108.1. Phobos changes: - Import phobos v2.108.1. Bootstrapped and regression tested

Re: [PATCH 03/21] testsuite: Add more allocation size tests for conjured svalues [PR110014]

2025-03-19 Thread NightStrike
On Sat, May 11, 2024 at 12:44 PM NightStrike wrote: > On Thu, May 9, 2024 at 1:47 PM David Malcolm wrote: > > > > From: Tim Lange > > > > This patch adds the reproducers reported in PR 110014 as test cases. The > > false positives in those cases are already fixed with PR 109577. > > > > 2023-06

[COMMITTED 088/144] gccrs: Remove some overloaded methods from DefaultResolver.

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove some empty overloads which DefaultASTVisitor::visit should be able to handle. * resolve/rust-default-resolver.h (DefaultResolver::visit): Likewise. gc

Re: [PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean

2025-03-19 Thread James K. Lowden
On Wed, 19 Mar 2025 12:13:47 -0500 (CDT) Robert Dubner wrote: > In file included from ../../gcc/cobol/scan.l:42: > cobol/parse.h:932:12: error: 'NONE' conflicts with a previous > declaration 932 | NONE = 881,/* NONE */ Here, NONE names a COBOL token because (I assume wit

Re: [PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean

2025-03-19 Thread James K. Lowden
On Wed, 19 Mar 2025 15:24:19 +0100 (CET) Richard Biener wrote: > The following removes HOWEVER_GCC_DEFINES_TREE and the alternate > definition of tree from symbols.h and instead ensures that both > coretypes.h and tree.h are included where required. This required > putting GCCs own 'NONE' in a s

[COMMITTED 083/144] gccrs: Check if the type has been correctly resolved

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry We did not check the optional was valid, this lead to rogue dereference and undefined behaviors. gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add optional check. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resol

Re: [PATCH] Activate __cpp_lib_ranges_to_container test

2025-03-19 Thread Jonathan Wakely
On Wed, 19 Mar 2025 at 18:27, François Dumont wrote: > > Hi > > Now that __cpp_lib_ranges_to_container support have been added to > std::set we can activate those checks. > > libstdc++: Activate a __cpp_lib_ranges_to_container dependent test > > Now that std::set has support for __cpp_li

[pushed] c++: mangling of array new [PR119316]

2025-03-19 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Because we build an array type to represent an array new, we hit a VLA error in compute_array_index_type for a variable length array new. To avoid this, let's build the MINUS_EXPR and index type directly. I also noticed that the non-consta

Re: [PATCH] Fortran: fix bogus bounds check for reallocation on assignment [PR116706]

2025-03-19 Thread Harald Anlauf
Am 19.03.25 um 23:25 schrieb Steve Kargl: On Wed, Mar 19, 2025 at 11:08:58PM +0100, Harald Anlauf wrote: the attached patch addresses an actually very long-standing issue with bogus bounds checks for components of nested derived types in assignments when an intermediate level has the POINTER at

[COMMITTED, PATCH] s390: testsuite: Fix autovec-double-signaling-eq-z13.c

2025-03-19 Thread Stefan Schulze Frielinghaus
Since r15-3992-g698e0ec89bc096 we optimize x<=y && x>=y to x==y. Honour signaling NaNs by using option -fsignaling-nans in order to prevent this. gcc/testsuite/ChangeLog: * gcc.target/s390/zvector/autovec-double-signaling-eq-z13.c: Honour sNaNs. --- .../gcc.target/s390/zvector/au

[PATCH v2 1/4] rust: Use FLOAT_TYPE_P instead of manual checking

2025-03-19 Thread Andrew Pinski
This moves is_floating_point over to using FLOAT_TYPE_P instead of manually checking. Note before it would return true for all COMPLEX_TYPE but complex types' inner type could be integral. Also fixes up the comment to be in more of the GNU style. Bootstrapped and tested on x86_64-linux-gnu. gcc/

[PATCH v2 4/4] rust: Add comment inside block [PR119342]

2025-03-19 Thread Andrew Pinski
Inside a BLOCK node, all of the variables of the scope/block are chained together and that connects them to the block. This just adds a comment to that effect as reading the code it is not so obvious why they need to be chained together. gcc/rust/ChangeLog: PR rust/119342 * rust-g

[PATCH v2 0/4] rust: Small cleanups of rust-gcc.cc

2025-03-19 Thread Andrew Pinski
This is a set of 4 patches that do some small cleanups of rust-gcc.cc The first patch might fix a bug in some cases but I am not 100% sure since I suspect complex types here might only be floating point types but who knows. The rest are using GCC's checks better or just other small changes that hel

[COMMITTED 136/144] gccrs: Disambiguate generic args during name resolution 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Visit GenericArgs and GenericArg, the former because the latter involves a non-virtual member function call. * resolve/rust-late-name-resolver-2.0.h (Late::visit):

RE: [PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean

2025-03-19 Thread Robert Dubner
> -Original Message- > From: Richard Biener > Sent: Wednesday, March 19, 2025 10:24 > To: gcc-patches@gcc.gnu.org > Cc: Jakub Jelinek ; rdub...@symas.com > Subject: [PATCH 2/2] [cobol] make sources coretypes.h and tree.h clean > > The following removes HOWEVER_GCC_DEFINES_TREE and the alt

[COMMITTED 090/144] gccrs: rust fix ICE when hir lowering qualified path expressions without an as

2025-03-19 Thread arthur . cohen
From: Philip Herron Qualified path expressions usually are ::... but the as is optional this adds the extra checking in hir lowering to not hit that nullptr. Fixes #3082 gcc/rust/ChangeLog: * hir/rust-ast-lower-type.cc (ASTLowerQualifiedPathInType::visit): check for valid as se

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

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

[COMMITTED 109/144] gccrs: Make AST default visitor visit functions public

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry Make those functions public so they can be used within a lambda on GCC 4.8. gcc/rust/ChangeLog: * ast/rust-ast-visitor.h: Make visit functions public. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast-visitor.h | 1 - 1 file changed, 1 deletio

Re: [PATCH] PR118442: Don't instrument exit edges after musttail

2025-03-19 Thread Jakub Jelinek
On Wed, Mar 19, 2025 at 12:11:56PM -0700, Andi Kleen wrote: > From: Andi Kleen > > When -fprofile-generate is used musttail often fails because the > compiler adds instrumentation after the tail calls. > > This patch prevents adding exit extra edges after musttail because for a > tail call the e

[COMMITTED 019/144] gccrs: Simplify construction of BIR::Statement

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-internal.h: Use `make_*` functions to create BIR::Statements. * checks/errors/borrowck/rust-bir.h: Make a complete constructor and introduce `make_*` functions to create various

[committed] libstdc++: Fix "IEE" typo in comment in std::time_put::do_put

2025-03-19 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/locale_facets_nonio.tcc (time_put::do_put): Fix typo in comment. --- Pushed to trunk as obvious. libstdc++-v3/include/bits/locale_facets_nonio.tcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits

Re: [PATCH] Fix a pasto in ao_compare::compare_ao_refs

2025-03-19 Thread Andrew Pinski
On Mon, Mar 10, 2025 at 3:59 PM Martin Jambor wrote: > > Hi, > > when reading the function ao_compare::compare_ao_refs I came accross > what I believe to ba a copy-and-paste error which this patch fixes. > > Bootstrapped, LTO-bootstrapped and tested on x86_64-linux. OK for > master? By the way h

RE: [PATCH 0/4] Fix AVX10.2 SAT CVT.

2025-03-19 Thread Hu, Lin1
Thanks, forgot to mention, these patches are bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,-m64}. BRs, Lin > -Original Message- > From: Liu, Hongtao > Sent: Thursday, March 20, 2025 9:43 AM > To: Hu, Lin1 ; gcc-patches@gcc.gnu.org > Cc: ubiz...@gmail.com > Subject: RE: [PATCH 0

Re: [Fortran, Patch, PR119272, v1] Fix handling of class' component call in associate

2025-03-19 Thread Paul Richard Thomas
Hi Andre and Harald, It looks good to me too. Indeed, the associate construct is a strange one since TKR guessing is done at a very early stage so that the associate block can be parsed. About a year ago, I started looking at tackling this by delaying parsing the blocks until the containing block

[PATCH] libstdc++: Support maps deduction from_range of tuples.

2025-03-19 Thread Tomasz Kamiński
This implements part of LWG2713 that enables deduction for maps types (map, unordered_map, flat_map and non-unique equivalent) from (from_range, rg, ...) arguments, where rg is range of tuple and other pair-like. libstdc++-v3/ChangeLog: * include/bits/ranges_base.h (__detail::__range_key_

Re: [PATCH] libstdc++-v3: Implement allocator-aware range constructors for unordered containers.

2025-03-19 Thread Jonathan Wakely
On 19/03/25 09:32 +0100, Tomasz Kamiński wrote: This patch implements LWG2713 by adding missing allocator aware version of unordered associative containers constructors accepting only "range" (pair of iterators, initializer_list, or from_range), and corresponding deduction guides. In addition th

Re: [PATCH v2] libstdc++: Cast difference_type for insert_range unordered non-unique containers [PR119358]

2025-03-19 Thread Jonathan Wakely
On Tue, 18 Mar 2025 at 17:27, Tomasz Kamiński wrote: > > ranges::distance may produce an integer-like class type > (ranges::__detail::__max_diff_type) that is only explicitly convertible to > other integer types, so the result needs to be casted to containers size_type. > > PR libstdc++/11

[PATCH] C++: Adjust implicit '__cxa_bad_cast' prototype to reality

2025-03-19 Thread Thomas Schwinge
In 2001 Subversion r40924 (Git commit 52a11cbfcf0cfb32628b6953588b6af4037ac0b6) "IA-64 ABI Exception Handling", '__cxa_bad_cast' changed from 'void *' to 'void' return type: --- libstdc++-v3/libsupc++/exception_support.cc +++ /dev/null @@ -1,388 +0,0 @@ -[...] -// Helpers for r

Re: [PATCH] libstdc++-v3: Implement allocator-aware range constructors for unordered containers.

2025-03-19 Thread Tomasz Kaminski
On Wed, Mar 19, 2025 at 12:36 PM Jonathan Wakely wrote: > On 19/03/25 09:32 +0100, Tomasz Kamiński wrote: > >This patch implements LWG2713 by adding missing allocator aware version of > >unordered associative containers constructors accepting only "range" > >(pair of iterators, initializer_list,

Re: [PATCH] libstdc++-v3: Implement allocator-aware range constructors for unordered containers.

2025-03-19 Thread Jonathan Wakely
On Wed, 19 Mar 2025 at 11:48, Tomasz Kaminski wrote: > > > > > On Wed, Mar 19, 2025 at 12:36 PM Jonathan Wakely wrote: >> >> On 19/03/25 09:32 +0100, Tomasz Kamiński wrote: >> >This patch implements LWG2713 by adding missing allocator aware version of >> >unordered associative containers construc

[PATCH] GCC Driver - Enable very long gcc command-line option

2025-03-19 Thread sunilkumar . dora
From: Sunil Dora For excessively long environment variables i.e > 128KB Store the arguments in a temporary file and collect them back together in collect2 and other subprocess. PR : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111527 Linux kernel has the following limits on shell commands: Each

[PATCH] libstdc++-v3: Implement allocator-aware range constructors for unordered containers.

2025-03-19 Thread Tomasz Kamiński
This patch implements LWG2713 by adding missing allocator aware version of unordered associative containers constructors accepting only "range" (pair of iterators, initializer_list, or from_range), and corresponding deduction guides. In addition the std::ranges::to(alloc) is well-formed, likewise

[PATCH] c: pedwarn on flexible array member initialization with {} for C23+ [PR119350]

2025-03-19 Thread Jakub Jelinek
Hi! Even in C23/C2Y any initialization of flexible array member is still invalid, so we should emit a pedwarn on it. But we no longer do for initialization with {}. The reason is that for C17 and earlier, we already emitted a pedwarn on the {} initializer and so emitting another pedwarn on the f

[Ada] Fix misoptimization at -O2 in LTO mode

2025-03-19 Thread Eric Botcazou
This is a regression in recent releases. The problem is that the IPA mod/ref pass looks through the (nominal) type of a pointer-to-discriminated-type parameter in a call to a subprogram in order to see the (actual) type used for the dereferences of the parameter in the callee, which is a pointer

[Ada] Fix spurious visibility error with partially parameterized formal package

2025-03-19 Thread Eric Botcazou
This is not a regression but the issue is quite annoying and the fix is trivial. The problem is that a formal parameter covered by a box in the formal package is not visible in the instance when it comes after another formal parameter that is also a formal package. It comes from a discrepancy

  1   2   3   >