[Bug fortran/34763] bare END not allowed in an interface block in a module procedure
--- Comment #5 from burnus at gcc dot gnu dot org 2008-01-13 21:49 --- Fixed on the trunk (4.3.0). Thanks for the report! -- burnus at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34763
[Bug fortran/34763] bare END not allowed in an interface block in a module procedure
--- Comment #4 from burnus at gcc dot gnu dot org 2008-01-13 21:30 --- Subject: Bug 34763 Author: burnus Date: Sun Jan 13 21:29:49 2008 New Revision: 131512 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131512 Log: 2008-01-13 Tobias Burnus <[EMAIL PROTECTED]> PR fortran/34763 * decl.c (contained_procedure): Only check directly preceeding * state. 2008-01-13 Tobias Burnus <[EMAIL PROTECTED]> PR fortran/34763 * gfortran.dg/interface_proc_end.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/interface_proc_end.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34763
[Bug fortran/34763] bare END not allowed in an interface block in a module procedure
--- Comment #3 from burnus at gcc dot gnu dot org 2008-01-13 17:41 --- Patch: http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00567.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34763
[Bug fortran/34763] bare END not allowed in an interface block in a module procedure
--- Comment #2 from burnus at gcc dot gnu dot org 2008-01-12 22:35 --- I believe the following patch is correct. Index: gcc/fortran/decl.c === --- gcc/fortran/decl.c (revision 131492) +++ gcc/fortran/decl.c (working copy) @@ -4870,12 +4870,11 @@ gfc_match_bind_c (gfc_symbol *sym, bool 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; } -- burnus at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |burnus at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2008-01-12 21:23:52 |2008-01-12 22:35:19 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34763
[Bug fortran/34763] bare END not allowed in an interface block in a module procedure
--- Comment #1 from burnus at gcc dot gnu dot org 2008-01-12 21:23 --- Confirm. (Though you missed "subroutine" for "end subroutine n_interface" in your example.) The Fortran 2003 references are: C1243 (R1230) FUNCTION shall appear in the end-function-stmt of an internal or module function. and C1248 (R1234) SUBROUTINE shall appear in the end-subroutine-stmt of an internal or module subroutine. Seemingly, the contained_procedure() check in decl.c, called by gfc_match_end, does not work properly. Thanks for report. -- burnus at gcc dot gnu dot org changed: What|Removed |Added OtherBugsDependingO||32834 nThis|| Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||rejects-valid Last reconfirmed|-00-00 00:00:00 |2008-01-12 21:23:52 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34763