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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-ccp-10.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O1 -fdump-tree-fab" } */
3
 
4
/* Check that we fold strlen of equally long strings, and that we do not
5
   fail to terminate when there is a nontrivial cycle in the corresponding
6
   ssa graph.  */
7
 
8
extern __SIZE_TYPE__ strlen (const char *);
9
 
10
void foo(int i)
11
{
12
  char *s = "abcde";
13
 
14
  if (i)
15
    {
16
      s = "defgh";
17
      goto middle;
18
    }
19
 
20
start:
21
 
22
  bla ();
23
 
24
middle:
25
 
26
  if (bla ())
27
    goto start;
28
 
29
  bar (strlen (s));
30
}
31
 
32
/* There should be no calls to strlen.  */
33
/* { dg-final { scan-tree-dump-times "strlen" 0 "fab"} } */
34
/* { dg-final { cleanup-tree-dump "fab" } } */

powered by: WebSVN 2.1.0

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