From: Jonathan Wakely Date: Mon, 12 Apr 2021 10:12:47 +0000 (+0100) Subject: libstdc++: Fix test that fails in C++20 mode [PR 99995] X-Git-Tag: upstream/12.2.0~8827 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29046e02b84a16b6315d952d7f76c502d0d021c2;p=platform%2Fupstream%2Fgcc.git libstdc++: Fix test that fails in C++20 mode [PR 99995] The 17_intro/headers/c++1998/49745.cc test fails for C++20 mode with PCH enabled, because PCH makes it include , which includes , and that includes in C++20 mode. The dependency should go away when C++20 atomic waiting is stable, but will probably remain while the feature is experimental. Change the test to always include , and XFAIL for C++20 and later. libstdc++-v3/ChangeLog: PR libstdc++/99995 * testsuite/17_intro/headers/c++1998/49745.cc: Include all standard headers and XFAIL for effective-target c++20. --- diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/49745.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/49745.cc index a13a40e..204975e 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/49745.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/49745.cc @@ -18,5 +18,7 @@ // . // libstdc++/49745 -#include +#include int truncate = 0; + +// { dg-xfail-if "PR libstdc++/99995" { c++20 } }