Commit d0bd09f6 by Tobias Schlüter

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
parent ed52affe
2006-05-07 Tobias Schlü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> 2006-05-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24813 PR fortran/24813
......
...@@ -3024,6 +3024,11 @@ match_case_eos (void) ...@@ -3024,6 +3024,11 @@ match_case_eos (void)
if (gfc_match_eos () == MATCH_YES) if (gfc_match_eos () == MATCH_YES)
return 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 (); gfc_gobble_whitespace ();
m = gfc_match_name (name); m = gfc_match_name (name);
......
2006-05-07 Tobias Schlter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/27457
* gfortran.dg/select_6.f90: New.
2006-05-07 Richard Guenther <rguenther@suse.de> 2006-05-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27136 PR tree-optimization/27136
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment