1 /* { dg-do run } */
2 /* { dg-options "-std=gnu99" } */
3 
4 /* C99 6.5.3 Unary operators & and *.
5    Based on the test from ../dfp/.  */
6 
7 extern void abort (void);
8 
9 #define UNARY_OPERATOR(TYPE,SUFFIX)	\
10 do					\
11 {					\
12  TYPE unary_d = 0.1 ## SUFFIX;		\
13  TYPE* unary_dp;			\
14  /*  & operator.  */			\
15  unary_dp = &(unary_d);			\
16  /*  * operator.  */			\
17  unary_d = *(unary_dp);			\
18 } while (0)
19 
20 int
main()21 main ()
22 {
23   /*  C99 6.5.3 Unary operators.  */
24   UNARY_OPERATOR(short _Fract, hr);
25   UNARY_OPERATOR(_Fract, r);
26   UNARY_OPERATOR(long _Fract, lr);
27   UNARY_OPERATOR(long long _Fract, llr);
28   UNARY_OPERATOR(unsigned short _Fract, uhr);
29   UNARY_OPERATOR(unsigned _Fract, ur);
30   UNARY_OPERATOR(unsigned long _Fract, ulr);
31   UNARY_OPERATOR(unsigned long long _Fract, ullr);
32   UNARY_OPERATOR(_Sat short _Fract, hr);
33   UNARY_OPERATOR(_Sat _Fract, r);
34   UNARY_OPERATOR(_Sat long _Fract, lr);
35   UNARY_OPERATOR(_Sat long long _Fract, llr);
36   UNARY_OPERATOR(_Sat unsigned short _Fract, uhr);
37   UNARY_OPERATOR(_Sat unsigned _Fract, ur);
38   UNARY_OPERATOR(_Sat unsigned long _Fract, ulr);
39   UNARY_OPERATOR(_Sat unsigned long long _Fract, ullr);
40   UNARY_OPERATOR(short _Accum, hk);
41   UNARY_OPERATOR(_Accum, k);
42   UNARY_OPERATOR(long _Accum, lk);
43   UNARY_OPERATOR(long long _Accum, llk);
44   UNARY_OPERATOR(unsigned short _Accum, uhk);
45   UNARY_OPERATOR(unsigned _Accum, uk);
46   UNARY_OPERATOR(unsigned long _Accum, ulk);
47   UNARY_OPERATOR(unsigned long long _Accum, ullk);
48   UNARY_OPERATOR(_Sat short _Accum, hk);
49   UNARY_OPERATOR(_Sat _Accum, k);
50   UNARY_OPERATOR(_Sat long _Accum, lk);
51   UNARY_OPERATOR(_Sat long long _Accum, llk);
52   UNARY_OPERATOR(_Sat unsigned short _Accum, uhk);
53   UNARY_OPERATOR(_Sat unsigned _Accum, uk);
54   UNARY_OPERATOR(_Sat unsigned long _Accum, ulk);
55   UNARY_OPERATOR(_Sat unsigned long long _Accum, ullk);
56 
57   return 0;
58 }
59