! gfortran should not accept an external that is a common (r178939) common/sub/ a external sub end
Trivial patch: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 179143) +++ gcc/fortran/resolve.c (working copy) @@ -905,6 +905,10 @@ resolve_common_blocks (gfc_symtree *common_root) gfc_error ("COMMON block '%s' at %L is used as PARAMETER at %L", sym->name, &common_root->n.common->where, &sym->declared_at); + if (sym->attr.external) + gfc_error ("COMMON block '%s' at %L can not have the EXTERNAL attribute", + sym->name, &common_root->n.common->where); + if (sym->attr.intrinsic) gfc_error ("COMMON block '%s' at %L is also an intrinsic procedure", sym->name, &common_root->n.common->where);
Author: janus Date: Mon Sep 26 20:05:43 2011 New Revision: 179213 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179213 Log: 2011-09-26 Janus Weil <janus@gcc.gnu.org> PR fortran/50515 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute. PR fortran/50517 * interface.c (gfc_compare_interfaces): Bugfix in check for result type. 2011-09-26 Janus Weil <janus@gcc.gnu.org> PR fortran/50515 * gfortran.dg/common_15.f90: New. PR fortran/50517 * gfortran.dg/dummy_procedure_5.f90: New. * gfortran.dg/interface_26.f90: Modified error message. * gfortran.dg/proc_ptr_11.f90: Ditto. * gfortran.dg/proc_ptr_15.f90: Ditto. * gfortran.dg/proc_ptr_comp_20.f90: Ditto. * gfortran.dg/proc_ptr_result_5.f90: Ditto. Added: trunk/gcc/testsuite/gfortran.dg/common_15.f90 trunk/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/interface.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/interface_26.f90 trunk/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 trunk/gcc/testsuite/gfortran.dg/proc_ptr_15.f90 trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90 trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90
Fixed with r179213. Closing.