OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [tailcall-1.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-tailc-details" } */
/* { dg-options "-O2 -fdump-tree-tailc-details" } */
extern void *alloca (__SIZE_TYPE__);
extern void *alloca (__SIZE_TYPE__);
int q(int a);
int q(int a);
int *v;
int *v;
int
int
t(int a)
t(int a)
{
{
        int r,r1;
        int r,r1;
        if (a)
        if (a)
                r1=r = q(a-1);
                r1=r = q(a-1);
        else
        else
                return 0;
                return 0;
        /* Dead alloca should not disturb us.  */
        /* Dead alloca should not disturb us.  */
        if (r!=r1)
        if (r!=r1)
                v=alloca(r);
                v=alloca(r);
        return r;
        return r;
}
}
/* { dg-final { scan-tree-dump-times "Found tail call" 1 "tailc"} } */
/* { dg-final { scan-tree-dump-times "Found tail call" 1 "tailc"} } */
/* { dg-final { cleanup-tree-dump "tailc" } } */
/* { dg-final { cleanup-tree-dump "tailc" } } */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.