This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Testsuite: Fortran: 6.8 regression + gfortran updates


Hi,

there is a regression against gdb-6.8 for:
  gdb.fortran/derived-type.exp: print p
due to the change
http://sourceware.org/ml/gdb-patches/2008-04/msg00383.html
http://sourceware.org/ml/gdb-cvs/2008-04/msg00135.html
as now Fortran struct is `( xxx )' instead of former `{ xxx}'.

But made there other updates to make it all PASS on Fedora
gcc-gfortran-4.3.2-7 (which AFAIK behaves more like gfortran-4.4 for these
types).  Particularly gfortran now generates DW_TAG_string_type for character
arrays and also produces type names like `integer(kind=4)' while the testcase
expected `int4'.

Requesting approval (such as whether this dual acceptance is the right way).


Thanks,
Jan
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)"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]