https://gcc.gnu.org/g:f3a62dcfc96cb24127385a7e668133e037b6085d
commit r16-862-gf3a62dcfc96cb24127385a7e668133e037b6085d Author: Eric Botcazou <ebotca...@adacore.com> Date: Sat May 24 15:36:50 2025 +0200 Ada: minor tweaks to ACATS 2.6 testsuite 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. Diff: --- gcc/testsuite/ada/acats-2/run_all.sh | 4 ++-- gcc/testsuite/ada/acats-2/tests/cd/cd300050.am | 7 ++++--- gcc/testsuite/ada/acats-2/tests/cd/cd300051.c | 4 +++- gcc/testsuite/ada/acats-2/tests/cxa/cxa4001.a | 4 ++-- gcc/testsuite/ada/acats-2/tests/cxb/cxb30131.c | 5 +++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/ada/acats-2/run_all.sh b/gcc/testsuite/ada/acats-2/run_all.sh index a57e3831abb5..d62d2e113b02 100755 --- a/gcc/testsuite/ada/acats-2/run_all.sh +++ b/gcc/testsuite/ada/acats-2/run_all.sh @@ -1,10 +1,10 @@ #!/bin/sh -# Run ACATS with the GNU Ada compiler +# Run ACATS 2 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" diff --git a/gcc/testsuite/ada/acats-2/tests/cd/cd300050.am b/gcc/testsuite/ada/acats-2/tests/cd/cd300050.am index 81b6e3354aaa..1efc84f35bd0 100644 --- a/gcc/testsuite/ada/acats-2/tests/cd/cd300050.am +++ b/gcc/testsuite/ada/acats-2/tests/cd/cd300050.am @@ -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 diff --git a/gcc/testsuite/ada/acats-2/tests/cd/cd300051.c b/gcc/testsuite/ada/acats-2/tests/cd/cd300051.c index 86e60a0366bf..be01e405a998 100644 --- a/gcc/testsuite/ada/acats-2/tests/cd/cd300051.c +++ b/gcc/testsuite/ada/acats-2/tests/cd/cd300051.c @@ -46,9 +46,11 @@ -- 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 */ diff --git a/gcc/testsuite/ada/acats-2/tests/cxa/cxa4001.a b/gcc/testsuite/ada/acats-2/tests/cxa/cxa4001.a index 52fabc3d5142..43fd3da7d360 100644 --- a/gcc/testsuite/ada/acats-2/tests/cxa/cxa4001.a +++ b/gcc/testsuite/ada/acats-2/tests/cxa/cxa4001.a @@ -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. diff --git a/gcc/testsuite/ada/acats-2/tests/cxb/cxb30131.c b/gcc/testsuite/ada/acats-2/tests/cxb/cxb30131.c index 6cbbdd131b04..96f9dee98717 100644 --- a/gcc/testsuite/ada/acats-2/tests/cxb/cxb30131.c +++ b/gcc/testsuite/ada/acats-2/tests/cxb/cxb30131.c @@ -50,15 +50,16 @@ -- 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); }