blob: 5be02f11c02f98f67d0bdd2f2f1f118f6aabfafa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* PR target/55147 */
/* { dg-do run } */
/* { dg-options "-O1" } */
/* { dg-additional-options "-march=i486" { target ia32 } } */
extern void abort (void);
__attribute__((noclone, noinline)) unsigned int
foo (unsigned long long *p, int i)
{
return __builtin_bswap64 (p[i]);
}
int
main ()
{
unsigned long long p[64];
int i;
for (i = 0; i < 64; i++)
p[i] = 0x123456789abcdef0ULL ^ (1ULL << i) ^ (1ULL << (63 - i));
for (i = 0; i < 64; i++)
if (foo (p, i) != __builtin_bswap32 (p[i] >> 32))
abort ();
return 0;
}
|