From: Steven G. Kargl Date: Mon, 18 May 2015 22:06:48 +0000 (+0000) Subject: re PR fortran/66044 (ICE on misplaced entry statement) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fce523bf9b3c564d41a46a23014538a6534c0917;p=gcc.git re PR fortran/66044 (ICE on misplaced entry statement) 2015-05-18 Steven G. Kargl PR fortran/66044 * decl.c(gfc_match_entry): Change a gfc_internal_error() into a gfc_error() 2015-05-18 Steven G. Kargl PR fortran/66044 * gfortran.dg/entry_21.f90: New test. From-SVN: r223321 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9da169462b7..8f571b40b55 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-05-18 Steven G. Kargl + + PR fortran/66044 + * decl.c(gfc_match_entry): Change a gfc_internal_error() into + a gfc_error() + 2015-05-18 Steven G. Kargl PR fortran/66043 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 13002d45a1f..f8d471aa3de 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -5592,7 +5592,7 @@ gfc_match_entry (void) "a contained subprogram"); break; default: - gfc_internal_error ("gfc_match_entry(): Bad state"); + gfc_error ("Unexpected ENTRY statement at %C"); } return MATCH_ERROR; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bda83a50ed9..9f5c0ba49ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-18 Steven G. Kargl + + PR fortran/66044 + * gfortran.dg/entry_21.f90: New test. + 2015-05-18 Steven G. Kargl PR fortran/66043 diff --git a/gcc/testsuite/gfortran.dg/entry_21.f90 b/gcc/testsuite/gfortran.dg/entry_21.f90 new file mode 100644 index 00000000000..999f2bdd1ce --- /dev/null +++ b/gcc/testsuite/gfortran.dg/entry_21.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! PR fortran/66044 +! +! Original code from Gerhard Steinmetz +! +subroutine p +end subroutine p + +entry e ! { dg-error "Unexpected ENTRY statement" } +end + +module m + type t + contains + entry e ! { dg-error "Unexpected ENTRY statement" } + end type +end module m