This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING Re: [PATCH,fortran]: proposed fix for PR 33020


Christopher D. Rickett wrote:
> PING

Well, FX had two questions, which I think remained unanswered:
>> the attached patch fixes PR 33020.  currently, the kind of the SHAPE
>> parameter to c_f_pointer is set once the actual is seen.  however,
>> this can prevent shape arguments of different kinds being used for
>> different calls within the same namespace.  the SHAPE parameter
>> should not be set because it needs to allow any valid integer kind.
>
> Then why also remove the type, as follows?
>
>> -  /* Give the optional SHAPE formal arg a type now that we've done our
>> -     initial checking against the actual.  */
>> -  if (sym->intmod_sym_id == ISOCBINDING_F_POINTER)
>> -    sym->formal->next->next->sym->ts.type = BT_INTEGER;
>
>  I can understand that it needs to not have a kind, but it has to be
> an integer, right? With your patch, do you still correctly diagnose if
> someone tries to use a REAL array as shape?
>
> If you answer to that question, it's OK to commit. 

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]