summaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-02 12:39:39 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-02 12:39:39 +0000
commit2fb581a932680f7c9031a388d83fd9461ae5aff7 (patch)
tree3fc3c7221a155722969c9d76ed30e1b1127f4ad2 /gcc/fortran/parse.c
parentc643c550aace860f7d2ab17015f684444cb88c53 (diff)
downloadgcc-2fb581a932680f7c9031a388d83fd9461ae5aff7.tar.gz
2008-06-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r136272 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@136278 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r--gcc/fortran/parse.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index dd072feb30e..b7e63919e8e 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -1917,12 +1917,28 @@ loop:
new_state = COMP_SUBROUTINE;
gfc_add_explicit_interface (gfc_new_block, IFSRC_IFBODY,
gfc_new_block->formal, NULL);
+ if (current_interface.type != INTERFACE_ABSTRACT &&
+ !gfc_new_block->attr.dummy &&
+ gfc_add_external (&gfc_new_block->attr, &gfc_current_locus) == FAILURE)
+ {
+ reject_statement ();
+ gfc_free_namespace (gfc_current_ns);
+ goto loop;
+ }
break;
case ST_FUNCTION:
new_state = COMP_FUNCTION;
gfc_add_explicit_interface (gfc_new_block, IFSRC_IFBODY,
gfc_new_block->formal, NULL);
+ if (current_interface.type != INTERFACE_ABSTRACT &&
+ !gfc_new_block->attr.dummy &&
+ gfc_add_external (&gfc_new_block->attr, &gfc_current_locus) == FAILURE)
+ {
+ reject_statement ();
+ gfc_free_namespace (gfc_current_ns);
+ goto loop;
+ }
break;
case ST_PROCEDURE: