testsuite: powerpc: fix dg-do run typo
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20031012-1.c
blob63318b92c2b361b526584118d85547f2f7c1113e
1 /* { dg-add-options stack_size } */
3 /* PR optimization/8750
4 Used to fail under Cygwin with
5 -O2 -fomit-frame-pointer
6 Testcase by David B. Trout */
8 #if defined(STACK_SIZE) && STACK_SIZE < 16000
9 #define ARRAY_SIZE (STACK_SIZE / 2)
10 #define STRLEN (ARRAY_SIZE - 9)
11 #else
12 #define ARRAY_SIZE 15000
13 #define STRLEN 13371
14 #endif
16 extern void *memset (void *, int, __SIZE_TYPE__);
17 extern void abort (void);
19 static void foo ()
21 char a[ARRAY_SIZE];
23 a[0]=0;
24 memset( &a[0], 0xCD, STRLEN );
25 a[STRLEN]=0;
26 if (__builtin_strlen(a) != STRLEN)
27 abort ();
30 int main ( int argc, char* argv[] )
32 foo();
33 return 0;