]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: backend: Prevent error_mark_node from leaking into const context master trunk
authorjayant chauhan <0001jayant@gmail.com>
Sat, 14 Feb 2026 18:59:26 +0000 (00:29 +0530)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 14 Apr 2026 21:49:03 +0000 (23:49 +0200)
commit7fb62f249afb78f2ed534d2fcdc42076f15d9812
tree5537af91a3cd87d6f722e1c9780d81333e55acf3
parent4987d48bdab2a398a5de27c8a438dc8a9dd3142f
gccrs: backend: Prevent error_mark_node from leaking into const context

Fixes Rust-GCC#3910

gcc/rust/ChangeLog:

* backend/rust-compile-item.cc (CompileItem::visit): Do not insert
const_expr into the context if it is an error_mark_node.
* backend/rust-compile-implitem.cc (CompileTraitItem::visit): Likewise.

gcc/testsuite/ChangeLog:

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

Signed-off-by: jayant chauhan <0001jayant@gmail.com>
gcc/rust/backend/rust-compile-implitem.cc
gcc/rust/backend/rust-compile-item.cc
gcc/testsuite/rust/compile/issue-3910.rs [new file with mode: 0644]