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

Subversion Repositories openrisc

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

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" }
3
! Check that empty arrays are handled correctly in
4
! cshift and eoshift
5
program main
6
  character(len=50) :: line
7
  character(len=3), dimension(2,2) :: a, b
8
  integer :: n1, n2
9
  line = '-1-2'
10
  read (line,'(2I2)') n1, n2
11
  call foo(a, b, n1, n2)
12
  a = 'abc'
13
  write (line,'(4A)') eoshift(a, 3)
14
  write (line,'(4A)') cshift(a, 3)
15
  write (line,'(4A)') cshift(a(:,1:n1), 3)
16
  write (line,'(4A)') eoshift(a(1:n2,:), 3)
17
end program main
18
 
19
subroutine foo(a, b, n1, n2)
20
  character(len=3), dimension(2, n1) :: a
21
  character(len=3), dimension(n2, 2) :: b
22
  a = cshift(b,1)
23
  a = eoshift(b,1)
24
end subroutine foo

powered by: WebSVN 2.1.0

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