aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-09-10 09:59:18 -0600
committerTom Tromey <tromey@adacore.com>2025-09-10 10:15:41 -0600
commit2fe19b88c905d521b9e9bcd4171817b860a1cc4c (patch)
tree1ce718f61b517f2d1ec4ba21e82f1d20be30c7f6 /gdb
parent86aa0d170d96f380c0e626efc4d40c7d2f27a93a (diff)
downloadbinutils-2fe19b88c905d521b9e9bcd4171817b860a1cc4c.zip
binutils-2fe19b88c905d521b9e9bcd4171817b860a1cc4c.tar.gz
binutils-2fe19b88c905d521b9e9bcd4171817b860a1cc4c.tar.bz2
Fix var_arr_typedef.exp to preserve local variable
This patch fixes var_arr_typedef.exp to preserve a local variable a bit better, protecting it from a gnat-llvm optimization.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb2
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads4
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb2
3 files changed, 5 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
index 2f9114a..80cfac1 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
@@ -20,6 +20,6 @@ package body Pack is
return I;
end Identity;
- procedure Do_Nothing (A : Array_Type) is null;
+ procedure Do_Nothing (A : System.Address) is null;
end Pack;
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
index 2ceb071..353ec48 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
@@ -13,6 +13,8 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+with System; use System;
+
package Pack is
type Rec_Type is record
I : Integer;
@@ -23,7 +25,7 @@ package Pack is
type Array_Type is array (Positive range <>) of Vec_Type;
- procedure Do_Nothing (A : Array_Type);
+ procedure Do_Nothing (A : System.Address);
function Identity (I : Integer) return Integer;
end Pack;
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb b/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
index 4a7f4cb..86609a8 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
@@ -24,5 +24,5 @@ procedure Var_Arr_Typedef is
A : constant Array_Type (1 .. Identity (4)) := (VA, VA, VB, VB);
begin
- Do_Nothing (A); -- BREAK
+ Do_Nothing (A'Address); -- BREAK
end Var_Arr_Typedef;