{
int i;
- ret->data = internal_malloc_size (size * arraysize);
ret->offset = 0;
ret->dtype = array->dtype;
for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++)
GFC_DIMENSION_SET(ret->dim[i], 0, ub, str);
+ if (arraysize > 0)
+ ret->data = internal_malloc_size (size * arraysize);
+ else
+ ret->data = internal_malloc_size (1);
+
}
}
- else
+ else if (unlikely (compile_options.bounds_check))
{
- if (size0 ((array_t *) ret) == 0)
- return;
+ bounds_equal_extents ((array_t *) ret, (array_t *) array,
+ "return value", "EOSHIFT");
}
- if (arraysize == 0 && filler == NULL)
+ if (arraysize == 0)
return;
which = which - 1;