aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c b/gcc-4.9/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c
new file mode 100644
index 000000000..af9561042
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_ACCUM_CONV (short _Accum, hk);
+ ALL_ACCUM_CONV (_Accum, k);
+ ALL_ACCUM_CONV (long _Accum, lk);
+ ALL_ACCUM_CONV (long long _Accum, llk);
+ ALL_ACCUM_CONV (unsigned short _Accum, uhk);
+ ALL_ACCUM_CONV (unsigned _Accum, uk);
+ ALL_ACCUM_CONV (unsigned long _Accum, ulk);
+ ALL_ACCUM_CONV (unsigned long long _Accum, ullk);
+
+ NEG_CONV (short _Fract, hr);
+ NEG_CONV (_Fract, r);
+ NEG_CONV (long _Fract, lr);
+ NEG_CONV (long long _Fract, llr);
+ NEG_CONV (short _Accum, hk);
+ NEG_CONV (_Accum, k);
+ NEG_CONV (long _Accum, lk);
+ NEG_CONV (long long _Accum, llk);
+
+ return 0;
+}