libstdc++: Add xfail to pretty printer tests that fail in C++20
authorJonathan Wakely <jwakely@redhat.com>
Fri, 5 Nov 2021 11:25:27 +0000 (11:25 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 5 Nov 2021 12:22:31 +0000 (12:22 +0000)
commit30b8ec68e2a7731ab28e6fd1512c1c631f086676
tree1a132abfe6b009b98a96cc32eb3497e5f1d7b04f
parent44d9d55c6d0e3a1e26427662d30f350a80282634
libstdc++: Add xfail to pretty printer tests that fail in C++20

For some reason the type printer for std::string doesn't work in C++20
mode, so std::basic_string<char, char_traits<char>, allocator<char> is
printed out in full rather than being shown as std::string. It's
probably related to the fact that the extern template declarations are
disabled for C++20, but I don't know why that affects GDB.

For now I'm just marking the relevant tests as XFAIL. That requires
adding support for target selectors to individual GDB directives such as
note-test and whatis-regexp-test.

libstdc++-v3/ChangeLog:

* testsuite/lib/gdb-test.exp: Add target selector support to the
dg-final directives.
* testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
C++20.
* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
* testsuite/libstdc++-prettyprinters/prettyprinters.exp: Tweak
comment.
libstdc++-v3/testsuite/lib/gdb-test.exp
libstdc++-v3/testsuite/libstdc++-prettyprinters/80276.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/libfundts.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp