]> git.pld-linux.org Git - packages/gdb.git/blame - gdb-vla-intel-04of23-fix.patch
- rebuild with readline 7.0
[packages/gdb.git] / gdb-vla-intel-04of23-fix.patch
CommitLineData
aa964043
KK
1Re: [PATCH 04/23] vla: make dynamic fortran arrays functional.
2https://sourceware.org/ml/gdb-patches/2014-06/msg00570.html
3
28b292e9 4Index: gdb-7.10.50.20151027/gdb/valarith.c
aa964043 5===================================================================
28b292e9
AM
6--- gdb-7.10.50.20151027.orig/gdb/valarith.c 2015-11-03 20:41:48.543504999 +0100
7+++ gdb-7.10.50.20151027/gdb/valarith.c 2015-11-03 20:46:36.995238888 +0100
8@@ -193,10 +193,17 @@ value_subscripted_rvalue (struct value *
aa964043
KK
9 struct type *array_type = check_typedef (value_type (array));
10 struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
28b292e9 11 unsigned int elt_size = type_length_units (elt_type);
aa964043
KK
12- unsigned int elt_offs = longest_to_int (index - lowerbound);
13+ unsigned int elt_offs;
14 LONGEST elt_stride = TYPE_BYTE_STRIDE (TYPE_INDEX_TYPE (array_type));
15 struct value *v;
16
17+ if (TYPE_NOT_ASSOCIATED (array_type))
28b292e9 18+ error (_("no such vector element (vector not associated)"));
aa964043 19+ if (TYPE_NOT_ALLOCATED (array_type))
28b292e9 20+ error (_("no such vector element (vector not allocated)"));
aa964043
KK
21+
22+ elt_offs = longest_to_int (index - lowerbound);
23+
24 if (elt_stride > 0)
25 elt_offs *= elt_stride;
26 else if (elt_stride < 0)
28b292e9 27@@ -210,14 +217,7 @@ value_subscripted_rvalue (struct value *
aa964043
KK
28
29 if (index < lowerbound || (!TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (array_type)
28b292e9 30 && elt_offs >= type_length_units (array_type)))
aa964043 31- {
28b292e9
AM
32- if (type_not_associated (array_type))
33- error (_("no such vector element (vector not associated)"));
34- else if (type_not_allocated (array_type))
35- error (_("no such vector element (vector not allocated)"));
aa964043
KK
36- else
37- error (_("no such vector element"));
38- }
39+ error (_("no such vector element"));
40
41 if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
42 v = allocate_value_lazy (elt_type);
This page took 0.131345 seconds and 4 git commands to generate.