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.
This commit is contained in:
Harald Anlauf 2021-10-26 22:22:36 +02:00
parent 662f64a1f9
commit 0ec53a3df5

View File

@ -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" }