This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Fix PR 16907: Allow REAL array indices
- From: Tobias SchlÃter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: fortran at gcc dot gnu dot org, patch <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 13 Mar 2005 19:16:43 +0100
- Subject: Re: [gfortran] Fix PR 16907: Allow REAL array indices
- References: <423480F6.3030901@physik.uni-muenchen.de> <200503131911.19798.stevenb@suse.de>
Steven Bosscher wrote:
> On Sunday 13 March 2005 19:05, Tobias SchlÃter wrote:
>>This is an extension g77 had and we were missing.
>>I deliberately chose the following error not to say anything about the
>>extension: if (index->ts.type != BT_INTEGER && index->ts.type != BT_REAL)
>> {
>> gfc_error ("Array index at %L must be of INTEGER type",
>> &index->where);
>> return FAILURE;
>> }
>> ...
>>I thought it would be the easiest way to avoid special cases, and there's
>>no point in advertising an extension.
>>
>>Bubblestrapped and regtested, new testcase attached. Ok?
>
>
> Actually, I would prefer that we do not support this extension...
Care to explain? People found this bug, so someone uses it. The patch is not
invasive at all, and I don't think anybody is served better by not supporting
it. Unlike real loop indices (which we support) this is also well-defined.
- Tobi