mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:50:33 +08:00
memtst.c: Reduce size of array when STACK_SIZE is defined.
* gcc.c-torture/unsorted/memtst.c: Reduce size of array when STACK_SIZE is defined. * gcc.c-torture/unsorted/stuct.c: Similarly. Makes targets with 16bit address spaces happy. From-SVN: r21900
This commit is contained in:
parent
028622945d
commit
a00c936aaa
@ -1,5 +1,9 @@
|
||||
Fri Aug 21 23:59:18 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gcc.c-torture/unsorted/memtst.c: Reduce size of array when
|
||||
STACK_SIZE is defined.
|
||||
* gcc.c-torture/unsorted/stuct.c: Similarly.
|
||||
|
||||
* gcc.c-torture/compile/980821-1.c: New test.
|
||||
|
||||
Fri Aug 21 03:14:04 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
@ -1,3 +1,9 @@
|
||||
#ifdef STACK_SIZE
|
||||
#define SIZE STACK_SIZE / 8
|
||||
#else
|
||||
#define SIZE 65536
|
||||
#endif
|
||||
|
||||
memtst (int *p, int a)
|
||||
{
|
||||
do
|
||||
@ -10,11 +16,11 @@ memtst (int *p, int a)
|
||||
|
||||
main ()
|
||||
{
|
||||
int a[65536];
|
||||
int a[SIZE];
|
||||
int i;
|
||||
bzero (a, 65536 * 4);
|
||||
bzero (a, SIZE * 4);
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
memtst (a, 65536);
|
||||
memtst (a, SIZE);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,13 @@
|
||||
#ifdef STACK_SIZE
|
||||
#define SIZE STACK_SIZE / 8
|
||||
#else
|
||||
#define STACK_SIZE 10000000
|
||||
#endif
|
||||
|
||||
struct foo
|
||||
{
|
||||
int a, b, c;
|
||||
int arr[10000000];
|
||||
int arr[SIZE];
|
||||
};
|
||||
|
||||
struct foo s, ss;
|
||||
|
Loading…
x
Reference in New Issue
Block a user