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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
! { dg-shouldfail "Incorrect size of return value in UNPACK intrinsic: should be at least 3, is 2" }
4
program main
5
  integer, allocatable, dimension(:) :: vector
6
  integer, allocatable, dimension(:,:) :: res
7
  integer, allocatable, dimension(:,:) :: field
8
  logical, allocatable, dimension(:,:) :: mask
9
 
10
  allocate (vector(3))
11
  allocate (mask(2,2))
12
  allocate (res(2,2))
13
  allocate (field(3,2))
14
 
15
  vector = 1
16
  field = 0
17
  mask = reshape((/ .TRUE., .TRUE., .FALSE., .TRUE. /),(/2,2/))
18
  res = unpack(vector, mask, field)
19
  print *,res
20
end program main
21
! { dg-output "Fortran runtime error: Incorrect extent in FIELD of UNPACK intrinsic in dimension 1: is 3, should be 2" }

powered by: WebSVN 2.1.0

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