From d0bd09f613cb8e84c6ee5319b58faa526014b4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= Date: Sun, 7 May 2006 15:46:02 +0200 Subject: re PR fortran/27457 (ICE in match_case_eos()) fortran/ PR fortran/27457 * match.c (match_case_eos): Error out on garbage following CASE(...). testsuite/ PR fortran/27457 * gfortran.dg/select_6.f90: New. From-SVN: r113602 --- gcc/fortran/match.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/fortran/match.c') diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 865781f..81bbb23 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -3024,6 +3024,11 @@ match_case_eos (void) if (gfc_match_eos () == MATCH_YES) return MATCH_YES; + /* If the case construct doesn't have a case-construct-name, we + should have matched the EOS. */ + if (!gfc_current_block ()) + return MATCH_ERROR; + gfc_gobble_whitespace (); m = gfc_match_name (name); -- cgit v1.1