2 /* { dg-options "-O2 -fdump-tree-strlen" } */
6 __attribute__((noinline
, noclone
)) size_t
7 fn1 (char *p
, const char *r
)
9 size_t len1
= strlen (r
);
10 char *q
= strchr (p
, '\0');
12 return len1
- strlen (r
); // This strlen should be optimized into len1.
19 const char *volatile q
= "xyzzy";
24 /* { dg-final { scan-tree-dump-times "strlen \\(" 2 "strlen" } } */
25 /* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */