Skip to content

Commit 60b604a

Browse files
authored
[libc++][z/OS] Fix shared_ptr control block test when aligned allocation is not available (#109693)
This PR fixes the shared_ptr control block layout test that was recently updated in #76756. When aligned allocation/deallocation is not available, part of the test doesn't work.
1 parent 2469d7e commit 60b604a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,12 @@ int main(int, char**) {
195195
test<TrivialEmptyType, FinalEmptyAlloc>();
196196
test<TrivialEmptyType, NonTrivialAlloc>();
197197

198+
#if !defined(TEST_HAS_NO_ALIGNED_ALLOCATION)
198199
test<OveralignedEmptyType, TrivialEmptyAlloc>();
199200
test<OveralignedEmptyType, TrivialNonEmptyAlloc>();
200201
test<OveralignedEmptyType, FinalEmptyAlloc>();
201202
test<OveralignedEmptyType, NonTrivialAlloc>();
203+
#endif
202204

203205
test<TrivialNonEmptyType, TrivialEmptyAlloc>();
204206
test<TrivialNonEmptyType, TrivialNonEmptyAlloc>();

0 commit comments

Comments
 (0)