2012/12/8 Thomas Koenig <tkoe...@netcologne.de>:
> Am 08.12.2012 17:39, schrieb Janus Weil:
>
>> Hi Thomas,
>>
>>> the attached patch fixes a regression introduced with the recent
>>> checking for DO loop variables when they are used with a generic
>>> subroutine where the generic name matches one of the actual names.
>>>
>>> Regression-tested.  OK for trunk?
>>
>>
>> A few questions about that patch:
>>
>> -      f = co->symtree->n.sym->formal;
>>
>> +      if (co->resolved_sym == NULL)
>> +    break;
>> +
>> +      f = co->resolved_sym->formal;
>>
>>
>> In which cases does it happen that "resolved_sym==NULL" ?
>
>
> This happens for (now part of the test case, because I got an ICE out of
> it during testing)
>
>   do undeclared=1,10        ! { dg-error "has no IMPLICIT type" }
>      call sub(undeclared)
>   end do
>
> Because undeclared is not declared, the resolution doesn't happen,
> and resolved_sym is NULL.  This is OK because an error has been
> raised about this anyway;

good, if it only happens when an error has been raised, I think your
patch is ok.

Thanks,
Janus

Reply via email to