fix bug: remove REAL from candidate datatypes when real constant has overflowed.
authorMario de Sousa <msousa@fe.up.pt>
Thu, 19 Jul 2012 11:05:41 +0100
changeset 610 50b708dff319
parent 609 9ab033d2bb55
child 611 8e81d7db54be
fix bug: remove REAL from candidate datatypes when real constant has overflowed.
stage3/fill_candidate_datatypes.cc
--- a/stage3/fill_candidate_datatypes.cc	Wed Jul 18 23:44:42 2012 +0100
+++ b/stage3/fill_candidate_datatypes.cc	Thu Jul 19 11:05:41 2012 +0100
@@ -148,6 +148,7 @@
   {/* Remove floating point data types */
     real64_t value = 0;
     if (VALID_CVALUE( real64, symbol)) value = GET_CVALUE(real64, symbol);
+    if (IS_OVERFLOW ( real64, symbol)) value = (real64_t)REAL32_MAX + (real64_t)1;
     if (value >  REAL32_MAX )         {__REMOVE__( real_type_name);}
     if (value < -REAL32_MAX )         {__REMOVE__( real_type_name);}
     if (IS_OVERFLOW( real64, symbol)) {__REMOVE__(lreal_type_name);}