1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-strlen" } */
4 __attribute__((no_icf
))
7 return __builtin_strstr (s
, "hello") == s
;
10 __attribute__((no_icf
))
13 return s
== __builtin_strstr (s
, "hello");
16 __attribute__((no_icf
))
19 return s
!= __builtin_strstr (s
, "hello");
22 __attribute__((no_icf
))
27 char *t2
= __builtin_strstr (t1
, "hello");
32 __attribute__((no_icf
))
35 char *t1
= __builtin_strstr (s
, "hello");
41 /* Do not perform transform, since strlen (t)
44 __attribute__((no_icf
))
45 _Bool
f6(char *s
, char *t
)
47 return __builtin_strstr (s
, t
) == s
;
50 /* Do not perform transform in this case, since
51 t1 doesn't have single use. */
53 __attribute__((no_icf
))
58 char *t1
= __builtin_strstr (s
, "hello");
63 /* { dg-final { scan-tree-dump-times "__builtin_strncmp" 5 "strlen" } } */