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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_constructor_3.f90] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR32665 in which the structure initializer at line
3
! 13 was getting the array length wrong by one and in which the automatic
4
! deallocation of a in 14 was occurring before the evaluation of the rhs.
5
!
6
! Contributed by Daniel Franke 
7
!
8
  TYPE :: x
9
    INTEGER, ALLOCATABLE :: a(:)
10
  END TYPE
11
  TYPE(x) :: a
12
 
13
  a = x ((/ 1, 2, 3 /))                             ! This is also pr31320.
14
  a = x ((/ a%a, 4 /))
15
  if (any (a%a .ne. (/1,2,3,4/))) call abort ()
16
end

powered by: WebSVN 2.1.0

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