[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / ppc-mftb.c
blobf64e45d1dad81d3bf425e1932fb6d8a12da6584e
1 /* { dg-do run { target { powerpc*-*-* } } } */
3 /* Test if __builtin_ppc_mftb () is compatible with the current processor and
4 if it's changing between reads. A read failure might indicate a Power
5 ISA or binutils change. */
7 int
8 main (void)
10 unsigned long t = __builtin_ppc_mftb ();
11 int j;
13 for (j = 0; j < 1000000; j++)
14 if (t != __builtin_ppc_mftb ())
15 return 0;
17 return 1;