This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid spurious test failures when -fno-inline in test flags

On 04/01/19 11:38 +0000, Jonathan Wakely wrote:
These tests rely on inlining, so if -fno-inline is added to the compiler
flags the tests fail. Use the predefined __NO_INLINE__ macro to detect
that situation, and don't bother testing the move assignment.

	* testsuite/21_strings/basic_string/modifiers/assign/char/ Avoid spurious failure when -fno-inline added
	to test flags.
	* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/ Likewise.

And another similar patch.

Tested x86_64-linux, committed to trunk.

commit 13388137fd5b141231daba34b55c176ed5b2c980
Author: Jonathan Wakely <>
Date:   Fri Jan 4 18:49:11 2019 +0000

    Fix test failure when -fno-inline is used
    This currently checks _GLIBCXX_USE_DUAL_ABI which is incorrect, as that
    can be true when _GLIBCXX_USE_CXX11_ABI == 0. The correct check would be
    _GLIBCXX_USE_CXX11_ABI == 1, but that's made redundant by the cxx11-abi
    effective target that the test requires. However, the test will fail if
    -fno-inline is used, so check __NO_INLINE__ instead.
            * testsuite/23_containers/list/ Avoid spurious failure when
            -fno-inline added to test flags.

diff --git a/libstdc++-v3/testsuite/23_containers/list/ b/libstdc++-v3/testsuite/23_containers/list/
index 0ae905848ec..178c306698f 100644
--- a/libstdc++-v3/testsuite/23_containers/list/
+++ b/libstdc++-v3/testsuite/23_containers/list/
@@ -42,7 +42,7 @@ void testc(const std::list<short>& l)
 int main()
+#if ! __NO_INLINE__
   std::list<short> l;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]