1 // { dg-do compile { target correct_iso_cpp_string_wchar_protos } }
2 // { dg-options "-O2 -fdump-tree-optimized" }
7 const char *cc1, *cc2, *cc3, *cc4;
9 char *c1, *c2, *c3, *c4;
14 cv1 = memchr ("abcba", 'b', 3);
15 cc1 = strchr ("abcba", 'b');
16 cc2 = strrchr ("abcba", 'b');
17 cc3 = strpbrk ("dabc", "abc");
18 cc4 = strstr ("aaabc", "abc");
24 cv1 = std::memchr ("abcba", 'b', 3);
25 cc1 = std::strchr ("abcba", 'b');
26 cc2 = std::strrchr ("abcba", 'b');
27 cc3 = std::strpbrk ("dabc", "abc");
28 cc4 = std::strstr ("aaabc", "abc");
34 v1 = memchr ((char *)"abcba", 'b', 3);
35 c1 = strchr ((char *)"abcba", 'b');
36 c2 = strrchr ((char *)"abcba", 'b');
37 c3 = strpbrk ((char *)"dabc", "abc");
38 c4 = strstr ((char *)"aaabc", "abc");
44 v1 = std::memchr ((char *)"abcba", 'b', 3);
45 c1 = std::strchr ((char *)"abcba", 'b');
46 c2 = std::strrchr ((char *)"abcba", 'b');
47 c3 = std::strpbrk ((char *)"dabc", "abc");
48 c4 = std::strstr ((char *)"aaabc", "abc");
51 // { dg-final { scan-tree-dump-not "memchr" "optimized" } }
52 // { dg-final { scan-tree-dump-not "strchr" "optimized" } }
53 // { dg-final { scan-tree-dump-not "strrchr" "optimized" } }
54 // { dg-final { scan-tree-dump-not "strpbrk" "optimized" } }
55 // { dg-final { scan-tree-dump-not "strstr" "optimized" } }