Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr98190.c
blobbfdd17d927080c381ace87c595606cb4dce4e43f
1 /* PR middle-end/98190 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 static int __attribute__((noipa))
6 foo (const char *p, const char *q, const int len)
8 for (int i = 0; i < len; p++, q++, i++)
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;
18 return 1;
21 int
22 main ()
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;