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
This commit is contained in:
Tobias Schlüter 2006-05-07 15:46:02 +02:00
parent ed52affe53
commit d0bd09f613
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-05-07 Tobias Schl<68>üter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/27457
* match.c (match_case_eos): Error out on garbage following
CASE(...).
2006-05-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813

View File

@ -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);

View File

@ -1,3 +1,8 @@
2006-05-07 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/27457
* gfortran.dg/select_6.f90: New.
2006-05-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27136

View File

@ -0,0 +1,10 @@
! { dg-do compile }
! PR fortran/27457
! This lead to a segfault previously.
implicit none
integer(kind=1) :: i
real :: r(3)
select case (i)
case (129) r(4) = 0 { dg-error "Unclassifiable" }
end select
end