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:
Jeffrey A Law 1998-08-21 23:30:36 +00:00 committed by Jeff Law
parent 028622945d
commit a00c936aaa
3 changed files with 20 additions and 4 deletions

View File

@ -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)

View File

@ -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);
}
}

View File

@ -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;