* tests/test-malloc-posix.c (my_malloc): New variable.
* tests/test-calloc-posix.c (my_calloc): New variable.
* tests/test-realloc-posix.c (my_realloc): New variable.
+2024-11-04 Bruno Haible <bruno@clisp.org>
+
+ malloc, calloc, realloc tests: Work around clang optimization bug.
+ * tests/test-malloc-posix.c (my_malloc): New variable.
+ * tests/test-calloc-posix.c (my_calloc): New variable.
+ * tests/test-realloc-posix.c (my_realloc): New variable.
+
2024-11-03 Bruno Haible <bruno@clisp.org>
crc: Fix build rules with Automake's option 'subdir-objects'.
#include "macros.h"
+/* Work around clang bug
+ <https://github.com/llvm/llvm-project/issues/114772>. */
+void *(* volatile my_calloc) (size_t, size_t) = calloc;
+#define calloc my_calloc
+
int
main ()
{
#include "macros.h"
+/* Work around clang bug
+ <https://github.com/llvm/llvm-project/issues/114772>. */
+void *(* volatile my_malloc) (size_t) = malloc;
+#define malloc my_malloc
+
int
main ()
{
#include "macros.h"
+/* Work around clang bug
+ <https://github.com/llvm/llvm-project/issues/114772>. */
+void *(* volatile my_realloc) (void *, size_t) = realloc;
+#define realloc my_realloc
+
int
main (int argc, _GL_UNUSED char **argv)
{