From: Steve Ellcey Date: Thu, 22 Jan 2009 17:03:35 +0000 (+0000) Subject: re PR middle-end/38615 (invalid promotion to static from auto) X-Git-Tag: releases/gcc-4.4.0~771 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42ab5b2869e6e53f7f10101afc3acfd40c25ef91;p=thirdparty%2Fgcc.git re PR middle-end/38615 (invalid promotion to static from auto) PR middle-end/38615 * gcc.dg/pr38615.c: New test. From-SVN: r143571 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dde062e1838a..50d67db09816 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-01-22 Steve Ellcey + + PR middle-end/38615 + * gcc.dg/pr38615.c: New test. + 2009-01-22 Uros Bizjak PR target/38931 diff --git a/gcc/testsuite/gcc.dg/pr38615.c b/gcc/testsuite/gcc.dg/pr38615.c new file mode 100644 index 000000000000..8a818a11fb36 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr38615.c @@ -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; +}