Skip to content

Commit 110783a

Browse files
committed
gccrs: Add test case to show issue is fixed
Fixes #1048 gcc/testsuite/ChangeLog: * rust/compile/issue-1048.rs: New test. Signed-off-by: Philip Herron <[email protected]>
1 parent 782b917 commit 110783a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
macro_rules! maybe_return { ($e:expr) => ($e); }
2+
3+
fn frob(x: i32) -> i32{
4+
maybe_return! {x}
5+
// { dg-error "mismatched types. expected .... but got .i32. .E0308." "" { target *-*-* } .-1 }
6+
// should return -1
7+
-1
8+
}

0 commit comments

Comments
 (0)