Proposed new testcase for PR8750
Kelley Cook
kelleycook@wideopenwest.com
Sat Oct 11 16:41:00 GMT 2003
On Sat, 11 Oct 2003 09:17:11 -0700, Richard Henderson wrote:
>On Fri, Oct 10, 2003 at 10:54:17PM -0400, Kelley Cook wrote:
>> I am suggesting we add this slightly modified testcase to
>> gcc.c-torture/execute; adding it to a fresh checkout passes
>> with flying colors.
>You'll need to use STACK_SIZE if defined as a max size of
>your array.
How about this instead?
----
/* PR optimization/8750
Used to fail under Cygwin with
-O2 -fomit-frame-pointer
Testcase by David B. Trout */
#if defined (STACK_SIZE) && STACK_SIZE < 16000
main () { return 0; }
#else
extern void *memset (void *, int, __SIZE_TYPE__);
extern void abort (void);
static void foo ()
char a[15000];
a[0]=0;
memset( &a[0], 0xCD, 13371 );
a[13371]=0;
if (strlen(a) != 13371)
abort ();
int main ( int argc, char* argv[] )
foo();
return 0;
#endif
More information about the Gcc-patches
mailing list