]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Minor Ada test fix for gnat-llvm
authorTom Tromey <tromey@adacore.com>
Mon, 9 Feb 2026 19:17:17 +0000 (12:17 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 10 Feb 2026 13:23:58 +0000 (06:23 -0700)
gdb.ada/char_enum_overload.exp fails because LLVM optimizes away the
necessary function parameters.  Adding a couple of calls to Do_Nothing
makes this test work.

gdb/testsuite/gdb.ada/char_enum_overload/pck.adb

index 89725140684a6ad714ca861ee4f96c5395ba6ec9..42ea847fc6fcb42d4434b89bce801f8203103de9 100644 (file)
 
 package body Pck is
    procedure Overloaded (Value : Global_Enum_Type) is
+      X : Global_Enum_Type := Value;
    begin
-      null;
+      Do_Nothing (X'Address);
    end Overloaded;
 
    function Overloaded (Value : Character) return Global_Enum_Type is
+      X : Character := Value;
    begin
+      Do_Nothing (X'Address);
       return 'Y';
    end Overloaded;