URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [derived_init_1.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do run }! Check that allocatable/pointer variables of derived types with initialized! components are are initialized when allocated! PR 21625program testimplicit nonetype :: tinteger :: a = 3end type ttype :: stype(t), pointer :: p(:)type(t), pointer :: p2end type stype(t), pointer :: ptype(t), allocatable :: q(:,:)type(s) :: ztype(s) :: x(2)allocate(p, q(2,2))if (p%a /= 3) call abort()if (any(q(:,:)%a /= 3)) call abort()allocate(z%p2, z%p(2:3))if (z%p2%a /= 3) call abort()if (any(z%p(:)%a /= 3)) call abort()allocate(x(1)%p2, x(1)%p(2))if (x(1)%p2%a /= 3) call abort()if (any(x(1)%p(:)%a /= 3)) call abort()end program test
