gccrs: add test case to show our query-type system is working
authorPhilip Herron <herron.philip@googlemail.com>
Thu, 16 Feb 2023 16:14:23 +0000 (16:14 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:24 +0000 (10:47 +0200)
Fixes #1361

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/testsuite/ChangeLog:

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

gcc/testsuite/rust/compile/issue-1361.rs [new file with mode: 0644]

diff --git a/gcc/testsuite/rust/compile/issue-1361.rs b/gcc/testsuite/rust/compile/issue-1361.rs
new file mode 100644 (file)
index 0000000..f890972
--- /dev/null
@@ -0,0 +1,8 @@
+// { dg-options "-w" }
+fn foo() -> S {
+    S { a: 15 }
+}
+
+struct S {
+    a: i32,
+}