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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [tailcall-2.c] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-tailc-details" } */
3
/* Test provided by Richard Earnshaw in PR 14312.  */
4
 
5
void bar (int i);
6
void baz (int *);
7
 
8
void
9
foo (int *x)
10
{
11
  if (*x < 0)
12
    {
13
      baz (x);
14
      return;
15
    }
16
  bar (*x);
17
}
18
 
19
/* The test has no local call-clobbered variables.  Only the memory
20
   tag for 'x' is call-clobbered.  And since tags are not real
21
   variables, they ought to be ignored.  There should be two tail
22
   calls here.  */
23
/* { dg-final { scan-tree-dump-times "Found tail call" 2 "tailc"} } */
24
/* { 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.