gdb/gdb-fortran-testsuite-gfortran.patch
2008-12-14 14:05:20 +00:00

57 lines
2.9 KiB
Diff

http://sourceware.org/ml/gdb-patches/2008-12/msg00155.html
2008-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.fortran/subarray.exp: Expect also the strings type output.
* gdb.fortran/derived-type.exp: Likewise. Expect also the kind=X types.
Update for the f-valprint.c modification from 2008-04-22.
--- ./gdb/testsuite/gdb.fortran/derived-type.exp 1 Jan 2008 22:53:19 -0000 1.6
+++ ./gdb/testsuite/gdb.fortran/derived-type.exp 8 Dec 2008 18:04:34 -0000
@@ -42,23 +42,22 @@ if ![runto MAIN__] then {
}
gdb_test "ptype p" \
- "type = Type bar.*int4.*\:\: c.*real.*\:\: d.*End Type bar" \
+ "type = Type bar.*int.*\:\: c.*real.*\:\: d.*End Type bar" \
"ptype p"
gdb_test "ptype q" \
- "type = Type foo.*real.*\:\: a.*Type bar.*int4.*\:\: c.*real.*\:\: d.*End Type bar \:\: x.*character.*\\(7\\) \:\: b.*End Type foo" \
+ "type = Type foo.*real.*\:\: *a.*Type bar.*int.*\:\: *c.*real.*\:\: *d.*End Type bar \:\: *x.*character.*7.* \:\: *b.*End Type foo" \
"type-printing for derived type"
gdb_breakpoint [gdb_get_line_number "print"]
gdb_continue_to_breakpoint "print"
-gdb_test "print p" "\\$\[0-9\]+ = \\{ 1, 2.375\\}"
+gdb_test "print p" "\\$\[0-9\]+ = \\( 1, 2.375 \\)"
gdb_test "print p%c" "\\$\[0-9\]+ = 1"
gdb_test "print p%d" "\\$\[0-9\]+ = 2.375"
gdb_test "print q%a" "\\$\[0-9\]+ = 3.125"
-gdb_test "print q%b" "\\$\[0-9\]+ = \\(.*a.*b.*c.*d.*e.*f.*g.*\\)"
+gdb_test "print q%b" "\\$\[0-9\]+ = (\\(.*a.*b.*c.*d.*e.*f.*g.*\\)|'abcdefg')"
gdb_test "print q%x%c" "\\$\[0-9\]+ = 1"
gdb_test "print q%x%d" "\\$\[0-9\]+ = 2.375"
gdb_test "print q" \
- "\\$\[0-9\]+ = \\{ 3.125, \\{ 1, 2.375\\}, \\(.*a.*b.*c.*d.*e.*f.*g.*\\)\\}" \
+ "\\$\[0-9\]+ = \\( 3.125, \\( 1, 2.375 \\), (\\(.*a.*b.*c.*d.*e.*f.*g.*\\)|'abcdefg') \\)" \
"print q"
-
--- ./gdb/testsuite/gdb.fortran/subarray.exp 1 Jan 2008 22:53:19 -0000 1.6
+++ ./gdb/testsuite/gdb.fortran/subarray.exp 8 Dec 2008 18:04:34 -0000
@@ -53,10 +53,10 @@ gdb_test "continue" \
# Test four different kinds of subarray expression evaluation.
-gdb_test "print str(2:4)" ".*1 = \\(98 'b', 99 'c', 100 'd'\\).*" "print str(2:4)"
-gdb_test "print str(:3)" ".*2 = \\(97 'a', 98 'b', 99 'c'\\).*" "print str(:3)"
-gdb_test "print str(5:)" ".*3 = \\(101 'e', 102 'f', 103 'g'\\).*" "print str(5:)"
-gdb_test "print str(:)" ".*4 = \\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\).*" "print str(:)"
+gdb_test "print str(2:4)" ".*1 = (\\(98 'b', 99 'c', 100 'd'\\)|'bcd').*" "print str(2:4)"
+gdb_test "print str(:3)" ".*2 = (\\(97 'a', 98 'b', 99 'c'\\)|'abc').*" "print str(:3)"
+gdb_test "print str(5:)" ".*3 = (\\(101 'e', 102 'f', 103 'g'\\)|'efg').*" "print str(5:)"
+gdb_test "print str(:)" ".*4 = (\\(97 'a', 98 'b', 99 'c', 100 'd', 101 'e', 102 'f', 103 'g'\\)|'abcdefg').*" "print str(:)"
gdb_test "print array(2:4)" ".*5 = \\(2, 3, 4\\).*" "print array(2:4)"
gdb_test "print array(:3)" ".*6 = \\(1, 2, 3\\).*" "print array(:3)"