aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-03-01 20:48:16 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2025-03-01 20:50:29 +0100
commitff38712bcba97ff9cba168a4e864c5a8ac453b7f (patch)
tree68d3f4bdca76a07b56b882a89568b942a094a50d /gcc
parentf7db0263f792466983f53652fb06268767b35305 (diff)
downloadgcc-ff38712bcba97ff9cba168a4e864c5a8ac453b7f.zip
gcc-ff38712bcba97ff9cba168a4e864c5a8ac453b7f.tar.gz
gcc-ff38712bcba97ff9cba168a4e864c5a8ac453b7f.tar.bz2
ggc: Fix up ggc_internal_cleared_alloc_no_dtor [PR117047]
Apparently I got one of the !HAVE_ATTRIBUTE_ALIAS fallbacks wrong. It compiled with a warning: ../../gcc/ggc-common.cc: In function 'void* ggc_internal_cleared_alloc_no_dtor(size_t, void (*)(void*), size_t, size_t)': ../../gcc/ggc-common.cc:154:44: warning: unused parameter 'size' [-Wunused-parameter] 154 | ggc_internal_cleared_alloc_no_dtor (size_t size, void (*f)(void *), | ~~~~~~~^~~~ and obviously didn't work right (always allocated 0-sized objects). Fixed thusly. 2025-03-01 Jakub Jelinek <jakub@redhat.com> PR jit/117047 * ggc-common.cc (ggc_internal_cleared_alloc_no_dtor): Pass size rather than s as the first argument to ggc_internal_cleared_alloc.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ggc-common.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ggc-common.cc b/gcc/ggc-common.cc
index aece642..426671e 100644
--- a/gcc/ggc-common.cc
+++ b/gcc/ggc-common.cc
@@ -154,7 +154,7 @@ void *
ggc_internal_cleared_alloc_no_dtor (size_t size, void (*f)(void *),
size_t s, size_t n MEM_STAT_DECL)
{
- return ggc_internal_cleared_alloc (s, f, s, n PASS_MEM_STAT);
+ return ggc_internal_cleared_alloc (size, f, s, n PASS_MEM_STAT);
}
#endif