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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [value_7.f03] - Blame information for rev 307

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Test passing character strings by-value.
3
! PR fortran/32732
4
program test
5
  implicit none
6
  character(len=13) :: chr
7
  chr =  'Fortran       '
8
  call sub1(chr)
9
  if(chr /= 'Fortran       ') call abort()
10
contains
11
  subroutine sub1(a)
12
    character(len=13), VALUE :: a
13
    a = trim(a)//" rules"
14
    call sub2(a)
15
  end subroutine sub1
16
  subroutine sub2(a)
17
    character(len=13), VALUE :: a
18
    print *, a
19
    if(a /= 'Fortran rules') call abort()
20
  end subroutine sub2
21
end program test
22
 

powered by: WebSVN 2.1.0

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