Index: flt_conv.inc
===================================================================
--- flt_conv.inc	(revision 25888)
+++ flt_conv.inc	(working copy)
@@ -220,10 +220,13 @@
         RT_S128REAL  // float128
     );
 
+    // JVM target: explicitly define this record type to avoid "ie2011032601"
+    TFloatFormatProfile = record
+        nDig_mantissa, nDig_exp10: integer;
+    end;
+
 const
-    float_format: array [ TReal_Type ] of record
-        nDig_mantissa, nDig_exp10: integer;
-    end = (
+    float_format: array [ TReal_Type ] of TFloatFormatProfile = (
 {
     Number of mantissa digits is dictated by [2] "IEEE 754-2008", page 32.
     N = 1 + ceiling( p * log10(2) ), where p is the number of significant
Index: flt_core.inc
===================================================================
--- flt_core.inc	(revision 25888)
+++ flt_core.inc	(working copy)
@@ -696,7 +696,6 @@
     C_DIY_FP_Q    = 32;
     C_GRISU_ALPHA =-29;
     C_GRISU_GAMMA = 0;
-    RT_NATIVE = RT_S32REAL;
 {$endif VALREAL_32}
 {$ifdef VALREAL_64}
     C_FRAC2_BITS  = 52;
@@ -704,7 +703,6 @@
     C_DIY_FP_Q    = 64;
     C_GRISU_ALPHA =-61;
     C_GRISU_GAMMA = 0;
-    RT_NATIVE = RT_S64REAL;
 {$endif VALREAL_64}
 {$ifdef VALREAL_80}
     C_FRAC2_BITS  = 63;
@@ -712,7 +710,6 @@
     C_DIY_FP_Q    = 96;
     C_GRISU_ALPHA =-93;
     C_GRISU_GAMMA = 30;
-    RT_NATIVE = RT_S80REAL;
 {$endif VALREAL_80}
 {$ifdef VALREAL_128}
     C_FRAC2_BITS  = 112;
@@ -720,7 +717,6 @@
     C_DIY_FP_Q    = 128;
     C_GRISU_ALPHA =-125;
     C_GRISU_GAMMA =-2;
-    RT_NATIVE = RT_S128REAL;
 {$endif VALREAL_128}
 
 (****************************************************************************)
@@ -926,6 +922,29 @@
 end;
 
 (*-------------------------------------------------------
+ | do_fillchar [local]
+ |
+ | Fills string region with certain character.
+ |
+ *-------------------------------------------------------*)
+{$ifdef cpujvm}
+procedure do_fillchar( var str: shortstring; pos, count: integer; c: char );
+begin
+  while count>0 do
+    begin
+      str[pos]:=c;
+      inc(pos);
+      dec(count);
+    end;
+end;
+{$else not cpujvm}
+procedure do_fillchar( var str: shortstring; pos, count: integer; c: char ); {$ifdef grisu1_inline}inline;{$endif}
+begin
+  fillchar( str[pos], count, c );
+end;
+{$endif cpujvm}
+
+(*-------------------------------------------------------
  | try_return_fixed [local]
  |
  | This routine tries to format the number in the fixed-point representation.
@@ -963,8 +982,12 @@
     if ( cut_digits_at < n_digits_have ) then
     begin
         // round digits
+{$ifdef cpujvm}
+        temp_round := digits;
+{$else not cpujvm}
         if ( n_digits_have > 0 ) then
             move( digits, temp_round, n_digits_have * sizeof( digits[0] ) );
+{$endif cpujvm}
         inc( fixed_dot_pos, round_digits( temp_round, n_digits_have, cut_digits_at {$ifdef GRISU1_F2A_HALF_ROUNDUP}, false {$endif} ) );
         rounded := true;
     end;
@@ -1016,7 +1039,7 @@
     // Leading spaces
     if ( n_spaces > 0 ) then
     begin
-        fillchar( str[i], n_spaces, ' ' );
+        do_fillchar( str, i, n_spaces, ' ' );
         inc( i, n_spaces );
     end;
     // Sign
@@ -1046,7 +1069,7 @@
     // Integer 0-padding
     if ( n_before_dot_pad0 > 0 ) then
     begin
-        fillchar( str[i], n_before_dot_pad0, '0' );
+        do_fillchar( str, i, n_before_dot_pad0, '0' );
         inc( i, n_before_dot_pad0 );
     end;
     //
@@ -1058,7 +1081,7 @@
         // Pre-fraction 0-padding
         if ( n_after_dot_pad0 > 0 ) then
         begin
-            fillchar( str[i], n_after_dot_pad0, '0' );
+            do_fillchar( str, i, n_after_dot_pad0, '0' );
             inc( i, n_after_dot_pad0 );
         end;
         // Fraction significant digits
@@ -1081,7 +1104,7 @@
         // Tail 0-padding
         if ( n_tail_pad0 > 0 ) then
         begin
-            fillchar( str[i], n_tail_pad0, '0' );
+            do_fillchar( str, i, n_tail_pad0, '0' );
 {$ifdef grisu1_debug}
             inc( i, n_tail_pad0 );
 {$endif grisu1_debug}
@@ -1137,7 +1160,7 @@
     // Leading spaces
     if ( n_spaces > 0 ) then
     begin
-        fillchar( str[i], n_spaces, ' ' );
+        do_fillchar( str, i, n_spaces, ' ' );
         inc( i, n_spaces );
     end;
     // Sign
@@ -1170,7 +1193,7 @@
     j := n_digits_req - j;
     if ( j > 0 ) then
     begin
-        fillchar( str[i], j, '0' );
+        do_fillchar( str, i, j, '0' );
         inc( i, j );
     end;
     // Exponent designator
@@ -1186,7 +1209,7 @@
     j := n_digits_exp - n_exp;
     if ( j > 0 ) then
     begin
-        fillchar( str[i], j, '0' );
+        do_fillchar( str, i, j, '0' );
         inc( i, j );
     end;
     // Exponent digits
@@ -1228,7 +1251,7 @@
     // Leading spaces
     if ( n_spaces > 0 ) then
     begin
-        fillchar( str[i], n_spaces, ' ' );
+        do_fillchar( str, i, n_spaces, ' ' );
         inc( i, n_spaces );
     end;
     // Sign
@@ -1241,7 +1264,11 @@
         inc( i );
     end;
     // Special
-    move( spec[1], str[i], slen );
+    while slen>0 do
+      begin
+        str[i+slen-1] := spec[slen];
+        dec(slen);
+      end;
 end;
 
 {$if defined(VALREAL_80) or defined(VALREAL_128)}
@@ -1549,7 +1576,20 @@
     n_digits_req := float_format[real_type].nDig_mantissa;
     n_digits_exp := float_format[real_type].nDig_exp10;
     // number of digits to be calculated by Grisu
-    n_digits_need := float_format[RT_NATIVE].nDig_mantissa;
+    n_digits_need := float_format[
+    {$ifdef VALREAL_32}
+      RT_S32REAL
+    {$endif}
+    {$ifdef VALREAL_64}
+      RT_S64REAL
+    {$endif}
+    {$ifdef VALREAL_80}
+      RT_S80REAL
+    {$endif}
+    {$ifdef VALREAL_128}
+      RT_S128REAL
+    {$endif}
+      ].nDig_mantissa;
     if ( n_digits_req < n_digits_need ) then
         n_digits_need := n_digits_req;
     // number of mantissa digits to be printed in exponential notation
