SoC fortran procedure pointers

Janus Weil jaydub66@googlemail.com
Wed Jun 20 09:33:00 GMT 2007


2007/6/20, Tobias Burnus <burnus@net-b.de>:
> The following is strange
> >> +      if (s != NULL && !(s->attr.procedure && s->formal == NULL))
> >> +        {
> >> +          sym->formal = gfc_get_formal_arglist ();
> >> +          if (s->attr.procedure)
> >> +            sym->formal->sym = s->formal->sym;
> >> +          else
> >> +        sym->formal->sym = s;
> >> +        }
> The outer if excludes s->attr.procedure, which is then used in the inner if.

Well, it only excludes a->attr.procedure if (s->formal==NULL) in
addition. For (s->formal!=NULL) the inner block is executed even if
s->attr.procedure is not set. So the inner if does make some sense.

Janus



More information about the Fortran mailing list