8sa1-gcc/gcc/testsuite/g++.old-deja/g++.law/refs4.C
Jeff Law 921e5a0eb4 Initial revision
From-SVN: r14840
1997-08-19 01:34:40 -06:00

22 lines
332 B
C

// 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;
}