[committed,83/88] gccrs: add test case to show our query-type system is working

Message ID 20230405140411.3016563-84-arthur.cohen@embecosm.com
State Accepted
Headers
Series [committed,01/88] gccrs: fatal_error_flag: Fix typo in error message |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Arthur Cohen April 5, 2023, 2:04 p.m. UTC
  From: Philip Herron <herron.philip@googlemail.com>

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 | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/issue-1361.rs
  

Patch

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