Commit 37ea0d87 by Diego Novillo Committed by Diego Novillo

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
parent 16022041
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
......
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment