summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/refs4.C
blob: b87fa69e3a0013e724f972666caf6181ec4410c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// { dg-do run  }
// GROUPS passed references

// execution test

int r;

const int& min(const int& tX, const int& tY)
{
        return tX < tY ? tX : tY;
}

void foo(const int m, const int n)
{
	if (m == 1 && n == 100)
	  /* OK */;
	else
	  r = 1;
}

int main()
{
        foo(min(2, 1), min(100, 200));
        return r;
}