[libcxx-commits] [PATCH] D84200: Disable trivial weak_ptr test on ARM because it is not expected to work.
Vy Nguyen via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 20 21:16:30 PDT 2020
oontvoo created this revision.
Herald added subscribers: libcxx-commits, danielkiss, kristof.beyls.
Herald added a project: libc++.
Herald added a reviewer: libc++.
weak_ptr has two pointers (more than the 4 bytes limit), so it will not be returned in registers on ARM, even if it is trivial.
The test, therefore, will fail on ARM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84200
Files:
libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
Index: libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
===================================================================
--- libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
+++ libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
@@ -49,7 +49,10 @@
//
// With trivial_abi, local_addr is the address of a local variable in
// make_val, and hence different from &ret.
+#ifndef __arm__
+ // On ARM32, structs larger than 4 bytes cannot be returned in registers.
+ // Thus, weak_ptr will be passed indrectly even if it is trivial.
assert((void*)&ret != local_addr);
-
+#endif
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84200.279338.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200721/a08e8c96/attachment-0001.bin>
More information about the libcxx-commits
mailing list