* config/dfp-bit.c (DFP_TO_DFP): Check for overflow.
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Aug 2007 17:16:44 +0000 (17:16 +0000)
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Aug 2007 17:16:44 +0000 (17:16 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127710 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/dfp-bit.c

index ec46772..ea21bd3 100644 (file)
@@ -1,5 +1,7 @@
 2007-08-22  Janis Johnson  <janis187@us.ibm.com>
 
+       * config/dfp-bit.c (DFP_TO_DFP): Check for overflow.
+
        * doc/libgcc.texi (Decimal float library routines): Fix formatting
        and rearrange floating point conversion functions into different
        categories.
index b472792..325306a 100644 (file)
@@ -414,7 +414,8 @@ DFP_TO_DFP (DFP_C_TYPE f_from)
     {
       /* decNumber exception flags we care about here.  */
       int ieee_flags;
-      int dec_flags = DEC_IEEE_854_Inexact | DEC_IEEE_854_Invalid_operation;
+      int dec_flags = DEC_IEEE_854_Inexact | DEC_IEEE_854_Invalid_operation
+                     | DEC_IEEE_854_Overflow;
       dec_flags &= context.status;
       ieee_flags = DFP_IEEE_FLAGS (dec_flags);
       if (ieee_flags != 0)