Retro68/gcc/libstdc++-v3/testsuite/abi/pr42230.cc

19 lines
285 B
C++
Raw Normal View History

2012-03-27 23:13:14 +00:00
// { dg-do run }
#include <cxxabi.h>
#include <cassert>
#include <cstddef>
2018-12-28 15:30:48 +00:00
#include <cstdlib>
2012-03-27 23:13:14 +00:00
int main()
{
std::size_t length = 0;
int cc;
char* ret = abi::__cxa_demangle("e", 0, &length, &cc);
assert( (cc < 0 && !ret) || (ret && length) );
2018-12-28 15:30:48 +00:00
std::free(ret);
2012-03-27 23:13:14 +00:00
return 0;
}