gcc/libstdc++-v3/testsuite/abi/pr42230.cc
Jonathan Wakely b0e90d2acf Include missing header for std::free
* testsuite/abi/pr42230.cc: Add header for std::free.

From-SVN: r250102
2017-07-10 19:43:02 +01:00

19 lines
285 B
C++

// { dg-do run }
#include <cxxabi.h>
#include <cassert>
#include <cstddef>
#include <cstdlib>
int main()
{
std::size_t length = 0;
int cc;
char* ret = abi::__cxa_demangle("e", 0, &length, &cc);
assert( (cc < 0 && !ret) || (ret && length) );
std::free(ret);
return 0;
}