File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
std/input.output/filesystems/class.path/path.member Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1212// These tests require locale for non-char paths
1313// UNSUPPORTED: no-localization
1414
15+ // In MinGW mode, with optimizations enabled with a DLL, the number of counted
16+ // allocations mismatches, as some ctor/dtor calls are generated in the
17+ // calling code, and some are called from the DLL.
18+ // ADDITIONAL_COMPILE_FLAGS: -DALLOW_MISMATCHING_LIBRRARY_INTERNAL_ALLOCATIONS
19+
1520// <filesystem>
1621
1722// class path
Original file line number Diff line number Diff line change 1212// These tests require locale for non-char paths
1313// UNSUPPORTED: no-localization
1414
15+ // In MinGW mode, with optimizations enabled with a DLL, the number of counted
16+ // allocations mismatches, as some ctor/dtor calls are generated in the
17+ // calling code, and some are called from the DLL.
18+ // ADDITIONAL_COMPILE_FLAGS: -DALLOW_MISMATCHING_LIBRRARY_INTERNAL_ALLOCATIONS
19+
1520// <filesystem>
1621
1722// class path
Original file line number Diff line number Diff line change @@ -626,7 +626,11 @@ struct RequireAllocationGuard {
626626 void requireExactly (std::size_t N) { m_req_alloc = N; m_exactly = true ; }
627627
628628 ~RequireAllocationGuard () {
629+ #ifdef ALLOW_MISMATCHING_LIBRRARY_INTERNAL_ALLOCATIONS
629630 ASSERT_WITH_LIBRARY_INTERNAL_ALLOCATIONS (globalMemCounter.checkOutstandingNewEq (static_cast <int >(m_outstanding_new_on_init)));
631+ #else
632+ assert (globalMemCounter.checkOutstandingNewEq (static_cast <int >(m_outstanding_new_on_init)));
633+ #endif
630634 std::size_t Expect = m_new_count_on_init + m_req_alloc;
631635 assert (globalMemCounter.checkNewCalledEq (static_cast <int >(Expect)) ||
632636 (!m_exactly && globalMemCounter.checkNewCalledGreaterThan (static_cast <int >(Expect))));
You can’t perform that action at this time.
0 commit comments