summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-15 18:51:37 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-15 18:51:37 +0000
commit0d19a5ce118b87ce8e5d7c082be3e17c4834f3c9 (patch)
tree76551f1ee05f51bbc7792449de48c0b51a1151e1 /libstdc++-v3/testsuite
parent89432048ddafc90e67e5d1377285bfd379d8f0e9 (diff)
downloadppe42-gcc-0d19a5ce118b87ce8e5d7c082be3e17c4834f3c9.tar.gz
ppe42-gcc-0d19a5ce118b87ce8e5d7c082be3e17c4834f3c9.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203629 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/20_util/exchange/1.cc6
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 d16d9e9642e..2157b69e7e9 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 );
}
OpenPOWER on IntegriCloud