This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran,patch] Bounds-checking for lower bound of last dimension of assumed-size array
- From: Tobias Burnus <burnus at net-b dot de>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: François-Xavier Coudert <fxcoudert at gmail dot com>, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 21 May 2007 15:47:58 +0200
- Subject: Re: [gfortran,patch] Bounds-checking for lower bound of last dimension of assumed-size array
- References: <19c433eb0705070813y5315f78dg3a3d593101416697@mail.gmail.com> <46486FCD.1000507@net-b.de>
Hi FX,
any news on this patch? Except for the tiny issue/question below, the
patch looks ok.
Tobias
Tobias Burnus wrote on 14 May 2007:
> François-Xavier Coudert wrote on 7 May 2007:
>
>> Index: trans-array.c
>> @@ -2090,7 +2093,9 @@ gfc_conv_array_index_offset (gfc_se * se
>> if ((ar->as->type != AS_ASSUMED_SIZE && !ar->as->cp_was_assumed)
>> || dim < ar->dimen - 1)
>> index = gfc_trans_array_bound_check (se, info->descriptor,
>> - index, dim, &ar->where);
>> + index, dim, &ar->where,
>> + (ar->as->type != AS_ASSUMED_SIZE
>> + && !ar->as->cp_was_assumed) || dim < ar->dimen - 1);
>>
>>
>
> Is not the last argument of gfc_trans_array_bound_check always true? You
> copied exactly the arguments of the "if" above.
>
> Did you want to remove the "if" completely?
>
>
>> @@ -2116,7 +2121,9 @@ gfc_conv_array_index_offset (gfc_se * se
>> if ((ar->as->type != AS_ASSUMED_SIZE && !ar->as->cp_was_assumed)
>> || dim < ar->dimen - 1)
>> index = gfc_trans_array_bound_check (se, info->descriptor,
>> - index, dim, &ar->where);
>> + index, dim, &ar->where,
>> + (ar->as->type != AS_ASSUMED_SIZE
>> + && !ar->as->cp_was_assumed) || dim < ar->dimen - 1);
>>
>>
> Ditto.
>
> Tobias
>
>
>
>