diff options
Diffstat (limited to 'libstdc++-v3/testsuite/abi/pr42230.cc')
-rw-r--r-- | libstdc++-v3/testsuite/abi/pr42230.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/abi/pr42230.cc b/libstdc++-v3/testsuite/abi/pr42230.cc new file mode 100644 index 000000000..2a3389953 --- /dev/null +++ b/libstdc++-v3/testsuite/abi/pr42230.cc @@ -0,0 +1,16 @@ +// { dg-do run } + +#include <cxxabi.h> +#include <cassert> +#include <cstddef> + +int main() +{ + std::size_t length = 0; + int cc; + + char* ret = abi::__cxa_demangle("e", 0, &length, &cc); + + assert( (cc < 0 && !ret) || (ret && length) ); + return 0; +} |