+2012-11-09 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * gcc.dg/Warray-bounds-3.c (bar): Keep array access within
+ bounds for ABDAY, DAY, ABMON, MON, AM_PM.
+ * gcc.dg/vect/pr22506.c (foo): Reduce loop iterations to within
+ array bounds.
+ * gcc.dg/vect/pr34005.c (XdmcpUnwrap): Likewise.
+
2012-11-09 Aldy Hernandez <aldyh@redhat.com>
* g++.dg/tm/pr47530-2.C: Adjust for uninstrumented code path.
iov[1].iov_base = (void *) "def";
iov[1].iov_len = 3;
- for (cnt = 0; cnt <= 7; ++cnt)
+ for (cnt = 0; cnt < 7; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->abday[cnt] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 14; ++cnt)
+ for (; cnt < 14; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->day[cnt - 7] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 26; ++cnt)
+ for (; cnt < 26; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->abmon[cnt - 14] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 38; ++cnt)
+ for (; cnt < 38; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->mon[cnt - 26] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 40; ++cnt)
+ for (; cnt < 40; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->am_pm[cnt - 38] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;