------- Comment #2 from tkoenig at gcc dot gnu dot org 2008-05-04 21:29 -------
The problem is that we set ila1 to a null pointer if its
size is zero:
D.647 = size.6 * 4;
if (D.647 < 0)
{
_gfortran_runtime_error (&"Attempt to allocate a negative amount of
memory."[1]{lb: 1 sz: 1});
}
if (D.647 == 0)
{
D.648 = 0B;
}
else
{
D.648 = __builtin_malloc (D.647);
if (D.648 == 0B)
{
_gfortran_os_error (&"Memory allocation failed"[1]{lb: 1 sz: 1});
}
}
ila1 = (integer(kind=4)[0:D.644] *) D.648;
It isn't clear to me why we do this (maybe as a debugging aid?).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35719