]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/38615 (invalid promotion to static from auto)
authorSteve Ellcey <sje@cup.hp.com>
Thu, 22 Jan 2009 17:03:35 +0000 (17:03 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 22 Jan 2009 17:03:35 +0000 (17:03 +0000)
PR middle-end/38615
* gcc.dg/pr38615.c: New test.

From-SVN: r143571

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr38615.c [new file with mode: 0644]

index dde062e1838a5f563b14efa5c7721156ffe907ef..50d67db098165ef77de4c870722ba979ce292ac1 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-22  Steve Ellcey  <sje@cup.hp.com>
+
+       PR middle-end/38615
+       * gcc.dg/pr38615.c: New test.
+
 2009-01-22  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/38931
diff --git a/gcc/testsuite/gcc.dg/pr38615.c b/gcc/testsuite/gcc.dg/pr38615.c
new file mode 100644 (file)
index 0000000..8a818a1
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+
+int t;
+extern void abort (void);
+
+int f(int t, const int *a)
+{
+ const int b[] = { 1, 2, 3};
+ if (!t)
+   return f(1, b);
+ return b == a;
+}
+
+int main(void)
+{
+ if (f(0, 0))
+   abort ();
+ return 0;
+}