[libc-commits] [libc] [libc] Fix internal alignment in allcoator (PR #146738)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Jul 2 09:59:10 PDT 2025
================
@@ -10,7 +10,7 @@ TEST_MAIN(int, char **, char **) {
// aligned_alloc with valid alignment and size
void *ptr = LIBC_NAMESPACE::aligned_alloc(32, 16);
EXPECT_NE(ptr, nullptr);
- EXPECT_EQ(__builtin_is_aligned(ptr, 32), 0U);
+ EXPECT_TRUE(__builtin_is_aligned(ptr, 32));
----------------
jhuber6 wrote:
aligned_alloc here should return an aligned pointer, it's just checking if that's true.
https://github.com/llvm/llvm-project/pull/146738
More information about the libc-commits
mailing list