| 1 |
/* { dg-do compile { target { x86_64-*-* && lp64 } } } */ |
| 2 |
/* { dg-additional-options "-mrdrnd" } */ |
| 3 |
|
| 4 |
unsigned short |
| 5 |
hardware_rand16 (void) |
| 6 |
{ |
| 7 |
unsigned short x; |
| 8 |
while (! __builtin_ia32_rdrand16_step (&x)) |
| 9 |
continue; |
| 10 |
return x; /* { dg-bogus "uninit" } */ |
| 11 |
} |
| 12 |
|
| 13 |
unsigned int |
| 14 |
hardware_rand32 (void) |
| 15 |
{ |
| 16 |
unsigned int x; |
| 17 |
while (! __builtin_ia32_rdrand32_step (&x)) |
| 18 |
continue; |
| 19 |
return x; /* { dg-bogus "uninit" } */ |
| 20 |
} |
| 21 |
|
| 22 |
unsigned long long |
| 23 |
hardware_rand64 (void) |
| 24 |
{ |
| 25 |
unsigned long long int x; |
| 26 |
while (! __builtin_ia32_rdrand64_step (&x)) |
| 27 |
continue; |
| 28 |
return x; /* { dg-bogus "uninit" } */ |
| 29 |
} |