Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/p10-arch31.c

raw
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" } */
5
6 /* This test will only run when the power10_hw_available test passes.
7 If that test passes, then we expect to see that ISA 3.1 is
8 supported. If this is not the case, then the test environment has
9 problems. */
10
11 #include <stdio.h>
12 #include <stdlib.h>
13
14 int
15 main (int argc, char *argv[])
16 {
17 int ret = 0;
18 #ifdef __BUILTIN_CPU_SUPPORTS__
19 if ( !__builtin_cpu_supports ("arch_3_1"))
20 {
21 printf ("Error: __builtin_cpu_supports says arch_3_1 not supported, but power10_hw test passed.\n");
22 ret++;
23 }
24 #endif
25 return ret;
26 }