Commit
1411185a ("Introduce and use gnat_version_compare") changed the
Ada tests to use a new proc for version checking. Unfortunately this
patch inadvertently reversed the sense of the test in
packed_array_assign.exp.
After fixing this, I went through that patch again and looked for
other problems. I found one spot where the wrong syntax was used, and
some others where I believe the sense of the test was inverted.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32444
Approved-By: Andrew Burgess <aburgess@redhat.com>
set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
-if {[gnat_version_compare <= 4.4]} {
+if {[gnat_version_compare <= {4 4}]} {
# Ada array bounds are missing in older GCCs.
setup_xfail *-*-*
}
"packed_array_assign_y => 1\\)\\)"]
# GNAT >= 12.0 has the needed fix here.
-set zeros_expected [gnat_version_compare >= 12]
+set zeros_expected [gnat_version_compare < 12]
set all_zeros \
[string_to_regexp "((packed_array_assign_w => 0, packed_array_assign_x => 0, packed_array_assign_y => 0), (packed_array_assign_w => 0, packed_array_assign_x => 0, packed_array_assign_y => 0), (packed_array_assign_w => 0, packed_array_assign_x => 0, packed_array_assign_y => 0))"]
}
-re " = .*more than max-value-size.*\[\r\n\]+$gdb_prompt $" {
# GNAT >= 12.0 has the needed fix here.
- if {$scenario == "minimal" && [gnat_version_compare >= 12]} {
+ if {$scenario == "minimal" && [gnat_version_compare < 12]} {
setup_kfail "minimal encodings" *-*-*
}
fail $test
}
-re " = \\(size => 8, length => 8, buffer => warning: could not find bounds information on packed array.*$gdb_prompt $" {
# GNAT >= 11.0 has the needed fix here.
- if {$scenario == "minimal" && [gnat_version_compare >= 11]} {
+ if {$scenario == "minimal" && [gnat_version_compare < 11]} {
setup_kfail "minimal encodings" *-*-*
}
fail $test
}
-re " = \\(size => 8, length => 8, buffer => warning: could not find bounds information on packed array.*$gdb_prompt $" {
# GNAT >= 11.0 has the needed fix here.
- if {$scenario == "minimal" && [gnat_version_compare >= 11]} {
+ if {$scenario == "minimal" && [gnat_version_compare < 11]} {
setup_kfail "minimal encodings" *-*-*
}
fail $test