diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:06:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-10-18 19:06:52 +0200 |
commit | 27dae84ed92f1ef0300263091972338d12e78348 (patch) | |
tree | 7c52931f474fafb8a4bd4fd15ca3461c77cdecc2 /tests/test-reallocarray.c | |
parent | 4682deeb62247d34de87f8e777f99e2d337fd377 (diff) |
New upstream version 1.4.1upstream/1.4.1upstream
Diffstat (limited to 'tests/test-reallocarray.c')
-rw-r--r-- | tests/test-reallocarray.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test-reallocarray.c b/tests/test-reallocarray.c index 2748b982..5b96bca7 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-2025 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) { |