[pushed] Minor test fix for gnat-llvm

Message ID 20251217141632.3122159-1-tromey@adacore.com
State New
Headers
Series [pushed] Minor test fix for gnat-llvm |

Commit Message

Tom Tromey Dec. 17, 2025, 2:16 p.m. UTC
  This patch fixes a spot in the gdb test suite where gnat-llvm seems to
emit slightly better DWARF than GNAT.
---
 gdb/testsuite/gdb.ada/packed_record_2.exp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


base-commit: 03819fa9be47c79ded8b302c852187ff73319677
  

Patch

diff --git a/gdb/testsuite/gdb.ada/packed_record_2.exp b/gdb/testsuite/gdb.ada/packed_record_2.exp
index af2509b73b8..14e03c1e63b 100644
--- a/gdb/testsuite/gdb.ada/packed_record_2.exp
+++ b/gdb/testsuite/gdb.ada/packed_record_2.exp
@@ -41,13 +41,14 @@  gdb_test "print spr.discr" " = 3"
 
 # See PR ada/32880 -- gdb should probably print array (1 .. 3) here,
 # but instead shows array (<>).  However as this isn't totally
-# relevant to this test, we just accept it.
+# relevant to this test, we just accept it.  Also, while gnat-llvm
+# successfully uses the type names, GNAT just emits the ranges here.
 gdb_test "ptype spr" \
     [multi_line \
 	 "type = tagged record" \
-	 "    discr: range 1 .. 8;" \
-	 "    field: range -7 .. -4;" \
-	 "    array_field: array \\(<>\\) of exam.small <packed: 2-bit elements>;" \
+	 "    discr: (range 1 .. 8|range_int);" \
+	 "    field: (range -7 .. -4|small);" \
+	 "    array_field: array \\(<>\\) of (exam.)?small <packed: 2-bit elements>;" \
 	 "end record"]
 
 gdb_test_multiple "print sc" "" {