diff options
author | Tom Tromey <tromey@adacore.com> | 2024-09-26 08:48:03 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-10-15 13:36:29 -0600 |
commit | 1411185a57ed246558f0f97d7faf0dc050de3708 (patch) | |
tree | 232eea52c9f810e5d5cc5dcd7a18bbfdb41cd2ab /gdb/testsuite/gdb.ada/null_array.exp | |
parent | a104f0a3e62031d2a5aabfe9e82f55158647f444 (diff) | |
download | binutils-1411185a57ed246558f0f97d7faf0dc050de3708.zip binutils-1411185a57ed246558f0f97d7faf0dc050de3708.tar.gz binutils-1411185a57ed246558f0f97d7faf0dc050de3708.tar.bz2 |
Introduce and use gnat_version_compare
While testing a modified GNAT, I found that this test in
fun_renaming.exp was returning 0 for GCC 13:
if {[test_compiler_info {gcc-6*}]}
This patch introduces a new, more robust way to check the GNAT
compiler version, and changes the gda.ada tests to use it. A small
update to version_compare was also needed.
Note that, in its current form, this new code won't really interact
well with non-GCC compilers (specifically gnat-llvm). This doesn't
seem like a major issue at this point, though, because gnat-llvm
doesn't properly emit debuginfo yet, and when it does, more changes
will be needed in these tests anyway.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/testsuite/gdb.ada/null_array.exp')
-rw-r--r-- | gdb/testsuite/gdb.ada/null_array.exp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp index 4a04945..7fa7c19 100644 --- a/gdb/testsuite/gdb.ada/null_array.exp +++ b/gdb/testsuite/gdb.ada/null_array.exp @@ -28,8 +28,7 @@ clean_restart ${testfile} set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb] runto "foo.adb:$bp_location" -if {[test_compiler_info {gcc-[0-3]-*}] - || [test_compiler_info {gcc-4-[0-4]-*}]} { +if {[gnat_version_compare <= 4.4]} { # Ada array bounds are missing in older GCCs. setup_xfail *-*-* } |