]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Fix ICE when handling bad constructor
authorPhilip Herron <herron.philip@googlemail.com>
Thu, 10 Jul 2025 21:58:21 +0000 (22:58 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:55 +0000 (16:36 +0200)
commit79ce69f728dfef9b820452f24e6d9c7f4d5301f9
tree288fb4966d4540627397315c1debadc729049549
parent04b29afceefc7865ae2879e7f06c34c582871acd
gccrs: Fix ICE when handling bad constructor

We just had a typo returning ok true when it should have been false.

Fixes Rust-GCC#3876

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::visit): fix typo

gcc/testsuite/ChangeLog:

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

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/typecheck/rust-hir-type-check-struct.cc
gcc/testsuite/rust/compile/issue-3876.rs [new file with mode: 0644]