[gdb/testsuite] Add KFAILs for gdb.ada FAILs with gcc-11
authorTom de Vries <tdevries@suse.de>
Wed, 21 Jul 2021 12:22:16 +0000 (14:22 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 21 Jul 2021 12:22:16 +0000 (14:22 +0200)
With gcc-11 we run into:
...
(gdb) print pa_ptr.all^M
That operation is not available on integers of more than 8 bytes.^M
(gdb) KFAIL: gdb.ada/arrayptr.exp: scenario=all: print pa_ptr.all (PRMS: gdb/20991)
...

This is due to PR exp/20991 - "__int128 type support".  Mark this and similar
FAILs as KFAIL.

Also mark this FAIL:
....
(gdb) print pa_ptr(3)^M
cannot subscript or call something of type `foo__packed_array_ptr'^M
(gdb) FAIL: gdb.ada/arrayptr.exp: scenario=minimal: print pa_ptr(3)
...
as a KFAIL for PR ada/28115 - "Support packed array encoded as
DW_TAG_subrange_type".

Tested on x86_64-linux, with gcc-10 and gcc-11.

gdb/testsuite/ChangeLog:

2021-07-21  Tom de Vries  <tdevries@suse.de>

* gdb.ada/arrayptr.exp: Add KFAILs for PR20991 and PR28115.
* gdb.ada/exprs.exp: Add KFAILs for PR20991.
* gdb.ada/packed_array_assign.exp: Same.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/arrayptr.exp
gdb/testsuite/gdb.ada/exprs.exp
gdb/testsuite/gdb.ada/packed_array_assign.exp

index 87c3a78f617331f83fccffe578639218fa7832fc..0454c0675c145f56112803dfe6e6d6795610d41f 100644 (file)
@@ -1,3 +1,9 @@
+2021-07-21  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.ada/arrayptr.exp: Add KFAILs for PR20991 and PR28115.
+       * gdb.ada/exprs.exp: Add KFAILs for PR20991.
+       * gdb.ada/packed_array_assign.exp: Same.
+
 2021-07-19  Tom Tromey  <tromey@adacore.com>
 
        PR gdb/28093
index 515e21242a26db0638b7cf9cbb88a9445ed82e81..606794909d9dacfde2559e93c584235f2da5bf55 100644 (file)
@@ -49,10 +49,38 @@ foreach_with_prefix scenario {all minimal} {
 
     gdb_test "ptype string_access" "= access array \\(<>\\) of character"
 
-    gdb_test "print pa_ptr.all" \
-       " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)"
+    set kfail_int128support_re \
+       "That operation is not available on integers of more than 8 bytes\\."
+    set kfail_packed_array_range_re \
+       "cannot subscript or call something of type `foo__packed_array_ptr'"
+
+    gdb_test_multiple "print pa_ptr.all" "" {
+       -re -wrap " = \\(10, 20, 30, 40, 50, 60, 62, 63, -23, 42\\)" {
+           pass $gdb_test_name
+       }
+       -re -wrap $kfail_int128support_re {
+           kfail gdb/20991 $gdb_test_name
+       }
+    }
 
-    gdb_test "print pa_ptr(3)" " = 30"
+    gdb_test_multiple "print pa_ptr(3)" "" {
+       -re -wrap " = 30" {
+           pass $gdb_test_name
+       }
+       -re -wrap $kfail_int128support_re {
+           kfail gdb/20991 $gdb_test_name
+       }
+       -re -wrap $kfail_packed_array_range_re {
+           kfail gdb/28115 $gdb_test_name
+       }
+    }
 
-    gdb_test "print pa_ptr.all(3)" " = 30"
+    gdb_test_multiple "print pa_ptr.all(3)" "" {
+       -re -wrap " = 30" {
+           pass $gdb_test_name
+       }
+       -re -wrap $kfail_int128support_re {
+           kfail gdb/20991 $gdb_test_name
+       }
+    }
 }
index 8139abf5dcf7109578720f01f92bae8d019f8c7f..480e5e9f971d710f3e2e8ee91314c74f34c07271 100644 (file)
@@ -28,14 +28,34 @@ clean_restart ${testfile}
 set bp_location [gdb_get_line_number "START" ${testdir}/p.adb]
 runto "p.adb:$bp_location"
 
-gdb_test "print X ** Y = Z" \
-         "= true" \
-         "Long_Long_Integer ** Y"
+set kfail_int128support_re \
+    "That operation is not available on integers of more than 8 bytes\\."
+
+gdb_test_multiple "print X ** Y = Z" "Long_Long_Integer ** Y" {
+    -re -wrap "= true" {
+       pass $gdb_test_name
+    }
+    -re -wrap $kfail_int128support_re {
+       kfail gdb/20991 $gdb_test_name
+    }
+}
 
-gdb_test "print long_float'min (long_float (X), 8.0)" \
-         "= 7.0" \
-         "long_float'min"
+set cmd "print long_float'min (long_float (X), 8.0)"
+gdb_test_multiple $cmd "long_float'min" {
+    -re -wrap "= 7.0" {
+       pass $gdb_test_name
+    }
+    -re -wrap $kfail_int128support_re {
+       kfail gdb/20991 $gdb_test_name
+    }
+}
 
-gdb_test "print long_float'max (long_float (X), 8.0)" \
-         "= 8.0" \
-         "long_float'max"
+set cmd "print long_float'max (long_float (X), 8.0)"
+gdb_test_multiple $cmd "long_float'max" {
+    -re -wrap "= 8.0" {
+       pass $gdb_test_name
+    }
+    -re -wrap $kfail_int128support_re {
+       kfail gdb/20991 $gdb_test_name
+    }
+}
index b6c8cf673dea3a8efd95a3f64c8ac57356878033..5f34a07e3af19e78cb76eec5b26b0fb98644859e 100644 (file)
@@ -27,15 +27,72 @@ clean_restart ${testfile}
 
 runto "aggregates.run_test"
 
-gdb_test \
-    "print pra := ((packed_array_assign_x => 2, packed_array_assign_y => 0, packed_array_assign_w => 17), pr, (packed_array_assign_x => 7, packed_array_assign_y => 1, packed_array_assign_w => 23))" \
-    " = \\(\\(packed_array_assign_w => 17, packed_array_assign_x => 2, packed_array_assign_y => 0\\), \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\), \\(packed_array_assign_w => 23, packed_array_assign_x => 7, packed_array_assign_y => 1\\)\\)" \
-    "value of pra"
-
-gdb_test "print pra(1) := pr" \
-    " = \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\)"
-gdb_test "print pra(1)" \
-    " = \\(packed_array_assign_w => 104, packed_array_assign_x => 2, packed_array_assign_y => 3\\)"
+set kfail_int128support_re \
+    "That operation is not available on integers of more than 8 bytes\\."
+
+set cmd \
+    [list \
+        "print pra := " \
+        "((packed_array_assign_x => 2," \
+        "packed_array_assign_y => 0," \
+        "packed_array_assign_w => 17)," \
+        "pr," \
+        "(packed_array_assign_x => 7," \
+        "packed_array_assign_y => 1," \
+        "packed_array_assign_w => 23))"]
+set cmd [join $cmd]
+set re \
+    [list \
+        " = \\(\\(packed_array_assign_w => 17," \
+        "packed_array_assign_x => 2," \
+        "packed_array_assign_y => 0\\)," \
+        "\\(packed_array_assign_w => 104," \
+        "packed_array_assign_x => 2," \
+        "packed_array_assign_y => 3\\)," \
+        "\\(packed_array_assign_w => 23," \
+        "packed_array_assign_x => 7," \
+        "packed_array_assign_y => 1\\)\\)"]
+set re [join $re]
+gdb_test_multiple $cmd "value of pra" {
+    -re -wrap $re {
+       pass $gdb_test_name
+    }
+    -re -wrap $kfail_int128support_re {
+       kfail gdb/20991 $gdb_test_name
+    }
+}
+
+set cmd "print pra(1) := pr"
+set re \
+    [list \
+        " = \\(packed_array_assign_w => 104," \
+        "packed_array_assign_x => 2," \
+        "packed_array_assign_y => 3\\)"]
+set re [join $re]
+gdb_test_multiple $cmd "" {
+    -re -wrap $re {
+       pass $gdb_test_name
+    }
+    -re -wrap $kfail_int128support_re {
+       kfail gdb/20991 $gdb_test_name
+    }
+}
+
+set cmd "print pra(1)"
+set re \
+    [list \
+        " = \\(packed_array_assign_w => 104," \
+        "packed_array_assign_x => 2," \
+        "packed_array_assign_y => 3\\)"]
+set re [join $re]
+gdb_test_multiple $cmd "" {
+    -re -wrap $re {
+       pass $gdb_test_name
+    }
+    -re -wrap $kfail_int128support_re {
+       kfail gdb/20991 $gdb_test_name
+    }
+}
 
 gdb_test "print npr := (q000 => 3, r000 => (packed_array_assign_x => 6, packed_array_assign_y => 1, packed_array_assign_w => 117))" \
     " = \\(q000 => 3, r000 => \\(packed_array_assign_w => 117, packed_array_assign_x => 6, packed_array_assign_y => 1\\)\\)" \
This page took 0.036713 seconds and 4 git commands to generate.