OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_basics_2.f90] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
! { dg-do run }
! { dg-do run }
! Check "double" allocations of allocatable components (PR 20541).
! Check "double" allocations of allocatable components (PR 20541).
!
!
! Contributed by Erik Edelmann  
! Contributed by Erik Edelmann  
!            and Paul Thomas  
!            and Paul Thomas  
!
!
program main
program main
  implicit none
  implicit none
  type foo
  type foo
     integer, dimension(:), allocatable :: array
     integer, dimension(:), allocatable :: array
  end type foo
  end type foo
  type(foo),allocatable,dimension(:) :: mol
  type(foo),allocatable,dimension(:) :: mol
  type(foo),pointer,dimension(:) :: molp
  type(foo),pointer,dimension(:) :: molp
  integer :: i
  integer :: i
  allocate (mol(1))
  allocate (mol(1))
  allocate (mol(1), stat=i)
  allocate (mol(1), stat=i)
  !print *, i  ! /= 0
  !print *, i  ! /= 0
  if (i == 0) call abort()
  if (i == 0) call abort()
  allocate (mol(1)%array(5))
  allocate (mol(1)%array(5))
  allocate (mol(1)%array(5),stat=i)
  allocate (mol(1)%array(5),stat=i)
  !print *, i  ! /= 0
  !print *, i  ! /= 0
  if (i == 0) call abort()
  if (i == 0) call abort()
  allocate (molp(1))
  allocate (molp(1))
  allocate (molp(1), stat=i)
  allocate (molp(1), stat=i)
  !print *, i  ! == 0
  !print *, i  ! == 0
  if (i /= 0) call abort()
  if (i /= 0) call abort()
  allocate (molp(1)%array(5))
  allocate (molp(1)%array(5))
  allocate (molp(1)%array(5),stat=i)
  allocate (molp(1)%array(5),stat=i)
  !print *, i  ! /= 0
  !print *, i  ! /= 0
  if (i == 0) call abort()
  if (i == 0) call abort()
end program main
end program main
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.