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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [unpack_bounds_1.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
! { dg-options "-fbounds-check -fno-realloc-lhs" }
3
! { dg-shouldfail "Incorrect extent in return value of UNPACK intrinsic in dimension 2: is 1, should be 2" }
4
program main
5
  integer, allocatable, dimension(:) :: vector
6
  integer, allocatable, dimension(:,:) :: res
7
  logical, allocatable, dimension(:,:) :: mask
8
 
9
  allocate (vector(2))
10
  allocate (mask(2,2))
11
  allocate (res(2,1))
12
 
13
  vector = 1
14
  mask = reshape((/ .TRUE., .FALSE., .FALSE., .TRUE. /),(/2,2/))
15
  res = unpack(vector, mask, 0)
16
  print *,res
17
end program main
18
! { dg-output "Fortran runtime error: Incorrect extent in return value of UNPACK intrinsic in dimension 2: is 1, should be 2" }

powered by: WebSVN 2.1.0

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