summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/assumed_type_14.f90
blob: 112cde34b27b9248b1d7b6e2cb343612618d6dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do compile }
! PR fortran/104573 - ICE in resolve_structure_cons
! Contributed by G.Steinmetz
! Contributed by M.Morin

program p
  type t
  end type
  type(*), parameter :: x = t() ! { dg-error "Assumed type of variable" }
  print *, x
end

subroutine s
  type t
     integer :: a
  end type
  character(3), parameter :: x = t(2) ! { dg-error "Cannot convert" }
  character(3), parameter :: y = x    ! { dg-error "Unclassifiable statement" }
  print *, y
end

! { dg-prune-output "Cannot convert" }