Commit 083de129 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/34763 (bare END not allowed in an interface block in a module procedure)

2008-01-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34763
        * decl.c (contained_procedure): Only check directly preceeding
        * state.

2008-01-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/34763
        * gfortran.dg/interface_proc_end.f90: New.

From-SVN: r131512
parent 86288ff0
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34763
* decl.c (contained_procedure): Only check directly preceeding state.
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34759
* check.c (gfc_check_shape): Accept array ranges of
assumed-size arrays.
......
......@@ -4870,12 +4870,11 @@ gfc_match_bind_c (gfc_symbol *sym, bool allow_binding_name)
static int
contained_procedure (void)
{
gfc_state_data *s;
gfc_state_data *s = gfc_state_stack;
for (s=gfc_state_stack; s; s=s->previous)
if ((s->state == COMP_SUBROUTINE || s->state == COMP_FUNCTION)
&& s->previous != NULL && s->previous->state == COMP_CONTAINS)
return 1;
if ((s->state == COMP_SUBROUTINE || s->state == COMP_FUNCTION)
&& s->previous != NULL && s->previous->state == COMP_CONTAINS)
return 1;
return 0;
}
......
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34763
* gfortran.dg/interface_proc_end.f90: New.
2008-01-13 Tobias Burnus <burnus@net-b.de>
PR fortran/34759
* gfortran.dg/assumed_size_refs_4.f90: New.
! { dg-do compile}
!
! PR fortran/34763
! Before, gfortran did not allow for the "END" in
! the interface, which is no module procedure.
!
! Test case contributed by Dick Hendrickson
!
module n
contains
subroutine n_interface
INTERFACE
SUBROUTINE NGSXDY(TLS1,TLS2)
REAL :: TLS1,TLS2
END ! OK
END INTERFACE
end ! { dg-error "END SUBROUTINE statement" }
end module ! { dg-error "END SUBROUTINE statement" }
! { dg-excess-errors "Unexpected end of file" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment