OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_constructor_3.f90] - Rev 384

Compare with Previous | Blame | View Log

! { dg-do run }
! Tests the fix for PR32665 in which the structure initializer at line
! 13 was getting the array length wrong by one and in which the automatic
! deallocation of a in 14 was occurring before the evaluation of the rhs.
!
! Contributed by Daniel Franke <dfranke@gcc.gnu.org>
!
  TYPE :: x
    INTEGER, ALLOCATABLE :: a(:)
  END TYPE
  TYPE(x) :: a

  a = x ((/ 1, 2, 3 /))                             ! This is also pr31320.
  a = x ((/ a%a, 4 /))
  if (any (a%a .ne. (/1,2,3,4/))) call abort ()
end

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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