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_4.f90] - Blame information for rev 708

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 PR32795, which was primarily about memory leakage is
3
! certain combinations of alloctable components and constructors. This test
4
! which appears in comment #2 of the PR has the advantage of a wrong
5
! numeric result which is symptomatic.
6
!
7
! Contributed by Tobias Burnus 
8
!
9
  type :: a
10
    integer, allocatable :: i(:)
11
  end type a
12
  type(a) :: x, y
13
  x = a ([1, 2, 3])
14
  y = a (x%i(:))  ! used to cause a memory leak and wrong result
15
  if (any (x%i .ne. [1, 2, 3])) call abort
16
end

powered by: WebSVN 2.1.0

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