aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorDavid Lecomber <david@lecomber.net>2003-09-09 23:09:37 +0000
committerDavid Lecomber <david@lecomber.net>2003-09-09 23:09:37 +0000
commit962d6d933651e62669808c0ba27b7b94de60ba5f (patch)
tree860f4b01bcd17d37ea5a316b14f39d609d253649 /gdb/eval.c
parente56a0ecc9e596e2109148793cac8fb905e71d544 (diff)
downloadgdb-962d6d933651e62669808c0ba27b7b94de60ba5f.zip
gdb-962d6d933651e62669808c0ba27b7b94de60ba5f.tar.gz
gdb-962d6d933651e62669808c0ba27b7b94de60ba5f.tar.bz2
Reverting until I learn how to conform..
Diffstat (limited to 'gdb/eval.c')
-rw-r--r--gdb/eval.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 7b18723..914a552 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1666,6 +1666,10 @@ evaluate_subexp_standard (struct type *expect_type,
offset_item =
array_size_array[i] * offset_item + subscript_array[i];
+ /* Construct a value node with the value of the offset */
+
+ arg2 = value_from_longest (builtin_type_f_integer, offset_item);
+
/* Let us now play a dirty trick: we will take arg1
which is a value node pointing to the topmost level
of the multidimensional array-set and pretend
@@ -1674,15 +1678,7 @@ evaluate_subexp_standard (struct type *expect_type,
returns the correct type value */
VALUE_TYPE (arg1) = tmp_type;
-
- f77_get_dynamic_lowerbound (tmp_type, &lower);
-
- /* Construct a value node with the value of the offset */
- /* lower will get subtracted off in value_subscript, hence add it here */
-
- arg2 = value_from_longest (builtin_type_f_integer, offset_item + lower);
-
- return value_subscript(arg1, arg2);
+ return value_ind (value_add (value_coerce_array (arg1), arg2));
}
case BINOP_LOGICAL_AND: