mirror of git://gcc.gnu.org/git/gcc.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
This commit is contained in:
parent
1602204161
commit
37ea0d87a3
|
|
@ -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>
|
2013-10-15 Tim Shen <timshen91@gmail.com>
|
||||||
|
|
||||||
PR libstdc++/58737
|
PR libstdc++/58737
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,10 @@ test02()
|
||||||
VERIFY( old.value == 1 );
|
VERIFY( old.value == 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int f(int) { return 0; }
|
||||||
|
|
||||||
|
double f(double) { return 0; }
|
||||||
|
|
||||||
// Deduce type of overloaded function
|
// Deduce type of overloaded function
|
||||||
void
|
void
|
||||||
test03()
|
test03()
|
||||||
|
|
@ -62,8 +66,6 @@ test03()
|
||||||
bool test __attribute__((unused)) = true;
|
bool test __attribute__((unused)) = true;
|
||||||
|
|
||||||
int (*fp)(int);
|
int (*fp)(int);
|
||||||
int f(int);
|
|
||||||
double f(double);
|
|
||||||
std::exchange(fp, &f);
|
std::exchange(fp, &f);
|
||||||
VERIFY( fp != nullptr );
|
VERIFY( fp != nullptr );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue