From: Diego Novillo Date: Tue, 15 Oct 2013 18:51:37 +0000 (-0400) Subject: Add missing function in 20_util/exchange/1.cc. X-Git-Tag: releases/gcc-4.9.0~3446 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37ea0d87a36e36b706fb32491118e0da2a530099;p=thirdparty%2Fgcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b1d6e04d0e54..ca453a9f296c 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2013-10-15 Diego Novillo + + * testsuite/20_util/exchange/1.cc: Add missing function + bodies. + 2013-10-15 Tim Shen PR libstdc++/58737 diff --git a/libstdc++-v3/testsuite/20_util/exchange/1.cc b/libstdc++-v3/testsuite/20_util/exchange/1.cc index d16d9e9642e9..2157b69e7e91 100644 --- a/libstdc++-v3/testsuite/20_util/exchange/1.cc +++ b/libstdc++-v3/testsuite/20_util/exchange/1.cc @@ -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 ); }