From: R. Kelley Cook Date: Sun, 12 Oct 2003 17:10:12 +0000 (+0000) Subject: re PR rtl-optimization/8750 (Cygwin prolog generation erroneously emitting __alloca... X-Git-Tag: releases/gcc-3.4.0~3076 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc956bfdf4d022d4d189bd995c2fdfdd4c203491;p=thirdparty%2Fgcc.git re PR rtl-optimization/8750 (Cygwin prolog generation erroneously emitting __alloca as regular function call) PR optimization/8750 * gcc.c-torture/execute/20031012-1.c: New Test Case. From-SVN: r72402 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 92b96a26ddf7..14e13efcb4ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-10-12 Kelley Cook + + PR optimization/8750 + * gcc.c-torture/execute/20031012-1.c: New test case. + 2003-10-11 Roger Sayle * gcc.c-torture/execute/string-opt-8.c: Don't test optimizations @@ -16,7 +21,7 @@ * gcc.c-torture/compile/20031011-1.c: New test. -Sat Oct 11 12:26:16 CEST 2003 Jan Hubicka +2003-10-11 Jan Hubicka * g++.dg/other/first-global.C: New test. @@ -12876,12 +12881,12 @@ Mon 18-Sep-2000 19:23:11 BST Neil Booth * gcc.c-torture/execute/20000917-1.c: New test. * gcc.c-torture/execute/20000917-1.x: XFAIL. -Sat 16-Sep-2000 08:14:58 BST Neil Booth +2000-09-16 Neil Booth * gcc.dg/cpp/macro2.c: Testcase for multi-context arguments in nested macro bug. -Fri 15-Sep-2000 06:50:11 BST Neil Booth +2000-09-15 Neil Booth * gcc.dg/cpp/paste10.c: Testcase for PASTE_LEFT buglet. diff --git a/gcc/testsuite/gcc.c-torture/execute/20031012-1.c b/gcc/testsuite/gcc.c-torture/execute/20031012-1.c new file mode 100644 index 000000000000..54118229607d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20031012-1.c @@ -0,0 +1,32 @@ +/* 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 +#define ARRAY_SIZE (STACK_SIZE / 2) +#define STRLEN (ARRAY_SIZE - 9) +#else +#define ARRAY_SIZE 15000 +#define STRLEN 13371 +#endif + +extern void *memset (void *, int, __SIZE_TYPE__); +extern void abort (void); + +static void foo () +{ + char a[ARRAY_SIZE]; + + a[0]=0; + memset( &a[0], 0xCD, STRLEN ); + a[STRLEN]=0; + if (strlen(a) != STRLEN) + abort (); +} + +int main ( int argc, char* argv[] ) +{ + foo(); + return 0; +}