From: David Lecomber <david@streamline-computing.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Improvements to Fortran support
Date: Fri, 16 May 2003 11:24:00 -0000 [thread overview]
Message-ID: <20030516122103.A31934@streamline-computing.com> (raw)
In-Reply-To: <20030115213240.A17967@streamline-computing.com>; from david@streamline-computing.com on Wed, Jan 15, 2003 at 09:32:40PM +0000
Reposting as I now have the copyright assignment in place..
Fortran arrays are presently allocated in their entirety and then the
correct element is pulled out. This (a) doesn't scale, (b) doesn't
work if the array is a parameter to a subroutine and supplied with a
(*) in the dimensions (GDB runs out of memory doing malloc( -1 )..)
The fix here makes the behaviour the same as the code for doing C
arrays..
*** eval.c Sun Dec 15 22:29:59 2002
--- eval.c Sun Dec 15 22:28:41 2002
*************** evaluate_subexp_standard (struct type *e
*** 1383,1392 ****
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
--- 1383,1388 ----
*************** evaluate_subexp_standard (struct type *e
*** 1395,1401 ****
returns the correct type value */
VALUE_TYPE (arg1) = tmp_type;
! return value_ind (value_add (value_coerce_array (arg1), arg2));
}
case BINOP_LOGICAL_AND:
--- 1391,1405 ----
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);
}
case BINOP_LOGICAL_AND:
David
next prev parent reply other threads:[~2003-05-16 11:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-15 21:32 Patches to improve " David Lecomber
2003-05-16 11:24 ` David Lecomber [this message]
2003-05-16 15:25 ` [PATCH] Improvements to " Daniel Jacobowitz
2003-05-16 16:08 ` David Carlton
2003-05-16 11:25 ` [PATCH] Large array fix for Fortran David Lecomber
2003-05-16 15:32 ` Daniel Jacobowitz
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=20030516122103.A31934@streamline-computing.com \
--to=david@streamline-computing.com \
--cc=gdb-patches@sources.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