From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Andrew Burgess <aburgess@broadcom.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Multi-dimensional Fortran arrays issue PR11104
Date: Tue, 23 Nov 2010 19:10:00 -0000 [thread overview]
Message-ID: <20101123191009.GA28613@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20101123172324.GA10138@host0.dyn.jankratochvil.net>
On Tue, 23 Nov 2010 18:23:24 +0100, Jan Kratochvil wrote:
> dimension a(10)
> call sub(a,10)
> end
> subroutine sub(a,n)
> dimension a(n)
> a(5) = 5
> end
>
> (gdb) b 6
> (gdb) run
> (gdb) p a(5)
> Subscript number 1 out of bounds, range 1 to 1
BTW I intended to show it for arrays with undefined length such as:
dimension a(10)
call sub(a,10)
end
subroutine sub(a)
dimension a(*)
a(5) = 5
end
FSF GDB recognizes the dynamic length (former example) as undefined length
type = real(kind=4) (*)
while FSF GDB recognizes the undefined length (latter example) as -1
type = real(kind=4) (-1)
which does not work in any case.
For VLA GDB the former example gets the correct length
type = real(kind=4) (10)
while VLA GDB recognizes the undefined length correctly:
type = real(kind=4) (*)
So that your patch could be compatible with both.
Thanks,
Jan
next prev parent reply other threads:[~2010-11-23 19: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
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 [this message]
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=20101123191009.GA28613@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