aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2007-11-08 16:28:30 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2007-11-08 16:28:30 +0100
commitabf86978b36f9c71aa5a66a9b8539c8ba9cffab9 (patch)
treef7ef7d479f14e519ab0db3529cf60639b796d6b0 /gcc/fortran/interface.c
parentce796131e113b8a07e03c50c0d922fc8e4d2776e (diff)
downloadgcc-abf86978b36f9c71aa5a66a9b8539c8ba9cffab9.zip
gcc-abf86978b36f9c71aa5a66a9b8539c8ba9cffab9.tar.gz
gcc-abf86978b36f9c71aa5a66a9b8539c8ba9cffab9.tar.bz2
re PR fortran/33917 (Rejects valid PROCEDURE declarations)
2007-11-08 Tobias Burnus <burnus@net-b.de> PR fortran/33917 * interface.c (check_sym_interfaces): Disallow PROCEDURE-declared procedures for MODULE PROCEDURE. * decl.c (match_procedure_in_interface): Do not mark as procedure. 2007-11-08 Tobias Burnus <burnus@net-b.de> PR fortran/33917 * gfortran.dg/proc_decl_5.f90: New. * gfortran.dg/proc_decl_6.f90: New. From-SVN: r130002
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 39f4e92..7f6406a 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1137,7 +1137,9 @@ check_sym_interfaces (gfc_symbol *sym)
for (p = sym->generic; p; p = p->next)
{
- if (p->sym->attr.mod_proc && p->sym->attr.if_source != IFSRC_DECL)
+ if (p->sym->attr.mod_proc
+ && (p->sym->attr.if_source != IFSRC_DECL
+ || p->sym->attr.procedure))
{
gfc_error ("'%s' at %L is not a module procedure",
p->sym->name, &p->where);