2 /* { dg-options "-O2 -fdump-tree-strlen" } */
13 memcpy (a
, "1234567", 8);
14 memcpy (a
+ 7, "89abcdefg", 10);
15 memcpy (a
+ 16, "h", 2);
16 return strlen (a
); // This strlen should be optimized into 17.
24 strcpy (a
, "1234567");
25 strcpy (a
+ 7, "89abcdefg");
27 return strlen (a
); // This strlen should be optimized into 17.
34 memcpy (a
, "1234567", 8);
35 memcpy (a
+ 7, "89abcdefg", 10);
36 memcpy (a
+ 16, "h", 2);
37 return strlen (a
); // This strlen should be optimized into 17.
44 strcpy (a
, "1234567");
45 strcpy (a
+ 7, "89abcdefg");
47 return strlen (a
); // This strlen should be optimized into 17.
54 if (f1 () != 17 || f2 () != 17 || f3 (a
) != 17 || f4 (a
) != 17)
59 /* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen1" } } */