* name-lookup.h (lookup_field_1): Delete.
[official-gcc.git] / gcc / testsuite / gcc.target / sh / cmpstr.c
blobe8f1de74977eb208cd0db68b9840be3c7b533438
1 /* Check that the __builtin_strcmp function is inlined with cmp/str
2 when optimizing for speed. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5 /* { dg-final { scan-assembler-not "jmp" } } */
6 /* { dg-final { scan-assembler-times "cmp/str" 3 } } */
7 /* { dg-final { scan-assembler-times "tst\t#3" 2 } } */
9 int
10 test00 (const char *s1, const char *s2)
12 return __builtin_strcmp (s1, s2);
15 /* NB: This might change as further optimisation might detect the
16 max length and fallback to cmpstrn. */
17 int
18 test01 (const char *s2)
20 return __builtin_strcmp ("abc", s2);
23 /* Check that no test for alignment is needed. */
24 int
25 test03 (const char *s1, const char *s2)
27 return __builtin_strcmp (__builtin_assume_aligned (s1, 4),
28 __builtin_assume_aligned (s2, 4));