+ 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/84640
+ * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
+ by one. Set extents one past the array boundaries to zero to avoid
+ warning with instrumented compiler.
+ (gfc_simplify_eoshift): Likewise, only for ss_ex.
+
2018-10-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/87487
ssize_t *shiftvec, *hptr;
ssize_t shift_val, len;
ssize_t count[GFC_MAX_DIMENSIONS], extent[GFC_MAX_DIMENSIONS],
- hs_ex[GFC_MAX_DIMENSIONS],
+ hs_ex[GFC_MAX_DIMENSIONS + 1],
hstride[GFC_MAX_DIMENSIONS], sstride[GFC_MAX_DIMENSIONS],
a_extent[GFC_MAX_DIMENSIONS], a_stride[GFC_MAX_DIMENSIONS],
h_extent[GFC_MAX_DIMENSIONS],
- ss_ex[GFC_MAX_DIMENSIONS];
+ ss_ex[GFC_MAX_DIMENSIONS + 1];
ssize_t rsoffset;
int d, n;
bool continue_loop;
n++;
}
}
+ ss_ex[n] = 0;
+ hs_ex[n] = 0;
if (shiftvec)
{
ssize_t shift_val, len;
ssize_t count[GFC_MAX_DIMENSIONS], extent[GFC_MAX_DIMENSIONS],
sstride[GFC_MAX_DIMENSIONS], a_extent[GFC_MAX_DIMENSIONS],
- a_stride[GFC_MAX_DIMENSIONS], ss_ex[GFC_MAX_DIMENSIONS];
+ a_stride[GFC_MAX_DIMENSIONS], ss_ex[GFC_MAX_DIMENSIONS + 1];
ssize_t rsoffset;
int d, n;
bool continue_loop;
n++;
}
}
+ ss_ex[n] = 0;
continue_loop = true;
d = array->rank;