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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [strarray_4.f90] - Blame information for rev 695

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
program strarray_4
2
  character(len=5), dimension(2) :: c
3
 
4
  c(1) = "Hello"
5
  c(2) = "World"
6
 
7
  call foo1(c)
8
  call foo2(c, 2)
9
  call foo3(c, 5, 2)
10
contains
11
subroutine foo1(a)
12
  implicit none
13
  character(len=5), dimension(2)  :: a
14
  character(len=5), dimension(2)  :: b
15
 
16
  b = a;
17
  if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
18
end subroutine
19
 
20
subroutine foo2(a, m)
21
  implicit none
22
  integer  m
23
  character(len=5), dimension(m)  :: a
24
  character(len=5), dimension(m)  :: b
25
 
26
  b = a
27
  if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
28
end subroutine
29
 
30
subroutine foo3(a, n, m)
31
  implicit none
32
  integer n, m
33
  character(len=n), dimension(m)  :: a
34
  character(len=n), dimension(m)  :: b
35
 
36
  b = a
37
  if ((b(1) .ne. "Hello") .or. (b(2) .ne. "World")) call abort
38
end subroutine
39
end program

powered by: WebSVN 2.1.0

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