]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Update more tests for gnat-llvm
authorTom Tromey <tromey@adacore.com>
Fri, 1 May 2026 14:01:54 +0000 (08:01 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 1 May 2026 17:47:46 +0000 (11:47 -0600)
I found a few more tests where a simple change would preserve the
behavior of the test while also making it pass with gnat-llvm.

As this is Ada and gnat-llvm-specific, I am checking it in.

gdb/testsuite/gdb.ada/aliased_array/foo.adb
gdb/testsuite/gdb.ada/str_chars/foo.adb
gdb/testsuite/gdb.ada/tick_length_array_enum_idx/foo_n207_004.adb

index 11a84c32f0a39be42c19b981fbb2a6bf7c948171..759533fd5617b874469306e85dfa9bf1ba3aca6b 100644 (file)
 with Pck; use Pck;
 procedure Foo is
    BT : aliased Bounded := New_Bounded (Low => 1, High => 3);
+   BT_First : Integer := BT'First;
+   BT_Last : Integer := BT'Last;
 begin
    Do_Nothing (BT'Address); -- STOP
+   Do_Nothing (BT_First'Address);
+   Do_Nothing (BT_Last'Address);
 end Foo;
index 019e782d6ced727da472abd486f2e0d2fb88ba60..81cd6f503392f66ae8fb636f7e0fd9c84435793b 100644 (file)
 --  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 procedure Foo is
-
-   procedure Blah (Arg : String) is
-   begin
-     null; -- STOP
-   end;
-
+   Arg : String := "abcdefghijklmnopqrstuvwxyz";
 begin
-
-   Blah ("abcdefghijklmnopqrstuvwxyz");
+   null;                        --  STOP
 end Foo;
index 14375a5a7c2f7d62cb31c0aeaada2af1e3952673..120dc3d3d4df8f674b045edee468e0f262a23947 100644 (file)
@@ -21,10 +21,16 @@ procedure Foo_n207_004 is
    Cold : Variable_Table := (Green => False, Blue => True, White => True);
    Vars : Variable_Table :=  New_Variable_Table (Low => Red, High => Green);
    PT_Full : Full_PT := (False, True, False, True, False);
+
+   Vars_First : Color := Vars'First;
+   Vars_Last : Color := Vars'Last;
+
 begin
    Do_Nothing (Full'Address);  -- STOP
    Do_Nothing (Prim'Address);
    Do_Nothing (Cold'Address);
    Do_Nothing (Vars'Address);
+   Do_Nothing (Vars_First'Address);
+   Do_Nothing (Vars_Last'Address);
    Do_Nothing (PT_Full'Address);
 end Foo_n207_004;