This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: "Weinmann, Christoph T" <christoph dot t dot weinmann at intel dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Heckel, Bernhard" <bernhard dot heckel at intel dot com>
- Date: Sun, 7 Aug 2016 22:12:24 +0200
- Subject: Re: [ping] [PATCH v2 0/6] fortran: multi-dimensional subarrays with strides
- Authentication-results: sourceware.org; auth=none
- References: <1E04C56C2A492B449743D653DD4A15BC3BC1AEB0@IRSMSX102.ger.corp.intel.com> <20160630214736.GA6476@host1.jankratochvil.net> <1E04C56C2A492B449743D653DD4A15BC3BC4C94C@IRSMSX102.ger.corp.intel.com>
Hello Christoph,
0001-fortran-allow-multi-dimensional-subarrays.patch
contains:
+ elt_size = TYPE_LENGTH (elt_type);
+ elt_offs = longest_to_int (lowbound - ary_low_bound);
+ elt_stride = TYPE_LENGTH (TYPE_INDEX_TYPE (array_type));
+
+ elt_offs *= elt_size;
which now causes:
valops.c:3803:11: error: variable ‘elt_stride’ set but not used [-Werror=unused-but-set-variable]
LONGEST elt_stride, ary_high_bound, ary_low_bound;
^~~~~~~~~~
but other patches contained:
+ if (elt_stride > 0)
+ elt_offs *= elt_stride;
[...]
+ else
+ elt_offs *= elt_size;
This may explain some Fortran testcase stride failure I was seeing and
bugreporting to you off-list.
Jan