diff options
author | Philip Herron <herron.philip@googlemail.com> | 2025-03-28 18:06:14 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-31 21:07:26 +0200 |
commit | 2d8f37c9a59ca5dd98dc77fc13fb83328adcf317 (patch) | |
tree | 4c5649f98612e330ffad8194934666953987735b /gcc/testsuite/rust/compile | |
parent | e0df215ca50c2bd2a0ccc103484b629d2fbd43ec (diff) | |
download | gcc-2d8f37c9a59ca5dd98dc77fc13fb83328adcf317.zip gcc-2d8f37c9a59ca5dd98dc77fc13fb83328adcf317.tar.gz gcc-2d8f37c9a59ca5dd98dc77fc13fb83328adcf317.tar.bz2 |
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>
Diffstat (limited to 'gcc/testsuite/rust/compile')
-rw-r--r-- | gcc/testsuite/rust/compile/issue-3606.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/issue-3606.rs b/gcc/testsuite/rust/compile/issue-3606.rs new file mode 100644 index 0000000..73b0bd6 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-3606.rs @@ -0,0 +1,6 @@ +// { dg-options "-w" } +#[repr()] +pub struct Coord { + x: u32, + y: u32, +} |