Debian Codegraph @

gcc/testsuite/rust/compile/torture/recursive_fn1.rs

raw
1 fn gcd(x: i32, y: i32) -> i32 {
2 if y == 0 {
3 x
4 } else {
5 gcd(y, x % y)
6 }
7 }
8
9 fn main() {
10 let a = gcd(100, 5);
11 // { dg-warning "unused name" "" { target *-*-* } .-1 }
12 }