* execute/20000412-6.c: New test.
From-SVN: r33126
This commit is contained in:
parent
12d7e99cdc
commit
045a1f9d31
@ -1,3 +1,7 @@
|
|||||||
|
Wed Apr 12 22:54:02 2000 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
|
* execute/20000412-6.c: New test.
|
||||||
|
|
||||||
Wed Apr 5 22:51:36 2000 Hans-Peter Nilsson <hp@axis.com>
|
Wed Apr 5 22:51:36 2000 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
* execute/960327-1.c (f): Add a letter to s[] to avoid stack-frame
|
* execute/960327-1.c (f): Add a letter to s[] to avoid stack-frame
|
||||||
|
22
gcc/testsuite/gcc.c-torture/execute/20000412-6.c
Normal file
22
gcc/testsuite/gcc.c-torture/execute/20000412-6.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
unsigned bug (unsigned short value, unsigned short *buffer,
|
||||||
|
unsigned short *bufend);
|
||||||
|
|
||||||
|
unsigned short buf[] = {1, 4, 16, 64, 256};
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
if (bug (512, buf, buf + 3) != 491)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
exit (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
bug (unsigned short value, unsigned short *buffer, unsigned short *bufend)
|
||||||
|
{
|
||||||
|
unsigned short *tmp;
|
||||||
|
|
||||||
|
for (tmp = buffer; tmp < bufend; tmp++)
|
||||||
|
value -= *tmp;
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user