Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-fre-68.c
blobd9f07bd59bacc31c2bfe4dedf3b426d4c2e84dd2
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-fre1" } */
4 struct S { char a[3]; char b[5]; } s = { "abc", "defg" };
6 __SIZE_TYPE__
7 foo (struct S s, int a, int b)
9 char *p = (char *) &s.a[0];
10 if (a)
11 p = (char *) &s.a;
12 else if (b)
13 p = (char *) &s;
14 return __builtin_strlen (p);
17 __SIZE_TYPE__
18 bar (int a, int b)
20 char *p = (char *) &s.a[0];
21 if (a)
22 p = (char *) &s.a;
23 else if (b)
24 p = (char *) &s;
25 return __builtin_strlen (p);
28 /* { dg-final { scan-tree-dump-times "strlen \\\(&s" 2 "fre1" } } */