diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c b/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c new file mode 100644 index 00000000000..7a909552afc --- /dev/null +++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c @@ -0,0 +1,16 @@ +/* Test for bug where fold wrongly removed conversions to double and + replaced them by conversions to float. */ + +#include "dfp-dbg.h" + +volatile float f = __builtin_inff (); +volatile _Decimal32 d32 = 1e40DF; + +int +main (void) +{ + if ((double) f == (double) d32) + FAILURE + + FINISH +} |