Commit a00c936a by Jeffrey A Law Committed by Jeff Law

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
parent 02862294
Fri Aug 21 23:59:18 1998 Jeffrey A Law (law@cygnus.com) 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. * gcc.c-torture/compile/980821-1.c: New test.
Fri Aug 21 03:14:04 1998 Jeffrey A Law (law@cygnus.com) Fri Aug 21 03:14:04 1998 Jeffrey A Law (law@cygnus.com)
......
#ifdef STACK_SIZE
#define SIZE STACK_SIZE / 8
#else
#define SIZE 65536
#endif
memtst (int *p, int a) memtst (int *p, int a)
{ {
do do
...@@ -10,11 +16,11 @@ memtst (int *p, int a) ...@@ -10,11 +16,11 @@ memtst (int *p, int a)
main () main ()
{ {
int a[65536]; int a[SIZE];
int i; int i;
bzero (a, 65536 * 4); bzero (a, SIZE * 4);
for (i = 0; i < 100; i++) for (i = 0; i < 100; i++)
{ {
memtst (a, 65536); memtst (a, SIZE);
} }
} }
#ifdef STACK_SIZE
#define SIZE STACK_SIZE / 8
#else
#define STACK_SIZE 10000000
#endif
struct foo struct foo
{ {
int a, b, c; int a, b, c;
int arr[10000000]; int arr[SIZE];
}; };
struct foo s, ss; struct foo s, ss;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment