[fortran,patch] Fix PR33957, rejects valid init. expr.

Jerry DeLisle jvdelisle@verizon.net
Fri Nov 16 20:29:00 GMT 2007


François-Xavier Coudert wrote:
> ping
> 
> On Nov 9, 2007 6:33 PM, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
>> Patch below fixes PR33957, a rejects-valid bug: it does so by not
>> emitting an error in check_inquiry() when we don't recognize a
>> function as an inquiry function, but simply bailing out. When
>> appropriate, an error will be emitted from the function that called
>> check_inquiry(). And anyway, I think this error message doesn't make
>> sense: we say that "inquiry function 'FOO' is not permitted in an
>> init. expr.", when in fact we did not recognize FOO as an inquiry
>> function.
>>
>> Regtested on x86_64-linux, will come with a testcase & ChangeLog, OK to commit?
>>
>> FX
>>
>>
>>
>> Index: expr.c
>> ===================================================================
>> --- expr.c      (revision 129869)
>> +++ expr.c      (working copy)
>> @@ -1981,11 +1981,7 @@ check_inquiry (gfc_expr *e, int not_rest
>>        break;
>>
>>    if (functions[i] == NULL)
>> -    {
>> -      gfc_error ("Inquiry function '%s' at %L is not permitted "
>> -                "in an initialization expression", name, &e->where);
>> -      return MATCH_ERROR;
>> -    }
>> +    return MATCH_ERROR;
>>
>>    /* At this point we have an inquiry function with a variable argument.  The
>>       type of the variable might be undefined, but we need it now, because the
>>
> 
OK
Jerry



More information about the Fortran mailing list