[Bug fortran/112371] Wrong upper bound for the result of reduction intrinsics if the array is empty
mikael at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 3 15:56:42 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112371
--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
Possible culprit:
ifunction.m4 has this code:
retarray->base_addr = xmallocarray (alloc_size, sizeof (rtype_name));
if (alloc_size == 0)
{
/* Make sure we have a zero-sized array. */
GFC_DIMENSION_SET(retarray->dim[0], 0, -1, 1);
return;
}
More information about the Gcc-bugs
mailing list