aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/refs4.C
blob: a73c078ce981536701fa3ad8f93739a38cabc6ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// GROUPS passed references
extern "C" void printf (char *, ...);

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)
	  printf("PASS\n");
	else
	  printf("FAIL\n");
}

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