summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr107423.f90
blob: 9ae64c94ae0f7943223c8ebd4e30fef87baac9de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
! { dg-options "-std=f95" }
! PR fortran/107423 - ICE in parse_spec
! Contributed by G.Steinmetz

program p
  type t(k)
     integer, kind :: k          ! { dg-error "Fortran 2003" }
     integer :: a
  end type
contains
  function f()
    type(t(4)), allocatable :: x ! { dg-error "Invalid character" }
    allocate (t(4) :: x)         ! { dg-error "cannot be used" }
  end   ! { dg-error "END" }
end     ! { dg-error "END" }

! { dg-prune-output "Unexpected end of file" }