Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / alloc_comp_init_expr.f03
blob5e399ac7114b2e6cf4d1b7a0f8dcb86a79bc0916
1 ! { dg-do "compile" }
2 ! PR fortran/34402 - allocatable components shall not be
3 ! data-initialized in init expr
5   type t
6     real, allocatable :: x(:)
7   end type
9   ! The following is illegal!
10   type (t) :: bad = t ( (/ 1., 3., 5., 7., 9. /) )     ! { dg-error "Invalid initialization expression" }
12   ! This is ok
13   type (t) :: ok = t ( NULL() )
14 end