Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / ppc-get-timebase.c
blob9de8929af1efdfb46dbc9b7f991dd5dd03cc0578
1 /* { dg-do run { target { powerpc*-*-* } } } */
3 /* Test if __builtin_ppc_get_timebase () is compatible with the current
4 processor and if it's changing between reads. A read failure might indicate
5 a Power ISA or binutils change. */
7 #include <inttypes.h>
9 int
10 main (void)
12 uint64_t t = __builtin_ppc_get_timebase ();
13 int j;
15 for (j = 0; j < 1000000; j++)
16 if (t != __builtin_ppc_get_timebase ())
17 return 0;
19 return 1;