This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix off-by-one bugs in gcc.c-torture/execute/multi-ix.c
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Jun 2003 23:31:54 +0200 (MET DST)
- Subject: [committed] Fix off-by-one bugs in gcc.c-torture/execute/multi-ix.c
Hello,
this fixes off-by-one bugs in a recently added testcase that
caused failures on s390 due to accessing uninitialized memory.
Tested on s390-ibm-linux an s390x-ibm-linux, committed as
obvious.
Bye,
Ulrich
ChangeLog:
* gcc.c-torture/execute/multi-ix.c: Fix off-by-one bugs.
Index: gcc/testsuite/gcc.c-torture/execute/multi-ix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/multi-ix.c,v
retrieving revision 1.1
diff -c -p -r1.1 multi-ix.c
*** gcc/testsuite/gcc.c-torture/execute/multi-ix.c 26 Jun 2003 20:07:23 -0000 1.1
--- gcc/testsuite/gcc.c-torture/execute/multi-ix.c 28 Jun 2003 19:07:12 -0000
*************** void s(int n, ...)
*** 145,151 ****
va_list list;
va_start (list, n);
! while (--n)
{
int *a = va_arg (list, int *);
a[0] = n;
--- 145,151 ----
va_list list;
va_start (list, n);
! while (n--)
{
int *a = va_arg (list, int *);
a[0] = n;
*************** void z(int n, ...)
*** 158,164 ****
va_list list;
va_start (list, n);
! while (--n)
{
int *a = va_arg (list, int *);
bzero (a, sizeof (l));
--- 158,164 ----
va_list list;
va_start (list, n);
! while (n--)
{
int *a = va_arg (list, int *);
bzero (a, sizeof (l));
*************** void c(int n, ...)
*** 171,177 ****
va_list list;
va_start (list, n);
! while (--n)
{
int *a = va_arg (list, int *);
if (a[n] != n)
--- 171,177 ----
va_list list;
va_start (list, n);
! while (n--)
{
int *a = va_arg (list, int *);
if (a[n] != n)
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de