Add missing function in 20_util/exchange/1.cc.

When this test is compiled at -O0, the compiler does not remove the
address comparison. This causes a link failure, since the body of f()
is missing.

	* testsuite/20_util/exchange/1.cc: Add missing function
	bodies.

From-SVN: r203629
This commit is contained in:
Diego Novillo 2013-10-15 14:51:37 -04:00 committed by Diego Novillo
parent 1602204161
commit 37ea0d87a3
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2013-10-15 Diego Novillo <dnovillo@google.com>
* testsuite/20_util/exchange/1.cc: Add missing function
bodies.
2013-10-15 Tim Shen <timshen91@gmail.com>
PR libstdc++/58737

View file

@ -55,6 +55,10 @@ test02()
VERIFY( old.value == 1 );
}
int f(int) { return 0; }
double f(double) { return 0; }
// Deduce type of overloaded function
void
test03()
@ -62,8 +66,6 @@ test03()
bool test __attribute__((unused)) = true;
int (*fp)(int);
int f(int);
double f(double);
std::exchange(fp, &f);
VERIFY( fp != nullptr );
}