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. */
11 /* Though the command line specifies power7 target, this function is
12 to support power8, which will fail because this platform does not
14 __attribute__((target("cpu=power8")))
16 char_fetch_add_relaxed (char *ptr
, int value
)
17 { /* { dg-warning "lacks power8 support" } */
18 return __atomic_fetch_add (ptr
, value
, __ATOMIC_RELAXED
);