repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR middle-end/77674
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
value_7.f03
blob
24395778ec71aeba75f255a5b271209f3e4841fd
1
! { 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