2 /* { dg-options "-O2 -fdump-tree-strlen" } */
6 /* Yes, there are people who write code like this. */
8 __attribute__((noinline
, noclone
)) char *
12 strcat (buf
, r
? "r" : "w");
17 __attribute__((noinline
, noclone
)) char *
21 strcat (buf
, r
? "r" : "w");
46 /* On non-strict-align targets we inline the memcpy that strcat is turned
47 into and end up with a short typed load / store which strlenopt is not
50 /* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" { xfail non_strict_align } } } */
51 /* { dg-final { scan-tree-dump-times "memcpy \\(" 2 "strlen" { target { non_strict_align } } } } */
52 /* { dg-final { scan-tree-dump-times "memcpy \\(" 4 "strlen" { target { ! non_strict_align } } } } */
53 /* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
54 /* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
55 /* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
56 /* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */