]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix ICE when compiling path which resolves to trait constant
authorPhilip Herron <herron.philip@googlemail.com>
Thu, 27 Mar 2025 16:32:21 +0000 (16:32 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 31 Mar 2025 19:07:20 +0000 (21:07 +0200)
commit564d76525f6a7a17deb5632da84ff6eefd7c0ce5
tree1a233c8aaf9dfb29b17389275f3a2dc7158de60f
parent405a294780dd12f242bb96540b1251091f13b051
gccrs: Fix ICE when compiling path which resolves to trait constant

Fixes Rust-GCC#3552

gcc/rust/ChangeLog:

* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): check for Expr trait
* hir/rust-hir-dump.cc (Dump::visit): expr is optional

gcc/testsuite/ChangeLog:

* rust/compile/issue-3552.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/backend/rust-compile-resolve-path.cc
gcc/rust/hir/rust-hir-dump.cc
gcc/testsuite/rust/compile/issue-3552.rs [new file with mode: 0644]