[libcxx-commits] [libcxx] f5e49bd - Disable trivial weak_ptr test on ARM because it is not expected to work.

Vy Nguyen via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 20 14:03:10 PDT 2020


Author: Vy Nguyen
Date: 2020-07-20T17:02:49-04:00
New Revision: f5e49bd9defd5c3c3587027f9826fc356a91fdf6

URL: https://github.com/llvm/llvm-project/commit/f5e49bd9defd5c3c3587027f9826fc356a91fdf6
DIFF: https://github.com/llvm/llvm-project/commit/f5e49bd9defd5c3c3587027f9826fc356a91fdf6.diff

LOG: Disable trivial weak_ptr test on ARM because it is not expected to work.

Summary:
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.

Reviewers: #libc!

Subscribers: kristof.beyls, danielkiss, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D84200

Added: 
    

Modified: 
    libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
index 4ecec868554f..e69c94506f2a 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
@@ -49,7 +49,10 @@ int main(int, char**) {
   //
   // With trivial_abi, local_addr is the address of a local variable in
   // make_val, and hence 
diff erent 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;
 }


        


More information about the libcxx-commits mailing list