OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [cshift_bounds_1.f90] - Blame information for rev 316

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 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.