GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else
{
index_type * restrict dest;
index_type n;
- if (*mask)
+ if (mask == NULL || *mask)
{
findloc0_i2 (retarray, array, value, back);
return;
GFC_DIMENSION_SET(retarray->dim[0], 0, rank-1, 1);
retarray->dtype.rank = 1;
retarray->offset = 0;
- retarray->base_addr = xmallocarray (rank, sizeof (GFC_INTEGER_4));
+ retarray->base_addr = xmallocarray (rank, sizeof (index_type));
}
else if (unlikely (compile_options.bounds_check))
{