[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p10-identify.c
blob6b00abfe046435d315060b2767682e3feba367e7
1 /* { dg-do run { target { power10_hw } } } */
2 /* { dg-do link { target { ! power10_hw } } } */
3 /* { dg-require-effective-target power10_ok } */
4 /* { dg-options "-mdejagnu-cpu=power10 -O2" } */
6 /* This test will only run when the power10_hw_available test passes.
7 If that test passes, then we expect to see that the cpu is Power10.
8 If this is not the case, then the test environment has problems.
9 If in the future there are cpus that pass the power10_hw test but
10 are not power10, they will need to be added to this check. */
12 #include <stdio.h>
13 #include <stdlib.h>
15 int
16 main (int argc, char *argv[])
18 int ret = 0;
19 #ifdef __BUILTIN_CPU_SUPPORTS__
20 if ( !__builtin_cpu_is ("power10"))
22 printf ("Error: __builtin_cpu_is says this is not power10, but power10_hw test passed.\n");
23 ret++;
25 #endif
26 return ret;