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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [value_7.f03] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do run }
! { dg-do run }
! Test passing character strings by-value.
! Test passing character strings by-value.
! PR fortran/32732
! PR fortran/32732
program test
program test
  implicit none
  implicit none
  character(len=13) :: chr
  character(len=13) :: chr
  chr =  'Fortran       '
  chr =  'Fortran       '
  call sub1(chr)
  call sub1(chr)
  if(chr /= 'Fortran       ') call abort()
  if(chr /= 'Fortran       ') call abort()
contains
contains
  subroutine sub1(a)
  subroutine sub1(a)
    character(len=13), VALUE :: a
    character(len=13), VALUE :: a
    a = trim(a)//" rules"
    a = trim(a)//" rules"
    call sub2(a)
    call sub2(a)
  end subroutine sub1
  end subroutine sub1
  subroutine sub2(a)
  subroutine sub2(a)
    character(len=13), VALUE :: a
    character(len=13), VALUE :: a
    print *, a
    print *, a
    if(a /= 'Fortran rules') call abort()
    if(a /= 'Fortran rules') call abort()
  end subroutine sub2
  end subroutine sub2
end program test
end program test
 
 

powered by: WebSVN 2.1.0

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