This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] New testcase
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Oct 2009 17:26:16 +0200 (CEST)
- Subject: [PATCH] New testcase
Committed.
2009-10-20 Richard Guenther <rguenther@suse.de>
* gcc.dg/lto/20091020-3_0.c: New testcase.
Index: testsuite/gcc.dg/lto/20091020-3_0.c
===================================================================
--- testsuite/gcc.dg/lto/20091020-3_0.c (revision 0)
+++ testsuite/gcc.dg/lto/20091020-3_0.c (revision 0)
@@ -0,0 +1,20 @@
+/* { dg-lto-do assemble } */
+
+typedef __SIZE_TYPE__ size_t;
+static int stack_dir;
+static void find_stack_direction ()
+{
+ static char *addr = ((void *)0);
+ auto char dummy;
+ if (addr == ((void *)0))
+ {
+ addr = &(dummy);
+ find_stack_direction ();
+ }
+}
+void * C_alloca (size_t size)
+{
+ if (stack_dir == 0)
+ find_stack_direction ();
+}
+