summaryrefslogtreecommitdiff
path: root/tests/test-reallocarray.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
commitcfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch)
tree8016486f8ee7157213f2d09ff2491bfa9c94638a /tests/test-reallocarray.c
parent14e4d584d0121031ec40e6c35869745f1747ff29 (diff)
parent1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff)
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'tests/test-reallocarray.c')
-rw-r--r--tests/test-reallocarray.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test-reallocarray.c b/tests/test-reallocarray.c
index 2748b982..ec7fbceb 100644
--- a/tests/test-reallocarray.c
+++ b/tests/test-reallocarray.c
@@ -1,5 +1,5 @@
/* Test of reallocarray function.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,6 +27,12 @@ SIGNATURE_CHECK (reallocarray, void *, (void *, size_t, size_t));
#include "macros.h"
+/* Work around clang bug
+ <https://github.com/llvm/llvm-project/issues/114772>. */
+void *(*volatile my_reallocarray) (void *, size_t, size_t) = reallocarray;
+#undef reallocarray
+#define reallocarray my_reallocarray
+
int
main ()
{
@@ -34,7 +40,7 @@ main ()
of memory larger than PTRDIFF_MAX or SIZE_MAX bytes. */
for (size_t n = 2; n != 0; n <<= 1)
{
- void *volatile p = NULL;
+ void *p = NULL;
if (PTRDIFF_MAX / n + 1 <= SIZE_MAX)
{