diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c b/gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c index ab4c8d268ad..c92502d56ad 100644 --- a/gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c +++ b/gcc/testsuite/gcc.dg/dfp/convert-int-saturate.c @@ -1,5 +1,3 @@ -/* { dg-options "-std=gnu99" } */ - /* N1150 5.1 Conversion between decimal floating integer. C99 6.3.1.4(1a) New. Test integer saturation. */ @@ -8,11 +6,10 @@ #define __STDC_WANT_DEC_FP__ 1 #endif +#include "dfp-dbg.h" #include <float.h> #include <limits.h> -extern void abort (void); - volatile _Decimal32 d32; volatile _Decimal64 d64; volatile _Decimal128 d128; @@ -28,40 +25,40 @@ main () /* Unsigned. */ usi = DEC32_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (usi != UINT_MAX) - abort (); + FAILURE usi = DEC64_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (usi != UINT_MAX) - abort (); + FAILURE usi = DEC128_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (usi != UINT_MAX) - abort (); + FAILURE /* Signed. */ si = DEC32_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (si != INT_MAX) - abort (); + FAILURE si = DEC64_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (si != INT_MAX) - abort (); + FAILURE si = DEC128_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (si != INT_MAX) - abort (); + FAILURE si = - DEC32_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (si != INT_MIN) - abort (); + FAILURE si = - DEC64_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (si != INT_MIN) - abort (); + FAILURE si = - DEC128_MAX; /* { dg-warning "overflow in implicit constant conversion" } */ if (si != INT_MIN) - abort (); + FAILURE - return 0; + FINISH } |