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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! Program to test the LEN intrinsic
2
program test
3
  character(len=10) a
4
  character(len=8) w
5
  type person
6
    character(len=10) name
7
    integer age
8
  end type person
9
  type(person) Tom
10
  integer n
11
  a = w (n)
12
 
13
  if ((a .ne. "01234567") .or. (n .ne. 8)) call abort
14
  if (len(Tom%name) .ne. 10) call abort
15
  call array_test()
16
end
17
 
18
function w(i)
19
  character(len=8) w
20
  integer i
21
  w = "01234567"
22
  i = len(w)
23
end
24
 
25
! This is the testcase from PR 15211 converted to a subroutine
26
subroutine array_test
27
   implicit none
28
   character(len=10) a(4)
29
   if (len(a) .NE. 10) call abort()
30
end subroutine array_test
31
 

powered by: WebSVN 2.1.0

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