https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104780
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> This looks like a bug in newlib/libc/machine/nvptx/calloc.c:
> ...
> void *
> calloc (size_t size, size_t len)
> {
> void *p = malloc (size * len);
> if (!p)
> return p;
> - return memset (p, 0, len);
> + return memset (p, 0, size * len);
> }
> ...
Confirmed, after a rebuild with this patch, the test-case passes.
