From: Harald Anlauf Date: Tue, 26 Oct 2021 20:22:36 +0000 (+0200) Subject: Fortran: error recovery on invalid code with SELECT TYPE X-Git-Tag: basepoints/gcc-13~3590 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ec53a3df536f83ec72ef25b045768c06c363f86;p=thirdparty%2Fgcc.git Fortran: error recovery on invalid code with SELECT TYPE gcc/testsuite/ChangeLog: PR fortran/86551 * gfortran.dg/pr86551.f90: New test to verify that PR86551 remains fixed. --- diff --git a/gcc/testsuite/gfortran.dg/pr86551.f90 b/gcc/testsuite/gfortran.dg/pr86551.f90 new file mode 100644 index 000000000000..d96e17a18844 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr86551.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! PR fortran/86551 - ICE on invalid code with select type / end select type + +subroutine b + type :: t1 + end type t1 + class(t1) :: c2 + select type (d => c2) + end select type ! { dg-error "Syntax error" } +end ! { dg-error "END SELECT statement expected" } + +! { dg-prune-output "Unexpected end of file" }