]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: minor tweaks to ACATS 2.6 testsuite
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 24 May 2025 13:36:50 +0000 (15:36 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Sat, 24 May 2025 13:36:50 +0000 (15:36 +0200)
This upgrades the testsuite to the 2.6K revision.

gcc/testsuite/
* ada/acats-2/run_all.sh: Minor tweaks in comments.
* ada/acats-2/tests/cd/cd300050.am: Upgrade to 2.6K revision.
* ada/acats-2/tests/cd/cd300051.c: Likewise.
* ada/acats-2/tests/cxa/cxa4001.a: Likewise.
* ada/acats-2/tests/cxb/cxb30131.c: Likewise.

gcc/testsuite/ada/acats-2/run_all.sh
gcc/testsuite/ada/acats-2/tests/cd/cd300050.am
gcc/testsuite/ada/acats-2/tests/cd/cd300051.c
gcc/testsuite/ada/acats-2/tests/cxa/cxa4001.a
gcc/testsuite/ada/acats-2/tests/cxb/cxb30131.c

index a57e3831abb53de2b2913bf54bac9171aa39edfc..d62d2e113b023bab96827709c2d29e526cc46914 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
-# Run ACATS with the GNU Ada compiler
+# Run ACATS with the GNU Ada compiler
 
 # The following functions are to be customized if you run in cross
 # environment or want to change compilation flags.  Note that for
 # tests requiring checks not turned on by default, this script
-# automatically adds the needed flags to pass (ie: -gnato or -gnatE).
+# automatically adds the needed flags to pass (e.g. -gnatE).
 
 # gccflags="-O3 -funroll-loops"
 # gnatflags="-gnatn"
index 81b6e3354aaa008c4eca434b9060587c841ea42c..1efc84f35bd0fcd96dbdb2ba1a53119901819a19 100644 (file)
@@ -43,7 +43,7 @@
 --      Implementation dialects of C may require alteration of the C program
 --      syntax.  The program is included here for reference:
 --
---            int _cd30005_1( Value )
+--            int _cd30005_1( int Value )
 --            {
 --               /* int Value */
 --
@@ -64,8 +64,8 @@
 --
 --      For implementations not validating against Annex C:
 --        this test may report compile time errors at one or more points
---        indicated by "-- ANX-C RQMT", in which case it may be graded as inapplicable.
---        Otherwise, the test must execute and report PASSED.
+--        indicated by "-- ANX-C RQMT", in which case it may be graded as
+--        inapplicable. Otherwise, the test must execute and report PASSED.
 --
 --
 -- CHANGE HISTORY:
@@ -75,6 +75,7 @@
 --      04 NOV 96   SAIC   Added use type System.Address
 --      16 FEB 98   EDS    Modified documentation.
 --      29 JUN 98   EDS    Modified main program name.
+--      03 JUN 24   RLB    Corrected C program to have a proper prototype.
 --!
 
 ----------------------------------------------------------------- CD30005_0
index 86e60a0366bf1227653c282c33e88704efe763d2..be01e405a99818a31af9e0049b01558e92e82b55 100644 (file)
 --      12 Oct 95   SAIC    Initial prerelease version.                  
 --      14 Feb 97   PWB.CTA Created this file from code appearing in
 --                          CD30005.A (as comments).
+--       3 Jun 24   RLB     Corrected code to have a proper prototype,
+--                          as recommended by all modern versions of C.
 --!
 */
-            int _cd30005_1(int Value )
+            int _cd30005_1( int Value )
             {
                 /* int Value */
 
index 52fabc3d5142f34edb92366ca64d3d33b838c744..43fd3da7d3608a8d6e0c657dc8a1deda9b9534c0 100644 (file)
@@ -47,6 +47,8 @@
 --       
 -- CHANGE HISTORY:
 --      06 Dec 94   SAIC    ACVC 2.0
+--      30 May 24   RLB     Added uses of Bad_Map to prevent optimization from
+--                          removing the calls that generate Bad_Map.
 --
 --!
 
@@ -185,7 +187,6 @@ begin
       begin
          Bad_Map := Maps.To_Mapping(From => "aa", To => "yz");
          Report.Failed("Exception not raised with repeated character");
-
          if Report.Equal (Character'Pos('y'),
                           Character'Pos(Maps.Value(Bad_Map, 'a'))) then
             -- Use the map to avoid optimization.
@@ -206,7 +207,6 @@ begin
       begin
          Bad_Map := Maps.To_Mapping("abc", "yz");
          Report.Failed("Exception not raised with unequal parameter lengths");
-
          if Report.Equal (Character'Pos('y'),
                           Character'Pos(Maps.Value(Bad_Map, 'a'))) then
             -- Use the map to avoid optimization.
index 6cbbdd131b04b139397aeab4d3b0da43d1bdad9d..96f9dee987177394de0d59b252b8b046b1d69959 100644 (file)
 --      12 Oct 95   SAIC    Initial prerelease version. 
 --      26 Oct 96   SAIC    Modified temp array initialization.                
 --      15 Feb 99   RLB     Repaired to remove non-standard function strdup.
+--      16 Jun 21   RLB     Added missing include required by C standards.
 --!
 */
 
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
 
 char *stringdup (char *s)
 {
-  char *result = malloc(sizeof(char)*(strlen(s)+1));
+  char *result = (char *) malloc(sizeof(char)*(strlen(s)+1));
   return strcpy(result,s);
 }