From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Subject: [patch] Testsuite: Fortran: 6.8 regression + gfortran updates
Date: Mon, 08 Dec 2008 18:16:00 -0000 [thread overview]
Message-ID: <20081208181523.GA23831@host0.dyn.jankratochvil.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
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
[-- Attachment #2: gdbfortran-tests.patch --]
[-- Type: text/plain, Size: 2902 bytes --]
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)"
next reply other threads:[~2008-12-08 18:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 18:16 Jan Kratochvil [this message]
2008-12-29 3:49 ` Joel Brobecker
2009-01-06 14:05 ` Jan Kratochvil
2009-01-06 14:14 ` Jan Kratochvil
2009-01-07 5:14 ` Joel Brobecker
2009-01-07 7:38 ` Jan Kratochvil
2009-01-07 8:46 ` Joel Brobecker
2009-01-07 12:44 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081208181523.GA23831@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox