2 ! { dg-options "-O -fdump-tree-original" }
6 pure
function myfunc(x
) result(y
)
7 integer, intent(in
) :: x
8 integer, dimension(:), allocatable
:: y
15 pure
function mychar(x
) result(r
)
16 integer, intent(in
) :: x
18 r
= achar(x
+ iachar('0')) // achar(x
+ iachar('1'))
26 character(len
=20) :: line
28 write (unit
=line
,fmt
='(3I2)') myfunc(n
) + myfunc(n
)
29 if (line
/= ' 61218') STOP 1
30 write (unit
=line
,fmt
='(A)') mychar(2) // mychar(2)
31 if (line
/= '2323') STOP 2
33 ! { dg-final { scan-tree-dump-times "myfunc" 2 "original" } }
34 ! { dg-final { scan-tree-dump-times "mychar" 2 "original" } }