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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR 32217 - unpack used to crash at runtime with a zero-sized
3
!            array.  Test case submitted by Jaroslav Hajek.
4
program bug_report
5
  implicit none
6
  integer,parameter:: rp = kind(1.d0),na = 6
7
  real(rp),allocatable:: hhe(:,:,:),hhc(:,:,:),dv(:)
8
  integer:: nhh,ndv
9
  nhh = 0
10
  allocate(hhe(nhh,2,2))
11
  ndv = 2*na + count(hhe /= 0)
12
  allocate(hhc(nhh,2,2),dv(ndv))
13
  hhc = unpack(dv(2*na+1:),hhe /= 0._rp,0._rp)
14
end program bug_report

powered by: WebSVN 2.1.0

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