summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr45337_2.f90
blob: ca7a6f53ad654b420c7cb2515cba3f483b6ade6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }

type t
end type t
type t2
  integer :: j = 7
end type t2
contains
  subroutine x(a, b, c)
    intent(out) :: a, b, c
    type(t) :: a = t()
    type(t2) :: b = t2()
    type(t2) :: c
  end subroutine x
end

! { dg-error "Dummy .a. at .1. cannot have an initializer" " " { target *-*-* } 9 }
! { dg-error "Dummy .b. at .1. cannot have an initializer" " " { target *-*-* } 9 }