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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/30940
4
program main
5
  implicit none
6
  character(len=10) :: digit_string = '123456789', str
7
  character :: digit_arr(10)
8
  call copy(digit_string, digit_arr)
9
  call copy(digit_arr,str)
10
  if(str /= '123456789') call abort()
11
  digit_string = 'qwertasdf'
12
  call copy2(digit_string, digit_arr)
13
  call copy2(digit_arr,str)
14
  if(str /= 'qwertasdf') call abort()
15
  digit_string = '1qayxsw23e'
16
  call copy3("1qayxsw23e", digit_arr)
17
  call copy3(digit_arr,str)
18
  if(str /= '1qayxsw23e') call abort()
19
contains
20
  subroutine copy(in, out)
21
    character, dimension(*)  :: in
22
    character, dimension(10) :: out
23
    out = in(:10)
24
  end subroutine copy
25
  subroutine copy2(in, out)
26
    character, dimension(2,*)  :: in
27
    character, dimension(2,5) :: out
28
    out(1:2,1:5) = in(1:2,1:5)
29
  end subroutine copy2
30
  subroutine copy3(in, out)
31
    character(len=2), dimension(5)  :: in
32
    character(len=2), dimension(5) :: out
33
    out = in
34
  end subroutine copy3
35
end program main

powered by: WebSVN 2.1.0

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