[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr78056-4.c
blob0bea0f895faced49f28ac32354f4126df3b8483b
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* powerpc_vsx_ok represents power7 */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-skip-if "" { powerpc_vsx_ok } } */
5 /* { dg-skip-if "" { powerpc*-*-aix* } } */
6 /* { dg-options "-mdejagnu-cpu=power7" } */
8 /* This test should succeed on both 32- and 64-bit configurations. */
9 #include <altivec.h>
11 /* Though the command line specifies power7 target, this function is
12 to support power8, which will fail because this platform does not
13 support power8. */
14 __attribute__((target("cpu=power8")))
15 char
16 char_fetch_add_relaxed (char *ptr, int value)
17 { /* { dg-warning "lacks power8 support" } */
18 return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);