Testcase:
int t;
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;
}

-- CUT ---
Originally posted at:
http://gcc.gnu.org/ml/gcc/2008-11/msg00201.html


-- 
           Summary: [4.2/4.3/4.4 Regression] invalid promotion to static
                    from auto
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38615

Reply via email to