This is the mail archive of the gcc-bugs@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]

[Bug fortran/35830] ICE with PROCEDURE(<interface>) containing array formal arguments



------- Comment #12 from burnus at gcc dot gnu dot org  2008-06-07 17:30 -------
It turned out to be a attr-related thing. f needs to be 0 in the following and
it was 1:
trans-expr.c:2525  gfc_conv_function_call
              int f;
              f = (fsym != NULL)
                  && !(fsym->attr.pointer || fsym->attr.allocatable)
                  && fsym->as->type != AS_ASSUMED_SHAPE;
              f = f || !sym->attr.always_explicit;

The problem is that sym->attr.always_explicit is 0 instead of 1.

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (Revision 136517)
+++ gcc/fortran/resolve.c       (Arbeitskopie)
@@ -7905,6 +7905,7 @@ resolve_symbol (gfc_symbol *sym)
          sym->ts.interface = ifc;
          sym->attr.function = ifc->attr.function;
          sym->attr.subroutine = ifc->attr.subroutine;
+         sym->attr.always_explicit = ifc->attr.always_explicit;
          copy_formal_args (sym, ifc);
        }
       else if (sym->ts.interface->name[0] != '\0')


-- 


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


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