2017-08-28 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-type-1.c
bloba8326bd9630b0878454d8eefa45c28f6f9ef41d2
1 /* { dg-do compile { target { powerpc64*-*-linux* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_vsx_ok } */
3 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
4 /* { dg-options "-mcpu=power8 -O2" } */
6 /* This test tests whether -mfloat128-type (which enables the underlying IEEE
7 128-bit floating point) is enabled by default on VSX Linux 64-bit systems,
8 even if the keywords __float128 and _Float128 (-mfloat128) are not enabled
9 via the -mfloat128 switch. Test that power8 generates a call to the
10 __addkf3 emulation function. */
12 typedef double __attribute__((__mode__(__KF__))) f128_t;
13 typedef _Complex double __attribute__((__mode__(__KC__))) f128c_t;
15 f128_t
16 add_scalar (f128_t a, f128_t b)
18 return a+b;
22 f128c_t
23 add_complex (f128c_t a, f128c_t b)
25 return a+b;
28 /* { dg-final { scan-assembler "bl __addkf3" } } */