From: christoph.t.weinmann@intel.com
To: jan.kratochvil@redhat.com, gdb-patches@sourceware.org
Cc: christoph.t.weinmann@intel.com
Subject: [PATCH v2 2/6] fortran: combine subarray and string computation
Date: Fri, 26 Feb 2016 13:11:00 -0000 [thread overview]
Message-ID: <1456492259-13807-3-git-send-email-christoph.t.weinmann@intel.com> (raw)
In-Reply-To: <1456492259-13807-1-git-send-email-christoph.t.weinmann@intel.com>
From: Christoph Weinmann <christoph.t.weinmann@intel.com>
Strings only have one dimension, but the element computation is
identical to the subarray computation for ranges and indices.
2013-11-26 Christoph Weinmann <christoph.t.weinmann@intel.com>
* eval.c (evaluate_subexp_standard): Call
value_f90_subarray for print expressions on array and
string types.
Signed-off-by: Christoph Weinmann <christoph.t.weinmann@intel.com>
---
gdb/eval.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/gdb/eval.c b/gdb/eval.c
index c9f325f..164d7ab 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -2034,16 +2034,8 @@ evaluate_subexp_standard (struct type *expect_type,
switch (code)
{
case TYPE_CODE_ARRAY:
- return value_f90_subarray (arg1, exp, pos, nargs, noside);
-
case TYPE_CODE_STRING:
- if (exp->elts[*pos].opcode == OP_F90_RANGE)
- return value_f90_subarray (arg1, exp, pos, 1, noside);
- else
- {
- arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
- return value_subscript (arg1, value_as_long (arg2));
- }
+ return value_f90_subarray (arg1, exp, pos, nargs, noside);
case TYPE_CODE_PTR:
case TYPE_CODE_FUNC:
--
2.5.0
next prev parent reply other threads:[~2016-02-26 13:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 13:11 [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides christoph.t.weinmann
2016-02-26 13:11 ` [PATCH v2 4/6] fortran: enable parsing of stride parameter for subranges christoph.t.weinmann
2016-02-26 13:11 ` [PATCH v2 3/6] fortran: change subrange enum to bit field christoph.t.weinmann
2016-02-26 13:11 ` christoph.t.weinmann [this message]
2016-02-26 13:11 ` [PATCH v2 6/6] fortran: test cases for subarray strides and slices christoph.t.weinmann
2016-02-26 13:11 ` [PATCH v2 1/6] fortran: allow multi-dimensional subarrays christoph.t.weinmann
2016-02-26 13:11 ` [PATCH v2 5/6] fortran: calculate subarray with stride values christoph.t.weinmann
2016-02-26 21:00 ` [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides 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=1456492259-13807-3-git-send-email-christoph.t.weinmann@intel.com \
--to=christoph.t.weinmann@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).