]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: fix crash in parse repr options and missing delete call
authorPhilip Herron <herron.philip@googlemail.com>
Fri, 28 Mar 2025 18:06:14 +0000 (18:06 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 31 Mar 2025 19:07:26 +0000 (21:07 +0200)
commit2d8f37c9a59ca5dd98dc77fc13fb83328adcf317
tree4c5649f98612e330ffad8194934666953987735b
parente0df215ca50c2bd2a0ccc103484b629d2fbd43ec
gccrs: fix crash in parse repr options and missing delete call

Fixes Rust-GCC#3606

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options):
check for null and empty and add missing delete call

gcc/testsuite/ChangeLog:

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

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