From: Philip Herron Date: Tue, 27 Sep 2022 07:56:16 +0000 (+0100) Subject: gccrs: Add testcase to show forward declared items work X-Git-Tag: basepoints/gcc-14~1633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9d7b6ccd45a899140331ba7a187e6acfdc2aa07;p=thirdparty%2Fgcc.git gccrs: Add testcase to show forward declared items work Fixes #1006 gcc/testsuite/ChangeLog: * rust/compile/issue-1006.rs: New test. --- diff --git a/gcc/testsuite/rust/compile/issue-1006.rs b/gcc/testsuite/rust/compile/issue-1006.rs new file mode 100644 index 000000000000..7f565deaef33 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-1006.rs @@ -0,0 +1,10 @@ +// { dg-options "-w" } +union B { + a: A, + b: f32, +} + +struct A { + data: i32, + len: usize, +}