annotate gcc/testsuite/gcc.dg/pr39443.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR middle-end/39443 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-O2" } */
kono
parents:
diff changeset
4 /* { dg-final { scan-assembler-not "memcmp" } } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 typedef __SIZE_TYPE__ size_t;
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 extern int memcmp (const void *s1, const void *s2, size_t n)
kono
parents:
diff changeset
9 __attribute__ ((__nothrow__, __pure__));
kono
parents:
diff changeset
10 extern __typeof (memcmp) memcmp __asm__ ("memory_compare");
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 int
kono
parents:
diff changeset
13 test (char *s, char *t, int cnt)
kono
parents:
diff changeset
14 {
kono
parents:
diff changeset
15 if (__builtin_expect (cnt, 0))
kono
parents:
diff changeset
16 return memcmp (s, t, cnt);
kono
parents:
diff changeset
17 return 0;
kono
parents:
diff changeset
18 }