The following is non-standard and the compiler should probably generate a warning/error with '-pedantic -std=f95' module test_mod interface subroutine my_sub (a) real a end subroutine end interface end module subroutine my_sub (a) use test_mod real a print *, a end subroutine END
Confirmed. Lahey says "line 11: Interface block which is use associated by this USE statement containing an interface body for procedure 'my_sub' defined by this subprogram is not standard-conforming."
Subject: Bug 20880 Author: pault Date: Fri Nov 24 22:22:40 2006 New Revision: 119173 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119173 Log: 2006-11-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * parse.c (parse_interface): Error if procedure name is that of encompassing scope. * resolve.c (resolve_fl_procedure): Error if procedure is ambiguous. PR fortran/29387 * interface.c (compare_actual_formal): Add missing condition that 'where' be present for error that asserts that actual arguments be definable. 2006-11-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * gfortran.dg/interface_3.f90: New test. PR fortran/29387 * gfortran.dg/generic_8.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/generic_8.f90 trunk/gcc/testsuite/gfortran.dg/interface_3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/interface.c trunk/gcc/fortran/parse.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 20880 Author: pault Date: Sat Nov 25 14:37:56 2006 New Revision: 119198 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119198 Log: 2006-11-25 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * parse.c (parse_interface): Error if procedure name is that of encompassing scope. * resolve.c (resolve_fl_procedure): Error if procedure is ambiguous. PR fortran/29837 * interface.c (compare_actual_formal): Add missing condition that 'where' be present for error that asserts that actual arguments be definable. 2006-11-25 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * gfortran.dg/interface_3.f90: New test. PR fortran/29837 * gfortran.dg/generic_8.f90: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_8.f90 branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_3.f90 Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/interface.c branches/gcc-4_2-branch/gcc/fortran/parse.c branches/gcc-4_2-branch/gcc/fortran/resolve.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
Fixed on trunk and 4.2. Will backport to 4.1 in coming week. Paul
Subject: Bug 20880 Author: pault Date: Tue Nov 28 05:36:07 2006 New Revision: 119272 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119272 Log: 2006-11-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * resolve.c (resolve_fl_procedure): Error if procedure is ambiguous modified to require attr.referenced. 2006-11-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * gfortran.dg/interface_3.f90: Modify errors. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/interface_3.f90
Subject: Bug 20880 Author: pault Date: Tue Nov 28 05:50:21 2006 New Revision: 119274 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119274 Log: 2006-11-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * resolve.c (resolve_fl_procedure): Error if procedure is ambiguous modified to require attr.referenced. 2006-11-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/20880 * gfortran.dg/interface_3.f90: Modify errors. Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/resolve.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_3.f90