OpenCores
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/] [alloc_comp_scalar_1.f90] - Blame information for rev 302

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Test the fix for comment #8 of PR41478, in which copying
3
! allocatable scalar components caused a segfault.
4
!
5
! Contributed by Tobias Burnus 
6
!
7
program main
8
  type :: container_t
9
    integer, allocatable :: entry
10
  end type container_t
11
  type(container_t), dimension(1) :: a1, a2
12
  allocate (a1(1)%entry, a2(1)%entry)
13
  a2(1)%entry = 1
14
  a1(1:1) = pack (a2(1:1), mask = [.true.])
15
  deallocate (a2(1)%entry)
16
  if (a1(1)%entry .ne. 1) call abort
17
end program main

powered by: WebSVN 2.1.0

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