[gcc]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-5.c
blobf3cfee9baae4d0e9105b6685ec0132011bd4951a
1 /* { dg-do compile { target { powerpc*-*-linux* } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-O2 -mpower9-vector -mno-float128" } */
5 /* Test that we can use #pragma GCC target to enable -mfloat128 and generate
6 code on ISA 3.0 for the float128 built-in functions. */
8 #ifdef __FLOAT128__
9 #error "-mno-float128 should disable initially defining __FLOAT128__"
10 #endif
12 #pragma GCC target("float128")
14 #ifndef __FLOAT128__
15 #error "#pragma GCC target(\"float128\") should enable -mfloat128"
16 #endif
18 __float128
19 qabs (__float128 a)
21 return __builtin_fabsq (a);
24 /* { dg-final { scan-assembler "xsabsqp" } } */