aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/abi/pr42230.cc
blob: e10803c6040af12cf2159cf721ac7362e617b686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do run }
// { dg-require-effective-target hosted }

#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;
}