Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-10.c
blobd6126a3e8efe5bedda54b8f1801769c6578633ba
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-fab1" } */
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. */
8 extern __SIZE_TYPE__ strlen (const char *);
9 extern void bar (__SIZE_TYPE__);
10 extern int bla (void);
12 void foo(int i)
14 char *s = "abcde";
16 if (i)
18 s = "defgh";
19 goto middle;
22 start:
24 bla ();
26 middle:
28 if (bla ())
29 goto start;
31 bar (strlen (s));
34 /* There should be no calls to strlen. */
35 /* { dg-final { scan-tree-dump-times "strlen" 0 "fab1"} } */