blob: 856cfa9211f9c78363503d5173ce481cb6b7d936 [file] [log] [blame]
! { dg-do compile }
! { dg-options "-std=f2018" }
! PR fortran/103413
! Contributed by G.Steinmetz
program p
type t
class(*), allocatable :: a
end type
type(t) :: x
allocate (x%a, source=z'1') ! { dg-error "type incompatible" }
allocate (x%a, mold=z'1') ! { dg-error "type incompatible" }
end