2 /* { dg-options "-std=gnu99 -O0" } */
4 /* C99 6.5.15 Conditional operator.
5 Test with fixed-point operands.
6 Based on the test from ../dfp/. */
8 extern void abort (void);
11 #define FUNC(TYPE,NAME,PF) \
12 volatile TYPE NAME ## a, NAME ## b, NAME ## c; \
16 NAME ## b = 0.2 ## PF; \
17 NAME ## c = 0.3 ## PF; \
22 FUNC (short _Fract
, sf
, hr
)
24 FUNC (long _Fract
, lf
, lr
)
25 FUNC (long long _Fract
, llf
, llr
)
26 FUNC (unsigned short _Fract
, usf
, uhr
)
27 FUNC (unsigned _Fract
, uf
, ur
)
28 FUNC (unsigned long _Fract
, ulf
, ulr
)
29 FUNC (long long _Fract
, ullf
, ullr
)
30 FUNC (_Sat
short _Fract
, Ssf
, hr
)
31 FUNC (_Sat _Fract
, Sf
, r
)
32 FUNC (_Sat
long _Fract
, Slf
, lr
)
33 FUNC (_Sat
long long _Fract
, Sllf
, llr
)
34 FUNC (_Sat
unsigned short _Fract
, Susf
, uhr
)
35 FUNC (_Sat
unsigned _Fract
, Suf
, ur
)
36 FUNC (_Sat
unsigned long _Fract
, Sulf
, ulr
)
37 FUNC (_Sat
long long _Fract
, Sullf
, ullr
)
38 FUNC (short _Accum
, sa
, hk
)
40 FUNC (long _Accum
, la
, lk
)
41 FUNC (long long _Accum
, lla
, llk
)
42 FUNC (unsigned short _Accum
, usa
, uhk
)
43 FUNC (unsigned _Accum
, ua
, uk
)
44 FUNC (unsigned long _Accum
, ula
, ulk
)
45 FUNC (long long _Accum
, ulla
, ullk
)
46 FUNC (_Sat
short _Accum
, Ssa
, hk
)
47 FUNC (_Sat _Accum
, Sa
, k
)
48 FUNC (_Sat
long _Accum
, Sla
, lk
)
49 FUNC (_Sat
long long _Accum
, Slla
, llk
)
50 FUNC (_Sat
unsigned short _Accum
, Susa
, uhk
)
51 FUNC (_Sat
unsigned _Accum
, Sua
, uk
)
52 FUNC (_Sat
unsigned long _Accum
, Sula
, ulk
)
53 FUNC (_Sat
long long _Accum
, Sulla
, ullk
)
60 NAME ## a = yes ? NAME ## b : NAME ## c; \
61 if (NAME ## a != NAME ## b) \
63 NAME ## a = no ? NAME ## b : NAME ## c; \
64 if (NAME ## a != NAME ## c) \