Avoid g++.dg/torture/pr106922.C FAIL with the pre-C++11 ABI
The following forces the g++.dg/torture/pr106922.C testcase to use the C++11 libstdc++ ABI and checks whether that worked. gcc/testsuite/ * g++.dg/torture/pr106922.C: Force _GLIBCXX_USE_CXX11_ABI to 1.
This commit is contained in:
parent
02d79fb228
commit
a056a9868e
1 changed files with 9 additions and 0 deletions
|
@ -4,8 +4,16 @@
|
|||
// -O1 doesn't iterate VN and thus has bogus uninit diagnostics
|
||||
// { dg-skip-if "" { *-*-* } { "-O1" } { "" } }
|
||||
|
||||
// The testcase still emits bogus diagnostics with the pre-C++11 ABI
|
||||
#undef _GLIBCXX_USE_CXX11_ABI
|
||||
#define _GLIBCXX_USE_CXX11_ABI 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
// When the library is not dual-ABI and defaults to old just compile
|
||||
// an empty TU
|
||||
#if _GLIBCXX_USE_CXX11_ABI
|
||||
|
||||
#include <optional>
|
||||
template <class T>
|
||||
using Optional = std::optional<T>;
|
||||
|
@ -46,3 +54,4 @@ void test()
|
|||
externals.external2 = internal2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue