> module interface_module
>
> interface
>
> subroutine sub1(a)
> integer, dimension(:), intent(out) :: a
> end subroutine sub1
>
> subroutine sub2(a)
> use type_module, only: my_type
FYI in your test program, module type_module needs to be moved to the
top.
Other than that, yes, it looks like a compiler bug. Our front-end was
forked from SGI's years ago, and doesn't give this error. But the
error code itself f90-786 does exist, and in our version is only
triggered in 2 places right next to each other, so perhaps they made a
mistake trying to tighten a test. Ought to be easy to fix.
-- greg
/* if INTENT(out) or INTENT(inout), actual must be */
/* defineable. */
if (ATD_INTENT(dummy) == Intent_Out ||
ATD_INTENT(dummy) == Intent_Inout) {
if (arg_info_list[info_idx].ed.vector_subscript ||
! arg_info_list[info_idx].ed.reference) {
find_opnd_line_and_column((opnd_type *) &IL_OPND(list_idx),
&opnd_line,
&opnd_column);
PRINTMSG(opnd_line, 786, Error, opnd_column);
ok = FALSE;
}
else {
COPY_OPND(opnd, IL_OPND(list_idx));
attr_idx = find_left_attr(&opnd);
if (AT_OBJ_CLASS(attr_idx) == Data_Obj &&
ATD_CLASS(attr_idx) == Dummy_Argument &&
ATD_INTENT(attr_idx) == Intent_In) {
find_opnd_line_and_column((opnd_type *) &IL_OPND(list_idx),
&opnd_line,
&opnd_column);
PRINTMSG(opnd_line, 786, Error, opnd_column);
ok = FALSE;
}
}
}
|