From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Andrew Burgess <aburgess@broadcom.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Multi-dimensional Fortran arrays issue PR11104
Date: Mon, 22 Nov 2010 07:10:00 -0000 [thread overview]
Message-ID: <20101122071030.GA17707@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <89AE14E37D740B4796DC14566DF6325ECB7F8F140B@SJEXCHCCR02.corp.ad.broadcom.com>
On Wed, 17 Nov 2010 09:44:56 +0100, Andrew Burgess wrote:
> tested on x86-64 with no regressions.
There is a regression on {x86_64,x86_64-m32,i686}-fedora14-linux-gnu:
-PASS: gdb.python/py-value.exp: Test multiple subscript
+FAIL: gdb.python/py-value.exp: Test multiple subscript
-PASS: gdb.python/py-value.exp: Test multiple subscript
+FAIL: gdb.python/py-value.exp: Test multiple subscript
This is not a real review, just some simple parts before I get to the core.
> + /* Peel of the array indices until we reach the array element type */
> + do
> + {
> + elt_type = TYPE_TARGET_TYPE (elt_type);
> + }
> + while (TYPE_CODE (elt_type) == TYPE_CODE_ARRAY);
Here should be check_typedef during each peel. I do not have a break
reproducer but at least fpc-2.4.2-0.1.rc1.fc15.x86_64 produces such
typedef-wrapped arrays and they are valid DWARF:
program p;
type a = array[1..2] of integer;
type b = array[1..2] of a;
var
v : b;
begin
v[1, 1] := 1;
writeln (v[1, 1]);
end.
Just Pascal does not use this function but anyway.
> +set testfile "multi-dim"
> +set srcfile ${testfile}.f90
> +set binfile ${objdir}/${subdir}/${testfile}
> +
> +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
> + executable {debug f77}] != ""} {
> + return -1
> +}
> +
> +gdb_exit
> +gdb_start
> +gdb_reinitialize_dir $srcdir/$subdir
> +gdb_load ${binfile}
Here could be prepare_for_testing (OK, not used everywhere now).
> +gdb_test "break 20" \
> + "Breakpoint.*at.* file .*$srcfile, line 20\\." \
> + "breakpoint at line 20"
Here should be gdb_get_line_number call as hardcoded line numbers (20) make
later updates difficult.
> +gdb_test "continue" \
> + "Breakpoint 2, test \(\).*at.*multi-dim\.f90:20.*" \
> + "Continue to breakpoint"
[...]
> +gdb_test "print foo" \
> + "\\\$2 = \\(\\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 10\\) \\) \\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 10\\) \\) \\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 10\\) \\) \\( \\( 10, 10\\) \\( 10, 10\\) \\( 10, 20\\) \\) \\)" \
Hardcoded breakpoint and or output ($2) numbers also make later updates
difficult.
> +gdb_exit
Not needed at the testfile end.
Thanks,
Jan
next prev parent reply other threads:[~2010-11-22 7:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 17:26 Andrew Burgess
2010-10-18 7:53 ` Andrew Burgess
2010-10-18 21:20 ` Jan Kratochvil
2010-10-19 16:23 ` Andrew Burgess
2010-11-17 8:45 ` Andrew Burgess
2010-11-22 7:10 ` Jan Kratochvil [this message]
2010-11-23 8:02 ` Jan Kratochvil
2010-11-23 10:04 ` Andrew Burgess
2010-11-23 17:23 ` Jan Kratochvil
2010-11-23 19:10 ` Jan Kratochvil
2010-10-18 21:21 ` 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=20101122071030.GA17707@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=aburgess@broadcom.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