diff options
author | R. Kelley Cook <kcook@gcc.gnu.org> | 2003-10-12 17:10:12 +0000 |
---|---|---|
committer | R. Kelley Cook <kcook@gcc.gnu.org> | 2003-10-12 17:10:12 +0000 |
commit | cc956bfdf4d022d4d189bd995c2fdfdd4c203491 (patch) | |
tree | b7e9ef60e6aa922de34a1685860847adf049b5c6 | |
parent | bc0ff407ce8e111f5867f6f49030a2aa6bdb535e (diff) | |
download | gcc-cc956bfdf4d022d4d189bd995c2fdfdd4c203491.zip gcc-cc956bfdf4d022d4d189bd995c2fdfdd4c203491.tar.gz gcc-cc956bfdf4d022d4d189bd995c2fdfdd4c203491.tar.bz2 |
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20031012-1.c | 32 |
2 files changed, 40 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 92b96a2..14e13ef 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-10-12 Kelley Cook <kcook@gcc.gnu.org> + + PR optimization/8750 + * gcc.c-torture/execute/20031012-1.c: New test case. + 2003-10-11 Roger Sayle <roger@eyesopen.com> * 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 <jh@suse.cz> +2003-10-11 Jan Hubicka <jh@suse.cz> * g++.dg/other/first-global.C: New test. @@ -12876,12 +12881,12 @@ Mon 18-Sep-2000 19:23:11 BST Neil Booth <NeilB@earthling.net> * 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 <NeilB@earthling.net> +2000-09-16 Neil Booth <NeilB@earthling.net> * gcc.dg/cpp/macro2.c: Testcase for multi-context arguments in nested macro bug. -Fri 15-Sep-2000 06:50:11 BST Neil Booth <NeilB@earthling.net> +2000-09-15 Neil Booth <NeilB@earthling.net> * 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 0000000..5411822 --- /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;
+}
|