Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Bernhard Heckel <bernhard.heckel@intel.com>
Cc: "Weinmann, Christoph T" <christoph.t.weinmann@intel.com>,
	       gdb-patches@sourceware.org
Subject: Re: [V4 00/21] Fortran dynamic array support
Date: Fri, 26 Aug 2016 07:17:00 -0000	[thread overview]
Message-ID: <20160826071741.GA20908@host1.jankratochvil.net> (raw)
In-Reply-To: <20160825172217.GA17432@host1.jankratochvil.net>

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

On Thu, 25 Aug 2016 19:22:17 +0200, Jan Kratochvil wrote:
> I see the source handles negative stide specially.  Particularly the comment
> here does not explain the code it comments:

With the attached patch disabling these cases still the supplied
gdb.fortran/static-arrays.exp and gdb.fortran/vla-stride.exp PASS (on Fedora 24
x86_64).


Jan

[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 1222 bytes --]

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 88801ac..695825a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -2197,12 +2197,14 @@ resolve_dynamic_type_internal (struct type *type,
     {
       struct type *range_type = TYPE_INDEX_TYPE (resolved_type);
 
+#if 0
       /* Adjust the data location with the value of byte stride if set, which
          can describe the separation between successive elements along the
          dimension.  */
       if (TYPE_BYTE_STRIDE (range_type) < 0)
         value += (TYPE_HIGH_BOUND (range_type) - TYPE_LOW_BOUND (range_type))
                   * TYPE_BYTE_STRIDE (range_type);
+#endif
 
       TYPE_DATA_LOCATION_ADDR (resolved_type) = value;
       TYPE_DATA_LOCATION_KIND (resolved_type) = PROP_CONST;
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 9093969..eca7992 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -199,12 +199,14 @@ value_subscripted_rvalue (struct value *array, LONGEST index, int lowerbound)
 
   if (elt_stride > 0)
     elt_offs *= elt_stride;
+#if 0
   else if (elt_stride < 0)
     {
       int offs = (elt_offs + 1) * elt_stride;
 
       elt_offs = TYPE_LENGTH (array_type) + offs;
     }
+#endif
   else
     elt_offs *= elt_size;
 

  reply	other threads:[~2016-08-26  7:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <88072818E0A3D742B2B1AF16BBEC65A7263D8247@IRSMSX107.ger.corp.intel.com>
     [not found] ` <20160707095439.GA6792@host1.jankratochvil.net>
     [not found]   ` <88072818E0A3D742B2B1AF16BBEC65A7263D990E@IRSMSX107.ger.corp.intel.com>
     [not found]     ` <20160714182743.GA10672@host1.jankratochvil.net>
     [not found]       ` <88072818E0A3D742B2B1AF16BBEC65A7263E6F2E@IRSMSX107.ger.corp.intel.com>
     [not found]         ` <20160715091352.GA8059@host1.jankratochvil.net>
     [not found]           ` <88072818E0A3D742B2B1AF16BBEC65A7263E8FD9@IRSMSX107.ger.corp.intel.com>
     [not found]             ` <20160716151310.GA14331@host1.jankratochvil.net>
     [not found]               ` <20160716151837.GA797@host1.jankratochvil.net>
     [not found]                 ` <88072818E0A3D742B2B1AF16BBEC65A7263F0988@IRSMSX107.ger.corp.intel.com>
2016-08-16 13:59                   ` Jan Kratochvil
2016-08-19  9:58                     ` Bernhard Heckel
2016-08-21 17:04                       ` Jan Kratochvil
2016-08-23 13:34                         ` Bernhard Heckel
2016-08-25 17:06                           ` Jan Kratochvil
2016-08-25 17:22                             ` Jan Kratochvil
2016-08-26  7:17                               ` Jan Kratochvil [this message]
2016-09-01 10:11                                 ` Bernhard Heckel
2016-09-02 13:44                             ` Bernhard Heckel
2016-09-04 17:15                               ` Jan Kratochvil
2016-09-07 10:29                                 ` Bernhard Heckel
2016-09-07 20:05                                   ` Jan Kratochvil
2016-09-12 21:05                                   ` Jan Kratochvil
2016-09-14  7:24                                     ` Bernhard Heckel
2016-09-14 12:53                                       ` Jan Kratochvil
2016-09-07 20:24                                 ` Jan Kratochvil
2016-09-01  9:48                           ` Jan Kratochvil
2015-01-14 13:49 Keven Boell
2015-05-28 20:36 ` Jan Kratochvil
2015-05-28 20:52   ` Joel Brobecker
2015-06-14  8:15 ` Jan Kratochvil
2015-06-17 11:42   ` Boell, Keven
2015-07-01 12:43     ` Keven Boell
2016-07-07  8:30 ` Jan Kratochvil
2016-07-07  9:16   ` Bernhard Heckel
2016-07-07  9:23     ` 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=20160826071741.GA20908@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=bernhard.heckel@intel.com \
    --cc=christoph.t.weinmann@intel.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