Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/refs4.C

raw
1 // { dg-do run }
2 // GROUPS passed references
3
4 // execution test
5
6 int r;
7
8 const int& min(const int& tX, const int& tY)
9 {
10 return tX < tY ? tX : tY;
11 }
12
13 void foo(const int m, const int n)
14 {
15 if (m == 1 && n == 100)
16 /* OK */;
17 else
18 r = 1;
19 }
20
21 int main()
22 {
23 foo(min(2, 1), min(100, 200));
24 return r;
25 }