------- Comment #19 from jaydub66 at gmail dot com  2007-11-02 20:53 -------
Hi Jerry,
I tried your patch (part 3b), and noticed that it fails on the following code:

real function t(x)
  real ::x
  t = x
end function

program p
  implicit none
  intrinsic sin
  procedure(sin):: t
  print *,t(1.0)
end program

Seems like this is due to the stuff which you added to decl.c
(match_procedure_decl):

+      if (proc_if != NULL && proc_if->attr.intrinsic
+         && gfc_intrinsic_actual_ok (proc_if->name, 0))
+       goto set_if;
+
       if (!sym->attr.pointer && gfc_add_external (&sym->attr, NULL) ==
FAILURE)
        return MATCH_ERROR;
       if (gfc_add_proc (&sym->attr, sym->name, NULL) == FAILURE)
        return MATCH_ERROR;

       /* Set interface.  */
+set_if:

This prevents the procedure from getting the "external" and "procedure"
attributes, if the interface is an intrinsic routine. This is wrong. A symbol
declared by a PROCEDURE() statement should always get the "procedure"
attribute.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33162

Reply via email to