The example for Test_Case pragma was rejected by the compiler; now
fixed.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * doc/gnat_rm/implementation_defined_pragmas.rst
        (Test_Case): Change integer to float literals.
        * gnat_rm.texi: Regenerate.
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -6652,8 +6652,8 @@ expression. The following is an example of use within a package spec:
      function Sqrt (Arg : Float) return Float;
      pragma Test_Case (Name     => "Test 1",
                        Mode     => Nominal,
-                       Requires => Arg < 10000,
-                       Ensures  => Sqrt'Result < 10);
+                       Requires => Arg < 10000.0,
+                       Ensures  => Sqrt'Result < 10.0);
      ...
   end Math_Functions;
 


diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -21,7 +21,7 @@
 
 @copying
 @quotation
-GNAT Reference Manual , Nov 20, 2020
+GNAT Reference Manual , Dec 11, 2020
 
 AdaCore
 
@@ -8159,8 +8159,8 @@ package Math_Functions is
    function Sqrt (Arg : Float) return Float;
    pragma Test_Case (Name     => "Test 1",
                      Mode     => Nominal,
-                     Requires => Arg < 10000,
-                     Ensures  => Sqrt'Result < 10);
+                     Requires => Arg < 10000.0,
+                     Ensures  => Sqrt'Result < 10.0);
    ...
 end Math_Functions;
 @end example


Reply via email to