parent
e6afac9494
commit
b5ecf629d5
|
@ -1,3 +1,9 @@
|
||||||
|
2000-11-20 Donald Lindsay <dlindsay@redhat.com>
|
||||||
|
|
||||||
|
* gcc.dg/20000614-2.c: Bug fix. This test expected an unitialized
|
||||||
|
local variable to be zero: I made the variable global. Now
|
||||||
|
uses abort() and exit() instead of relying on main's return value.
|
||||||
|
|
||||||
2000-11-20 Neil Booth <neilb@earthling.net>
|
2000-11-20 Neil Booth <neilb@earthling.net>
|
||||||
|
|
||||||
* gcc.dg/cpp/paste2.c: Update test.
|
* gcc.dg/cpp/paste2.c: Update test.
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
/* { dg-do run { target i?86-*-* } } */
|
/* { dg-do run { target i?86-*-* } } */
|
||||||
/* { dg-options "-O2 -fno-strength-reduce" } */
|
/* { dg-options "-O2 -fno-strength-reduce" } */
|
||||||
|
|
||||||
|
extern void abort (void);
|
||||||
|
extern void exit (int);
|
||||||
|
|
||||||
|
char buf[8];
|
||||||
|
|
||||||
void bar(char *p)
|
void bar(char *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -11,9 +16,8 @@ int main()
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
unsigned char p[4];
|
unsigned char p[4];
|
||||||
} serial;
|
} serial;
|
||||||
char buf[8];
|
|
||||||
int i;
|
|
||||||
|
|
||||||
|
int i;
|
||||||
serial.val = 0;
|
serial.val = 0;
|
||||||
bar(buf);
|
bar(buf);
|
||||||
for(i = 0; i < 8; i += 4)
|
for(i = 0; i < 8; i += 4)
|
||||||
|
@ -23,5 +27,7 @@ int main()
|
||||||
serial.p [2] += buf [i + 2];
|
serial.p [2] += buf [i + 2];
|
||||||
serial.p [3] += buf [i + 3];
|
serial.p [3] += buf [i + 3];
|
||||||
}
|
}
|
||||||
return serial.val;
|
if (serial.val)
|
||||||
|
abort();
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue