diff options
author | Diego Novillo <dnovillo@google.com> | 2013-10-15 14:51:37 -0400 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2013-10-15 14:51:37 -0400 |
commit | 37ea0d87a36e36b706fb32491118e0da2a530099 (patch) | |
tree | 76551f1ee05f51bbc7792449de48c0b51a1151e1 /libstdc++-v3/testsuite | |
parent | 1602204161a775e9d03057565b85cfbcbd5f29c9 (diff) | |
download | gcc-37ea0d87a36e36b706fb32491118e0da2a530099.zip gcc-37ea0d87a36e36b706fb32491118e0da2a530099.tar.gz gcc-37ea0d87a36e36b706fb32491118e0da2a530099.tar.bz2 |
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
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r-- | libstdc++-v3/testsuite/20_util/exchange/1.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/20_util/exchange/1.cc b/libstdc++-v3/testsuite/20_util/exchange/1.cc index d16d9e9..2157b69 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 ); } |