analyzer: fixes to side-effects for built-in functions [PR107565]
[official-gcc.git] / gcc / testsuite / gcc.dg / analyzer / builtins-pr107565.c
blobfb340aa5981bde2ae7be39c0f96f5fc16a101a87
1 /* { dg-do compile { target { x86_64-*-* && lp64 } } } */
2 /* { dg-additional-options "-mrdrnd" } */
4 unsigned short
5 hardware_rand16 (void)
7 unsigned short x;
8 while (! __builtin_ia32_rdrand16_step (&x))
9 continue;
10 return x; /* { dg-bogus "uninit" } */
13 unsigned int
14 hardware_rand32 (void)
16 unsigned int x;
17 while (! __builtin_ia32_rdrand32_step (&x))
18 continue;
19 return x; /* { dg-bogus "uninit" } */
22 unsigned long long
23 hardware_rand64 (void)
25 unsigned long long int x;
26 while (! __builtin_ia32_rdrand64_step (&x))
27 continue;
28 return x; /* { dg-bogus "uninit" } */