This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] New testcase to evaluate Fortran substring expression
- From: Daniel Jacobowitz <drow at false dot org>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 31 Jul 2005 22:12:53 -0400
- Subject: Re: [RFA] New testcase to evaluate Fortran substring expression
- References: <Pine.LNX.4.63.0506221044490.11343@wks190384wss.cn.ibm.com> <20050703185733.GI13811@nevyn.them.org> <Pine.LNX.4.63.0507080037480.25810@wks190384wss.cn.ibm.com> <20050714234612.GA21620@nevyn.them.org> <Pine.LNX.4.63.0507141043090.7735@wks190384wss.cn.ibm.com> <Pine.LNX.4.63.0507151821280.21784@wks190384wss.cn.ibm.com>
On Fri, Jul 15, 2005 at 06:25:02PM +0800, Wu Zhou wrote:
> Daniel,
>
> I made some modification to the original patch. The changes include:
>
> - Don't include "arglist : arglist, subrange". Because I don't figure
> out how to evaluate multi-dimension array section yet.
>
> - Only add a new operator: OP_F90_RANGE and get the range type wrapped by
> this operator.
>
> - Change the name of new testcase from substring to subarray. Because
> g77 will handle string variable as character array instead. (gfortran did
> this too) Added four tests for substring evaluation in gdb.fortran/exprs.exp,
> the reason is that g77 and gfortran still treat string constant as string.
>
> Please help review this too. Thanks a lot!
This is looks very good! Two comments for you:
- The magic (and undocumented) constants are not a good idea. Rather
than being clever with abs(), how about using an enum saying what
sort of range it is?
- You have a bunch of lines which are too long in eval.c; could you
fix that, please?
--
Daniel Jacobowitz
CodeSourcery, LLC