diff options
author | Tobias Burnus <burnus@net-b.de> | 2010-06-25 21:02:47 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-06-25 21:02:47 +0200 |
commit | 272001a2444baade28fd272fd88a45dbe8ddeff6 (patch) | |
tree | f397c928bad869f8e29759c8674fbc0aa6fa3e43 /gcc/fortran/decl.c | |
parent | c6c73c51ca12bd7672d17726416dd95519e15747 (diff) | |
download | gcc-272001a2444baade28fd272fd88a45dbe8ddeff6.zip gcc-272001a2444baade28fd272fd88a45dbe8ddeff6.tar.gz gcc-272001a2444baade28fd272fd88a45dbe8ddeff6.tar.bz2 |
decl.c (gfc_match_entry): Allow END besides END SUBROUTINE/END FUNCTION for contained procedures.
2010-06-25 Tobias Burnus <burnus@net-b.de>
* decl.c (gfc_match_entry): Allow END besides
END SUBROUTINE/END FUNCTION for contained procedures.
2010-06-25 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/end_subroutine_1.f90: New.
* gfortran.dg/end_subroutine_2.f90: New.
* gfortran.dg/interface_proc_end.f90: Update.
From-SVN: r161406
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index aa7a266..73bc81c 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -5642,7 +5642,14 @@ gfc_match_end (gfc_statement *st) if (gfc_match_eos () == MATCH_YES) { - if (!eos_ok) + if (!eos_ok && (*st == ST_END_SUBROUTINE || *st == ST_END_FUNCTION)) + { + if (gfc_notify_std (GFC_STD_F2008, "Fortran 2008: END statement " + "instead of %s statement at %L", + gfc_ascii_statement (*st), &old_loc) == FAILURE) + goto cleanup; + } + else if (!eos_ok) { /* We would have required END [something]. */ gfc_error ("%s statement expected at %L", |