[PATCH 24/27] Revert "AVX10.2 ymm rounding: Support vadd{s, d, h} and vcmp{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit e22e3af1954469c40b139b7cfa8e7708592f4bfd. --- gcc/config.gcc| 3 +- gcc/config/i386/avx10_2roundingintrin.h | 337 -- gcc/config/i386/i386-builtin-types.def| 6 - gcc/config/i386/i386-builtin.def |

[PATCH 14/27] Revert "AVX10.2 ymm rounding: Support vfc{madd, mul}cph, vfixupimmp{s, d} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 95980b292b24110d3f1dffb81926df23c61b4fe7. --- gcc/config/i386/avx10_2roundingintrin.h | 247 -- gcc/config/i386/i386-builtin-types.def| 5 - gcc/config/i386/i386-builtin.def | 10 - gcc/config/i386/i386-expand.cc|

[PATCH 08/27] Revert "AVX10.2 ymm rounding: Support vgetexpp{s, d, h} and vgetmantp{s, d, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 8d4f542935c09f40bb7fd8fd863cc8df80cc970e. --- gcc/config/i386/avx10_2roundingintrin.h | 341 -- gcc/config/i386/i386-builtin-types.def| 6 - gcc/config/i386/i386-builtin.def | 6 - gcc/config/i386/i386-expand.cc|

[PATCH] i386: Fix up splitters into vptest [PR119357]

2025-03-19 Thread Jakub Jelinek
Hi! The following testcase ICEs, because the splitters into vptest create an invalid instruction. The operands of all the UNSPEC_PTEST using instructions use register_operand and vector_operand predicate, these splitters use vector_operand predicate but create vptest instruction which has the sam

[PATCH 06/27] Revert "AVX10.2 ymm rounding: Support vmulp{s, d, h} and vrangep{s, d} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 90cc5b0c4609a9fb3257d2cce7b7abc896c6faab. --- gcc/config/i386/avx10_2roundingintrin.h | 313 -- gcc/config/i386/i386-builtin-types.def| 2 - gcc/config/i386/i386-builtin.def | 5 - gcc/config/i386/i386-expand.cc|

[PATCH 16/27] Revert "AVX10.2 ymm rounding: Support vcvttps2{, u}{dq, qq} and vcvtu{dq, qq}2p{s, d, h} intrins"

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

[PATCH 18/27] Revert "AVX10.2 ymm rounding: Support vcvtqq2p{s, d, h} and vcvttpd2{, u}{dq, qq} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 6e231f8504874828b23bbe89f3ef4086dcc15a44. --- gcc/config/i386/avx10_2roundingintrin.h | 390 -- gcc/config/i386/i386-builtin-types.def| 3 - gcc/config/i386/i386-builtin.def | 7 - gcc/config/i386/i386-expand.cc|

[PATCH 19/27] Revert "AVX10.2 ymm rounding: Support vcvtps2{, u}{dq, qq} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 0f5a42d41b46b746c6f77374d76a3b918a1e2b57. --- gcc/config/i386/avx10_2roundingintrin.h | 226 -- gcc/config/i386/i386-builtin-types.def| 2 - gcc/config/i386/i386-builtin.def | 4 - gcc/config/i386/i386-expand.cc|

[PATCH 21/27] Revert "AVX10.2 ymm rounding: Support vcvtph2p{s, d, sx} and vcvtph2{, u}{dq, qq} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 6f2eac53b6026836f3222961c32312e02c2c7dbc. --- gcc/config/i386/avx10_2roundingintrin.h | 384 -- gcc/config/i386/i386-builtin-types.def| 4 - gcc/config/i386/i386-builtin.def | 7 - gcc/config/i386/i386-expand.cc|

[PATCH 2/4] i386: Add AVX10.2 SAT CVT Intrinsics without Rounding Control

2025-03-19 Thread Hu, Lin1
gcc/ChangeLog: * config/i386/avx10_2-512satcvtintrin.h: Add new intrinsics. * config/i386/avx10_2satcvtintrin.h: Ditto. * config/i386/i386-builtin-types.def: Add DEF_FUNCTION_TYPE (V32HI, V32HF, V32HI, USI), (V16SI, V16SF, V16SI, UHI), (V8DI, V8SF, V8DI, UQI

[PATCH 23/27] Revert "AVX10.2 ymm rounding: Support vcvtdq2p{s, h} and vcvtpd2p{s, h} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 85e874d19548f0dcb9a3f14f9e4b1e3411c88c4b. --- gcc/config/i386/avx10_2roundingintrin.h | 210 -- gcc/config/i386/i386-builtin-types.def| 4 - gcc/config/i386/i386-builtin.def | 4 - gcc/config/i386/i386-expand.cc|

[PATCH 22/27] Revert "AVX10.2 ymm rounding: Support vcvtpd2{, u}{dq, qq} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit 508ac49e1a94c28346642bff512d0ed5f4f58b64. --- gcc/config/i386/avx10_2roundingintrin.h | 218 -- gcc/config/i386/i386-builtin-types.def| 2 - gcc/config/i386/i386-builtin.def | 4 - gcc/config/i386/i386-expand.cc|

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

2025-03-19 Thread Tomasz Kamiński
This patch implements part of LWG2713 covering the from_range constructors, which makes std::ranges::to(alloc) well-formed. Likewise for rest of unordered containers. As this consturctors were added to v15, this has no impact on code that compiled with previous versions. libstdc++-v3/ChangeLog:

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

2025-03-19 Thread Jason Merrill
On 3/19/25 7:38 AM, Thomas Schwinge wrote: 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 @@

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

2025-03-19 Thread Marek Polacek
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' return type: > > --- libstdc++-v3/libsupc++/exception_suppo

[COMMITTED 068/144] gccrs: Strong type BasicBlockId

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Use value of BasicBlockId as index. * checks/errors/borrowck/rust-bir-builder-internal.h (struct BuilderContext): Likewise. * checks/err

[COMMITTED 092/144] gccrs: toplevel: Add note for resolving use declarations

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_dec): Add notes on the problem. * resolve/rust-toplevel-name-resolver-2.0.h: Likewise. --- gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 11 +++ gcc/

[COMMITTED 061/144] gccrs: Fix v0-mangle1.rs test when run with ASAN

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * util/rust-canonical-path.h (CanonicalPath::CanonicalPath): Properly initialize crate_num with copy constructor. gcc/testsuite/ChangeLog: * rust/compile/v0-mangle1.rs: Make v0-mangle test more crate_num agnostic. Si

[COMMITTED 064/144] gccrs: Strong type FreeRegion

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-internal.h: Use STATIC_FREE_REGION, use value of FreeRegion for origin. * checks/errors/borrowck/rust-bir-builder.h: Use free region value. * checks/errors/borrowck/rust-bir-dum

[COMMITTED 022/144] gccrs: Fixed testcase

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/testsuite/ChangeLog: * rust/borrowck/test_move.rs: Assigning `a` to `c` is the correct way to test the behaviour. Signed-off-by: Kushal Pal --- gcc/testsuite/rust/borrowck/test_move.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[COMMITTED 102/144] gccrs: Fix missing error on duplicated nodes

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry When we tried to insert a shadowable node and another shadowable node has been inserted before, we didn't emit any error if the node has already been inserted previously and failed silently. gcc/rust/ChangeLog: * resolve/rust-rib.cc (Rib::insert): Emit an err

[COMMITTED 106/144] gccrs: Remove regular visit code

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry Regular visit code can be replaced with default visit functions. gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove default visit code and replace it with call to default visitor. * resolve/rust-default-res

[COMMITTED 038/144] gccrs: Fix the parser's operand and flags storage

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (parse_reg_operand): Fix parsing logic & reassignment logic (parse_reg_operand_in): Fix parsing (parse_reg_operand_out): Fix parsing (parse_reg_operand_inout): Fix parsing (p

[COMMITTED 043/144] gccrs: Scaffolding new compile-asm files

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * Make-lang.in: Scaffolding new compile-asm files * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise * hir/tree/rust-hir-expr.h: Likewise * backend/rust-compile-asm.cc: New file. Likewise * backend/r

[COMMITTED 044/144] gccrs: Scaffolding code

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::add_stmt): Scaffolding code. (CompileAsm::asm_build_asm_stmt): Likewise. (CompileAsm::asm_build_expr): Likewise. (CompileAsm::asm_construct_string_tree): Likewise. * b

[COMMITTED 073/144] gccrs: Used `IndexVec` for Places

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-place.h: Use strong types as index. Signed-off-by: Kushal Pal --- .../checks/errors/borrowck/rust-bir-place.h | 56 +-- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/gcc/

[COMMITTED 115/144] gccrs: Make node id getter const.

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * ast/rust-ast.h: Node id getter could be const. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index

[COMMITTED 050/144] gccrs: Start work on expand inline asm

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (parse_reg_operand): Remove warnings (parse_reg_operand_out): Remove warnings (expand_inline_asm): New function for eventual expansion (parse_asm): Use expand_inline_asm gcc/testsui

[COMMITTED 113/144] gccrs: Update exclude list with working tests

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove working tests from nr2 exclude list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 27 +- 1 file changed, 1 insertion(+), 26 deletions(-)

[COMMITTED 047/144] gccrs: Minor fix to asm codegen pr

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr): Use expr's is_simple_asm and is_inline_asm (CompileAsm::asm_is_simple): removed (CompileAsm::asm_is_inline): removed * backend/rust-compile-asm.h: Add docs to

[COMMITTED 052/144] gccrs: Lower the HIR to tree with CompileExpr

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs): Lower the HIR to tree with CompileExpr * backend/rust-compile-asm.h: Remove static from method --- gcc/rust/backend/rust-compile-asm.cc | 15 +++ gcc/rust

[COMMITTED 138/144] gccrs: Use name resolver 2.0 in MarkLive

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/lints/rust-lint-marklive.cc (MarkLive::visit_path_segment): Use name resolver 2.0 when enabled. (MarkLive::visit): Likewise. Signed-off-by: Owen Avery --- gcc/rust/checks/lints/rust-lint-marklive.cc | 31 +++

[COMMITTED 128/144] gccrs: Handle TypeAlias during toplevel resolution 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Handle TypeAlias. * resolve/rust-toplevel-name-resolver-2.0.h (TopLevel::visit): Likewise. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove ty

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

2025-03-19 Thread Jakub Jelinek
On Wed, Mar 19, 2025 at 12:13:47PM -0500, Robert Dubner wrote: > I applied the patch and I am trying to compile it; there is a problem. > > > In file included from ../../gcc/cobol/scan.l:42: > cobol/parse.h:932:12: error: 'NONE' conflicts with a previous declaration > 932 | NONE = 881,

[COMMITTED 139/144] gccrs: Make const references to ForeverStack more useful

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack::to_canonical_path): Make const. (ForeverStack::to_rib): Add const overload. (ForeverStack::reverse_iter): Add const overloads. (ForeverStack::ConstDfsResult): Add. (

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

2025-03-19 Thread Jakub Jelinek
On Wed, Mar 19, 2025 at 12:04:05PM -0500, Robert Dubner wrote: > This message appears to have been posted twice, and I don't see a [PATCH > 1/2] One copy went to you, one to gcc-patches, which is why you got two copies. The 1/2 patch was https://gcc.gnu.org/pipermail/gcc-patches/2025-March/678260

[COMMITTED 110/144] gccrs: Move failing test to xfail

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry We want to begin experimenting with this new name resolution 2.0 algorithm as soon as possible. This test highlight a problem where the compiler should emit an error and should be fixed soon. gcc/testsuite/ChangeLog: * rust/compile/name_resolution21.rs: Move

[COMMITTED 097/144] gccrs: imports: Start storing Ribs in ImportKind

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add debug call. * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Store imports using the new classes. * resolve/rust-toplevel-name-resolver-2.0.h: Use new

[COMMITTED 130/144] gccrs: Insert static items into the value namespace

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * backend/rust-compile-item.cc (CompileItem::visit): Check canonical path of StaticItem properly when name resolution 2.0 is enabled. * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Insert static items i

[COMMITTED 133/144] gccrs: Use name resolver 2.0 during pattern typechecking

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc: Add includes. (TypeCheckPattern::visit): Use name resolver 2.0 if enabled. * resolve/rust-name-resolution-context.cc (NameResolutionContext::lookup): Make const qualified. *

Re: [PATCH] c++: fix reporting routines re-entered [PR119303]

2025-03-19 Thread Jason Merrill
On 3/17/25 6:55 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- We crash while we call warning_at ("inline function used but never defined") since it invokes dump_template_bindings -> tsubst -> ... -> convert_like -> ... -> c_common_truthvalue_conve

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

2025-03-19 Thread Jonathan Wakely
On Wed, 19 Mar 2025 at 13:09, Jonathan Wakely wrote: > > 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

[COMMITTED 098/144] gccrs: imports: Make FinalizeImports a resolver visitor as well

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-finalize-imports-2.0.cc (FinalizeImports::go): Turn static method into method. (FinalizeImports::visit): New. * resolve/rust-finalize-imports-2.0.h (class FinalizeImports): Make FinalizeImports a visito

[COMMITTED 123/144] gccrs: add test case to show impl block on ! works

2025-03-19 Thread arthur . cohen
From: Philip Herron The resolution with ! was fixed in: 09cfe530f9c this adds a test case to show the other issue is also fixed. Fixes #2951 gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 is crashing here * rust/compile/issue-2951.rs: New test. Signed-off-by: Philip

[COMMITTED 120/144] gccrs: Remove some passing test from nr2 passing list

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove cast_generics.rs, issue-1131.rs, issue-1383.rs and unsafe10.rs Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 4 1 file changed, 4 deletions(-) diff

[Ada] Fix formatting of version message for gnat driver

2025-03-19 Thread Eric Botcazou
Like the main driver (as well as gccgo, gccrs, gcov, etc) the gnat driver prints the standard version message in response to the --version switch, but it is not properly formatted. Tested on x86-64/Linux, applied on the mainline. 2025-03-19 Eric Botcazou * gnatvsn.adb (Gnat_Free_So

[COMMITTED 129/144] gccrs: Rework InlineAsmOperand

2025-03-19 Thread arthur . cohen
From: Owen Avery Not thrilled with some of this boilerplate, but it does seem like an improvement. gcc/rust/ChangeLog: * ast/rust-expr.h (InlineAsmOperand): Replace multiple mutually-exclusive tl::optional fields with a std::unique_ptr and modify nested classes to allow

[COMMITTED 112/144] gccrs: Do not assert insertion result

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry We might have some duplicated name in some pattern and we should therefore not assert the non duplication of identifiers. gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove assertion and explicitely tells why we ignore

[COMMITTED 144/144] gccrs: Handle external static items in toplevel resolver 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Handle ExternalStaticItem. * resolve/rust-toplevel-name-resolver-2.0.h (TopLevel::visit): Likewise. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-toplevel

[COMMITTED 135/144] gccrs: Fix compiler error on ast wrong implicit construct push_back

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * expand/rust-macro-builtins-asm.cc (parse_reg_operand_in): Fix compiler error on ast wrong implicit construct push_back --- gcc/rust/expand/rust-macro-builtins-asm.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc

[COMMITTED 137/144] gccrs: Handle const generic parameters during resolution 2.0

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Handle ConstGenericParam. * resolve/rust-toplevel-name-resolver-2.0.h (TopLevel::visit): Likewise. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-toplevel-

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

2025-03-19 Thread Robert Dubner
This message appears to have been posted twice, and I don't see a [PATCH 1/2] Am I missing something? Bob D. > -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] [

[COMMITTED 141/144] gccrs: Use name resolver 2.0 in const checker

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/rust-const-checker.cc: Add includes. (ConstChecker::visit): Use name resolver 2.0 to lookup function definitions when name resolution 2.0 is enabled. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove

[COMMITTED 067/144] gccrs: Strong type ScopeId

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::setup_loop): Use value of ScopeId. (ExprStmtBuilder::visit): Use continue scope id instead of continue basic block id. * checks/errors/borrowck/ru

[PATCH] Activate __cpp_lib_ranges_to_container test

2025-03-19 Thread François Dumont
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_lib_ranges_to_container we can     activate a test using it in a fancy

[COMMITTED 041/144] gccrs: Local testing for build_string and debug()

2025-03-19 Thread arthur . cohen
From: jjasmine gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::visit): Local testing for build_string and debug() --- gcc/rust/backend/rust-compile-expr.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/rust/backend/rust-compile-expr

Re: [Patch, fortran] PR85836: Implement the F2018 reduce intrinsic

2025-03-19 Thread Paul Richard Thomas
Hi Andre, Thanks for the review - I'll act on the points that you raised. The Linaro people reported a failure in reduce_1.f90 execution, which I believe is due to incorrect casting of 'dim' and a wrong specification of its kind. I am waiting to hear back from them as to whether or not I have fix

Ping: [PATCH v4] get source line for diagnostic from preprocessed file [PR preprocessor/79106]

2025-03-19 Thread Bader, Lucas
Gentle ping for https://gcc.gnu.org/pipermail/gcc-patches/2025-March/676875.html

[COMMITTED 036/144] gccrs: Fix warnings from const auto& to const auto

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * resolve/rust-ast-resolve.cc (NameResolution::go): Fix warnings from const auto& to const auto --- gcc/rust/resolve/rust-ast-resolve.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/rust/resolve/rust-ast-resolv

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

2025-03-19 Thread Joseph Myers
On Wed, 19 Mar 2025, Jakub Jelinek wrote: > 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

[COMMITTED 004/144] gccrs: Move procedural macro test to their own directory

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/macros/proc/proc_macro.exp: New deja gnu file to execute proc-macro tests. * rust/compile/proc_macro_attribute_crate_type.rs: Move to... * rust/compile/macros/proc/attribute_crate_type.rs: ...here

[COMMITTED 001/144] gccrs: Properly striping struct fields when using attrs

2025-03-19 Thread arthur . cohen
From: Antonio Gomes gcc/rust/ChangeLog: * expand/rust-cfg-strip.cc: Strip struct expr fields and strip fields in struct definition * expand/rust-cfg-strip.h: Signatures for new function maybe_strip_struct_expr_fields gcc/testsuite/ChangeLog: * rust/compile

[PATCHSET] Update Rust frontend 19/03/2024 2/4

2025-03-19 Thread arthur . cohen
Hi everyone, This is the second of the patchsets we plan on upstreaming in the coming days. This one notably contains the commit which fixes PR119353, which had not yet been upstreamed but was present in our development repo for a while. We will continue working on improving our support for all di

[COMMITTED 006/144] gccrs: Move builtin macro tests to their own directory

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry We need a finer grain to filter tests and organise them. gcc/testsuite/ChangeLog: * rust/compile/builtin_macro_compile_error.rs: Move to... * rust/compile/macros/builtin/compile_error.rs: ...here. * rust/compile/builtin_macro_concat.rs: Move t

[COMMITTED 062/144] gccrs: Avoid accidental insertion into map

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::check_bindings_consistency): Check if outer_bindings_map contains an entry before indexing. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-ast-resolve-pattern.cc | 3 ++

[COMMITTED 100/144] gccrs: Insert imports in all namespaces they were resolved in

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_simple_import): Insert import in all namespaces where they were resolved. (Early::resolve_rebind_import): Likewise. * resolve/rust-early-name-resolver-2.0.h: Improve

[COMMITTED 058/144] gccrs: Fix return type of asm mov 5 to i32:0, tortured

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/testsuite/ChangeLog: * rust/execute/inline_asm_mov_x_5.rs: Move to... * rust/execute/torture/inline_asm_mov_x_5.rs: ...here. --- gcc/testsuite/rust/execute/{ => torture}/inline_asm_mov_x_5.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename g

[COMMITTED 101/144] gccrs: nr2.0: Cleanup import mappings and factor into a class.

2025-03-19 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.h: New class for imports. * resolve/rust-finalize-imports-2.0.cc (finalize_simple_import): Use the new API. (finalize_glob_import): Likewise. (finalize_rebind_import): Likewise.

[COMMITTED 126/144] gccrs: Improve Rib::Definition shadowing

2025-03-19 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-finalize-imports-2.0.cc (GlobbingVisitor::visit): Replace calls to insert_shadowable with insert_globbed. * resolve/rust-forever-stack.h (ForeverStack::insert_globbed): Add. * resolve/rust-forever

[COMMITTED 074/144] gccrs: Use `IndexVec` for bb_fold_map

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg): Used `IndexVec` for bb_fold_map. (Dump::go): Use strong type as index instead of value as now we are using `IndexVec`. (Dump::visit): Likewise. * checks/

[COMMITTED 114/144] gccrs: Change resolved type segment

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.h: Add visit function prototype. * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Change resolved type segment. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/resolve/rust-l

[COMMITTED 063/144] gccrs: Strong type PlaceId

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-dump.cc (renumber_places): Use value of PlaceId as index. (Dump::visit_place): Likewise. (Dump::visit_scope): Likewise. (Dump::go): Refill `place_map` with for loop instead of u

[COMMITTED 118/144] gccrs: Resolve TypeParam with name resolution 2.0

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry Resolve TypeParam unless it is Self. gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Resolve TypeParam. * resolve/rust-toplevel-name-resolver-2.0.h: Add visit function prototype. Signed-off-by: Pier

[COMMITTED 081/144] gccrs: [gccrs#3141] Remove double negation by returning CompileExpr::Compile early

2025-03-19 Thread arthur . cohen
From: JoanVC Fixes gccrs#3141. gcc/rust/ChangeLog: * backend/rust-compile-expr.cc Signed-off-by: Joan Vilardaga --- gcc/rust/backend/rust-compile-expr.cc | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/

[COMMITTED 105/144] gccrs: Remove empty visit functions

2025-03-19 Thread arthur . cohen
From: Pierre-Emmanuel Patry We can let the default visitor visit those nodes anyway so we're sure all nodes can be reached. gcc/rust/ChangeLog: * resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove empty visit function implementations. * resolve/rust-defaul

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

2025-03-19 Thread Andi Kleen
Andi Kleen writes: > diff --git a/gcc/input.cc b/gcc/input.cc > index fabfbfb6eaa..d3b12037ba8 100644 > --- a/gcc/input.cc > +++ b/gcc/input.cc > @@ -1325,6 +1325,8 @@ dump_line_table_statistics (void) >if (s.num_expanded_macros != 0) > fprintf (stderr, "Average number of tokens per macr

[pushed: r15-8447] diagnostics: fix crash in urlifier with -Wfatal-errors [PR119366]

2025-03-19 Thread David Malcolm
diagnostic_context's dtor assumed that it owned the m_urlifier pointer and would delete it. As of r15-5988-g5a022062d22e0b this isn't always the case - auto_urlify_attributes is used in various places in the C/C++ frontends and in the middle-end to temporarily override the urlifier with an on-stac

[PATCH] testsuite/113634 - fixup declarations of calloc/realloc

2025-03-19 Thread Richard Biener
Then we can also remove the added -std=gnu17 Tested on x86_64-unknown-linux-gnu, pushed. PR testsuite/113634 * gcc.dg/Wfree-nonheap-object-7.c: Adjust calloc and realloc declarations, remove -std=gnu17. --- gcc/testsuite/gcc.dg/Wfree-nonheap-object-7.c | 6 +++--- 1 file

[COMMITTED 070/144] gccrs: Used `IndexVec` for Scopes

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-place.h: Used `IndexVec` with ScopeId as index. Signed-off-by: Kushal Pal --- .../checks/errors/borrowck/rust-bir-place.h | 25 +-- 1 file changed, 12 insertions(+), 13 deletions(-) diff

[patch] make vhdl known to the PPC backend

2025-03-19 Thread Matthias Klose
For building ghdl, the compiler needs to be patched to know the "vhdl" language. Could that patch be applied to the upstream GCC, so that not everybody needs to patch GCC to build ghdl? Thanks, Matthias Make vhdl known to the PPC backend. See see https://github.com/ghdl/ghdl/blob/master/doc/

[pushed][PR119270][IRA]: Ignore equiv init insns for cost calculation for invariants only

2025-03-19 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119270 The patch was successfully bootstrapped and tested on x86_64 and aarch64. commit 6c443e128802bd93158a3db7c4edf5fc1fc76c8d Author: Vladimir N. Makarov Date: Wed Mar 19 16:06:41 2025 -0400 [PR119270][IRA]: Ignor

[PATCH 3/4] i386: Fix AVX10.2 SAT CVT testcases.

2025-03-19 Thread Hu, Lin1
Add missing testcases. gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_2-512-satcvt-1.c: Add testcase. * gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c: Ditto * gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c: Ditto * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Ditto

Re: [Patch, fortran] PR85836: Implement the F2018 reduce intrinsic

2025-03-19 Thread Andre Vehreschild
Hi Paul, I took a look at your patch and think I found some improvements needed. In +bool +gfc_check_reduce (gfc_expr *array, gfc_expr *operation, gfc_expr *dim, + gfc_expr *mask, gfc_expr *identity, gfc_expr *ordered) +{ ... + if (formal->sym->attr.allocatable || formal->sym->

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

2025-03-19 Thread Hu, Lin1
Hi, all This series of patches fixes three issues in AVX10.2 SAT CVT: 1. Adds ep[i|u]8 suffix to *[i|u]bs intrinsic names. 2. Introduces SAT CVT intrinsics without rounding control. 3. Marks saturation by adding 's_' before core name. BRs, Lin Hu, Lin1 (4): i386: Update Suffix for AVX10.2 SAT

[PATCH 1/4] i386: Update Suffix for AVX10.2 SAT CVT Intrinsics

2025-03-19 Thread Hu, Lin1
The intrinsic names for *[i|u]bs instructions in AVX10.2 are missing the required _ep[i|u]8 suffix. This patch aims to fix the issue. gcc/ChangeLog: * config/i386/avx10_2-512satcvtintrin.h: Change *i[u]bs's type suffix of intrin name. * config/i386/avx10_2satcvtintrin.h:

[PATCH 20/27] Revert "AVX10.2 ymm rounding: Support vcvtph2{, u}w and vcvtps2p{d, hx} intrins"

2025-03-19 Thread Haochen Jiang
This reverts commit b70bb94aca7bc10a54f744d793c32c51f91ce195. --- gcc/config/i386/avx10_2roundingintrin.h | 220 -- gcc/config/i386/i386-builtin-types.def| 3 - gcc/config/i386/i386-builtin.def | 4 - gcc/config/i386/i386-expand.cc|

[COMMITTED 076/144] gccrs: Dynamic dispatch with supertraits

2025-03-19 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * backend/rust-compile.cc: Modify compute_address_for_trait_item to support supertraits * typecheck/rust-tyty.cc: Remove auto gcc/testsuite/ChangeLog: * rust/compile/trait13.rs: Add test for supertraits of s

[COMMITTED 029/144] gccrs: ast: Introduce class hierarchy for lang item paths

2025-03-19 Thread arthur . cohen
From: Arthur Cohen Create a base Path class which is derived into two children classes for regular paths and lang item paths. This allows it to hold either the segments of a fully formed path, or the node ID of a lang-item path. This is required in order to create these special paths which do not

[COMMITTED 056/144] gccrs: Use's array type when constring string tree

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr): Use's array type when constring string tree (CompileAsm::asm_construct_string_tree): Use's array type when constring string tree --- gcc/rust/backend/rust-compile-as

[COMMITTED 033/144] rust: Add checking for union patterns

2025-03-19 Thread arthur . cohen
From: Raiki Tamura gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Add check for union patterns. gcc/testsuite/ChangeLog: * rust/compile/match8.rs: New test. Signed-off-by: Raiki Tamura --- .../typecheck/rust-hir-type

[COMMITTED 078/144] gccrs: Emit error on auto-traits

2025-03-19 Thread arthur . cohen
From: "benjamin.thos" Throw an error when auto-traits used without feature attribute. gcc/rust/ChangeLog: * checks/errors/rust-feature-gate.cc (FeatureGate::visit): Emit error on trait when auto field member true. * checks/errors/rust-feature-gate.h: add prototype of tra

[COMMITTED 046/144] gccrs: Refactor compile-asm for first round review

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (strip_double_quotes): Refactor compile-asm for first round review (CompileAsm::asm_build_asm_stmt): Likewise. (CompileAsm::asm_build_expr): Likewise. (CompileAsm::asm_get_locus): Likewise

[COMMITTED 053/144] gccrs: Perform type check on InlineAsm's operand

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Perform type check on InlineAsm's operand (typecheck_inline_asm_operand): Likewise --- .../typecheck/rust-hir-type-check-expr.cc | 65 +-- 1 file cha

[COMMITTED 057/144] gccrs: Make inline mov compiles

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr): Remove debug * expand/rust-macro-builtins-asm.cc (expand_inline_asm_strings): properly formatted via rust instead of c (parse_asm): formatted comment

[COMMITTED 032/144] gccrs: feature-gate: Cleanup visitor and constructor

2025-03-19 Thread arthur . cohen
From: Arthur Cohen This commit turns a few of the fields into `tl::optional` and cleanups the constructor with a couple default parameters. We can also reuse the variable that we are `switch`ing on, instead of repeating the enum variants each time. Most importantly, the `FeatureGate` visitor now

[COMMITTED 035/144] gccrs: emit error code for E0758

2025-03-19 Thread arthur . cohen
From: Raiki Tamura gcc/rust/ChangeLog: * lex/rust-lex.cc (Lexer::build_token): Emit error code. * lex/rust-lex.h: Fix comment. Signed-off-by: Raiki Tamura --- gcc/rust/lex/rust-lex.cc | 9 ++--- gcc/rust/lex/rust-lex.h | 9 + 2 files changed, 11 insertions(+), 7 d

[COMMITTED 060/144] gccrs: Provide new asm test case for amd64

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/testsuite/ChangeLog: * rust/execute/torture/inline_asm_mov_x_5.rs: Move to... * rust/execute/torture/inline_asm_mov_x_5_ARM.rs: ...here. * rust/execute/torture/inline_asm_mov_x_5_x86_64.rs: New test. --- ...m_mov_x_5.rs => inline_asm_mov_x_5_ARM.rs}

[COMMITTED 008/144] gccrs: Fixed bitwise operation in `extract_stmt`

2025-03-19 Thread arthur . cohen
From: Kushal Pal gcc/rust/ChangeLog: * checks/errors/borrowck/polonius/rust-polonius.h (struct FullPoint): This is the correct way of extracting the required bits. Signed-off-by: Kushal Pal --- gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h | 2 +- 1 file changed, 1

[COMMITTED 003/144] gccrs: [gccrs#3045] #[may_dangle] in safe impl

2025-03-19 Thread arthur . cohen
From: Liam Naddell gcc/rust/ChangeLog: * ast/rust-ast.cc: Fix Attribute constructors to copy inner_attribute * checks/errors/rust-unsafe-checker.cc: Add pass for #[may_dangle] in safe impl's * hir/rust-ast-lower-item.cc: Add support for unsafe impl'

[COMMITTED 010/144] gccrs: Use new constructors and control flow for operand

2025-03-19 Thread arthur . cohen
From: badumbatish gcc/rust/ChangeLog: * ast/rust-expr.h (struct InlineAsmOperand): changed to class (class InlineAsmOperand): Have appropriate constructor, and getter * expand/rust-macro-builtins-asm.cc (parse_reg_operand): Use the new implement constructo

<    1   2   3   >