1 /* PR middle-end/98190 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
4
5 static int __attribute__((noipa))
6 foo (const char *p, const char *q, const int len)
7 {
8 for (int i = 0; i < len; p++, q++, i++)
9 {
10 int equal;
11 _Bool x, y;
12 __builtin_memcpy ((char *) &x, p, sizeof x);
13 __builtin_memcpy ((char *) &y, q, sizeof y);
14 equal = (x == y);
15 if (equal <= 0)
16 return equal;
17 }
18 return 1;
19 }
20
21 int
22 main ()
23 {
24 const _Bool buf[4] = { 1, 0, 0, 0 };
25 #ifdef __aarch64__
26 register long x4 asm ("x4") = 0xdeadbeefULL;
27 register long x5 asm ("x5") = 0xcafebabeULL;
28 asm volatile (""::"r" (x4), "r" (x5));
29 #endif
30 if (foo ((char *) &buf[0], (char *) &buf[0], 1) != 1)
31 __builtin_abort ();
32 return 0;
33 }