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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_len.f90] - Rev 437

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

! Program to test the LEN intrinsic
program test
  character(len=10) a
  character(len=8) w
  type person
    character(len=10) name
    integer age
  end type person
  type(person) Tom
  integer n
  a = w (n)

  if ((a .ne. "01234567") .or. (n .ne. 8)) call abort
  if (len(Tom%name) .ne. 10) call abort
  call array_test()
end

function w(i)
  character(len=8) w
  integer i
  w = "01234567"
  i = len(w)
end

! This is the testcase from PR 15211 converted to a subroutine
subroutine array_test
   implicit none
   character(len=10) a(4)
   if (len(a) .NE. 10) call abort()
end subroutine array_test

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

powered by: WebSVN 2.1.0

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