2 ! { dg-additional-options "-fdump-tree-original" }
4 ! In this program shall be no kind=1,
5 ! except for the 'argv' of the 'main' program.
9 ! { dg-final { scan-tree-dump-times "kind=1" 1 "original" } }
10 ! { dg-final { scan-tree-dump-times "character\\(kind=1\\) \\* \\* argv\\)" 1 "original" } }
13 ! { dg-final { scan-tree-dump-times "character\\(kind=4\\) f \\(character\\(kind=4\\) x\\)" 1 "original" } }
15 character(kind
=4) function f(x
) bind(C
)
16 character(kind
=4), value
:: x
20 implicit none (type, external)
21 character (kind
=4, len
=:), allocatable
:: aa
22 character (kind
=4, len
=:), pointer :: pp
27 if (.not
. allocated (aa
)) stop 101
28 if (storage_size(aa
) /= storage_size(4_
'foo')) stop 1
29 if (aa
.ne
. 4_
'foo') stop 102
30 if (.not
. associated (pp
)) stop 103
31 if (storage_size(pp
) /= storage_size(4_
'bar')) stop 2
32 if (pp
.ne
. 4_
'bar') stop 104
37 if (.not
. allocated (aa
)) stop 105
38 if (storage_size(aa
) /= storage_size(4_
'frog')) stop 3
39 if (aa
.ne
. 4_
'frog') stop 106
40 if (.not
. associated (pp
)) stop 107
41 if (storage_size(pp
) /= storage_size(4_
'toad')) stop 4
42 if (pp
.ne
. 4_
'toad') stop 108
47 subroutine frobf (a
, p
) Bind(C
)
48 character (kind
=4, len
=:), allocatable
:: a
49 character (kind
=4, len
=:), pointer :: p
50 allocate (character(kind
=4, len
=3) :: p
)
55 subroutine frobc (a
, p
) Bind(C
)
56 character (kind
=4, len
=:), allocatable
:: a
57 character (kind
=4, len
=:), pointer :: p
58 allocate (character(kind
=4, len
=4) :: p
)