[COMMITTED 02/19] rust: Use error_operand_p in rust-gcc.cc

2025-04-14 Thread arthur . cohen
From: Andrew Pinski Just a simple cleanupof the code to use error_operand_p instead of directly comparing against error_mark_node. This also moves some cdoe around when dealing with error_operand_p just to be faster and/or slightly tighten up the code slightly. gcc/rust/ChangeLog: * ru

[COMMITTED 13/19] gccrs: Fix const checking of enum discriminants

2025-04-14 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/rust-const-checker.cc (ConstChecker::visit): Visit the enum items of enums. * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Resolve enum discriminants during nr1.0. gcc/testsuite/ChangeLog: *

[Bug rust/119342] block in rust-gcc.cc could use some comments

2025-04-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119342 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |15.0 Status|ASSIGNED

[Bug rust/117869] rust fails to build with cargo command error

2025-04-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117869 --- Comment #5 from Andrew Pinski --- And I can confirm I can build rust now. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug rust/117869] rust fails to build with cargo command error

2025-04-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117869 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |15.0 Resolution|---

[Bug rust/119341] statement_list in rust-gcc.cc can use range for

2025-04-14 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[COMMITTED 12/19] gccrs: format_args: Allow extraneous commas, improve safety

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-builtins-format-args.cc (format_args_parse_arguments): Improve safety, allow extra commas after end of argument list. gcc/testsuite/ChangeLog: * rust/compile/format_args_extra_comma.rs: New test. --- .../expan

[COMMITTED 15/19] gccrs: Add `#[track_caller]` as known attribute

2025-04-14 Thread arthur . cohen
From: beamandala gcc/rust/ChangeLog: * expand/rust-macro-builtins.cc (MacroBuiltin::builtin_transcribers): Add entry for track_caller. * util/rust-attribute-values.h: add `TRACK_CALLER` attribute. * util/rust-attributes.cc: add `track_caller` attribute definition.

[COMMITTED 18/19] gccrs: attributes: Handle external tool annotations like rustfmt::

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-attribute-values.h: Add RUSTFMT value. * util/rust-attributes.cc: Define the attribute. * util/rust-attributes.h (enum CompilerPass): Add EXTERNAL variant. * expand/rust-macro-builtins.cc: Fix formatting. --- gcc

[COMMITTED 19/19] gccrs: lang-items: Add ManuallyDrop

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-lang-item.h: Add new manually_drop lang item. * util/rust-lang-item.cc: Likewise. --- gcc/rust/util/rust-lang-item.cc | 1 + gcc/rust/util/rust-lang-item.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gcc/rust/util/ru

[COMMITTED 17/19] gccrs: nr2.0: Only insert derive macros if they exist

2025-04-14 Thread arthur . cohen
From: Arthur Cohen This causes an assertion failure when compiling core with nr2.0, but should probably be improved. I'm not sure how this code enables built-in derive macros to be resolved so this is a temporary fix. gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early:

[COMMITTED 11/19] gccrs: expansion: Desugar doc comments into attributes before expansion

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Call into TokenTreeDesugar. * expand/rust-token-tree-desugar.cc: New file. * expand/rust-token-tree-desugar.h: New file. * Make-lang.in: Compile them.

[COMMITTED 07/19] gccrs: ast: Support outer attributes for AST::RangeExpr

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-expr.h (class RangeExpr): Add empty outer attributes and allow getting them and setting them. --- gcc/rust/ast/rust-expr.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/rust/ast/rust-expr.h

[COMMITTED 16/19] gccrs: attributes: Add missing attributes used in `core`

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * util/rust-attribute-values.h: Add missing attributes. * util/rust-attributes.cc: Likewise. * util/rust-attributes.h (enum CompilerPass): Mention adding something for const functions. --- gcc/rust/util/rust-attribute-value

[COMMITTED 14/19] gccrs: install.texi: Mention Rust requirement for building gccrs

2025-04-14 Thread arthur . cohen
From: Arthur Cohen Addresses PR#117869 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117869 gcc/ChangeLog: * doc/install.texi: Add requirements for building gccrs. --- gcc/doc/install.texi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/gcc/doc/install.texi b/gcc/doc/install.

[COMMITTED 05/19] gccrs: typecheck: Properly select methods when dealing with specialization

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc (is_default_fn): New. (emit_ambiguous_resolution_error): New. (handle_multiple_candidates): Properly handle multiple candidates in the case of specialization. (TypeCheckExpr::vi

[COMMITTED 09/19] gccrs: session: Desugar question mark operator after expansion instead.

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * rust-session-manager.cc (Session::compile_crate): Call the visitor later in the pipeline. --- gcc/rust/rust-session-manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-s

[COMMITTED 10/19] gccrs: expansion: Only add fragments if the matcher succeeded

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * expand/rust-macro-expand.cc (MacroExpander::match_n_matches): Do not insert fragments and substack fragments if the matcher failed. gcc/testsuite/ChangeLog: * rust/compile/macros/mbe/macro-issue3708.rs: New test. --- gcc/rust/ex

[COMMITTED 08/19] gccrs: ast: Add get_locus() to DelimTokenTree

2025-04-14 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast.h (DelimTokenTree::get_locus): New function. --- gcc/rust/ast/rust-ast.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 09e0fce4f19..91611ec6a62 100644 --- a/gcc/rust/ast/r

[COMMITTED 04/19] rust: Add comment inside block [PR119342]

2025-04-14 Thread arthur . cohen
From: 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/1

[COMMITTED 06/19] gccrs: nr2.0: Do not resolve modules this run if they are unloaded

2025-04-14 Thread arthur . cohen
From: Arthur Cohen Instead, mark the visitor as dirty and wait for the next round of the fixed point to take care of them. This avoids issues with module items being loaded while not being stripped yet. gcc/rust/ChangeLog: * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit)

[COMMITTED 01/19] rust: Use FLOAT_TYPE_P instead of manual checking

2025-04-14 Thread arthur . cohen
From: 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 x

[COMMITTED 03/19] rust: use range for inside rust-gcc.cc [PR119341]

2025-04-14 Thread arthur . cohen
From: Andrew Pinski There are some places inside rust-gcc.cc which are candidates to use range for instead of iterators directly. This changes the locations I saw and makes the code slightly more readable. gcc/rust/ChangeLog: PR rust/119341 * rust-gcc.cc (function_type): Use ran

[Bug rust/119342] block in rust-gcc.cc could use some comments

2025-04-14 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119342 --- Comment #1 from GCC Commits --- The trunk branch has been updated by Arthur Cohen : https://gcc.gnu.org/g:9e367223ce5c42e0598ef52637af34f74e14acc1 commit r15-9438-g9e367223ce5c42e0598ef52637af34f74e14acc1 Author: Andrew Pinski Date: Wed

[Bug rust/119341] statement_list in rust-gcc.cc can use range for

2025-04-14 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119341 --- Comment #4 from GCC Commits --- The trunk branch has been updated by Arthur Cohen : https://gcc.gnu.org/g:ec2edeffedeaaeceecf8c85fded9fd2ee3c1aa52 commit r15-9437-gec2edeffedeaaeceecf8c85fded9fd2ee3c1aa52 Author: Andrew Pinski Date: Wed

[Bug rust/119508] Hundreds of rust tests XPASS

2025-04-14 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119508 --- Comment #19 from ro at CeBiTec dot Uni-Bielefeld.DE --- Solaris results (64-bit-default only; there's no 32-bit Solaris target support in rustc/cargo) are pretty weird (all on 20250411). In all cases, I'm testing both 64 and 32-bit multilib

☠ Buildbot (Sourceware): gccrust - failed '! grep ...' (failure) (master)

2025-04-14 Thread builder
A new failure has been detected on builder gccrust-fedora-x86_64 while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#/builders/16/builds/3457 Build state: failed '! grep ...' (failure) Revision: 688b8d8b0e24aa7e2a7f741355d696f60337f956 Worker: bb1-

☺ Buildbot (Sourceware): gccrust - build successful (master)

2025-04-14 Thread builder
A restored build has been detected on builder gccrust-fedora-ppc64le while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#/builders/19/builds/2184 Build state: build successful Revision: 0c6c73c5317111c5ec9cf465b3f6e37fe250a449 Worker: fedora-ppc64l

[Bug rust/119508] Hundreds of rust tests XPASS

2025-04-14 Thread powerboat9.gamer at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119508 --- Comment #15 from Owen A. --- https://code.wildebeest.org/git/mirror/gcc/commit/?id=89ca1e3cb697a87f02682a1fb1f62f02d0671c57 Wildebeest seems to have the patch. It seems like all of the linked tests are failing for other reasons, though. Doe

[Bug rust/119508] Hundreds of rust tests XPASS

2025-04-14 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119508 --- Comment #18 from Mark Wielaard --- That said, I suddenly see a fedora-ppc64le builder fail: https://builder.sourceware.org/buildbot/#/builders/19/builds/2183 # of unexpected successes 6 Bunsen links: https://builder.sourceware.org/tes

[Bug rust/119508] Hundreds of rust tests XPASS

2025-04-14 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119508 --- Comment #17 from Mark Wielaard --- (In reply to Owen A. from comment #16) > *linked builders What exactly are you asking for? The builder runs are linked aren't they? They have stdout logs and through the bunsen link you can find full .sum

☠ Buildbot (Sourceware): gccrust - failed '! grep ...' (failure) (master)

2025-04-14 Thread builder
A new failure has been detected on builder gccrust-fedora-ppc64le while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#/builders/19/builds/2183 Build state: failed '! grep ...' (failure) Revision: b9fdd60c28472f8163f7952bee2473e1d8e6981e Worker: fed