clear the tarval buffer before fc_val_from_ieee754() fills bits in. There seems to...
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 1 Nov 2007 14:49:38 +0000 (14:49 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Thu, 1 Nov 2007 14:49:38 +0000 (14:49 +0000)
[r16407]

ir/tv/fltcalc.c

index bed4dac..431d573 100644 (file)
@@ -1063,6 +1063,9 @@ fp_value *fc_val_from_ieee754(LLDBL l, char exp_size, char mant_size, fp_value *
        if (result == NULL) result = calc_buffer;
        temp = alloca(value_size);
 
+       /* CLEAR the buffer */
+       memset(result, 0, fc_get_buffer_length());
+
        result->desc.exponent_size = exp_size;
        result->desc.mantissa_size = mant_size;