aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_48.f90
blob: 5916eddf838bfc5ff287973bc51d847f9f5f378f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
!
! PR fortran/57549
!
! Contributed by Vladimir Fuka
!
 type t
 end type
 type(t),allocatable :: a(:)
 a = [t::t()]
 print *, [ integer :: ]
end

subroutine invalid()
    print *, [ type(integer) :: ] ! { dg-error "Syntax error in array constructor" }
    print *, [ type(tt) :: ]      ! { dg-error "Syntax error in array constructor" }
end subroutine invalid