1 /* { dg-do run { target *-*-linux* *-*-gnu* } } */
2 /* { dg-options "-O2 -fdump-tree-strlen" } */
9 size_t __attribute__ ((noinline
, noclone
))
14 // Should be converted to stpcpy.
16 int len1
= strlen (a
);
19 return len1
+ strlen (a
);
22 size_t __attribute__ ((noinline
, noclone
))
26 // Should be converted to stpcpy.
28 int len1
= strlen (a
);
31 return len1
+ strlen (a
);
38 if (f1 ("foo") != 4 || f2 (a
, "foobar") != 7)
43 /* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } */
44 /* { dg-final { scan-tree-dump-times "stpcpy \\(" 2 "strlen" } } */