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.
7 ! Related PR fortran/107266
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 implicit none (type, external)
14 character (kind
=4, len
=:), allocatable
:: aa
15 character (kind
=4, len
=:), pointer :: pp
20 if (.not
. allocated (aa
)) stop 101
21 if (storage_size(aa
) /= storage_size(4_
'foo')) stop 1
22 if (aa
.ne
. 4_
'foo') stop 102
23 if (.not
. associated (pp
)) stop 103
24 if (storage_size(pp
) /= storage_size(4_
'bar')) stop 2
25 if (pp
.ne
. 4_
'bar') stop 104
30 if (.not
. allocated (aa
)) stop 105
31 if (storage_size(aa
) /= storage_size(4_
'frog')) stop 3
32 if (aa
.ne
. 4_
'frog') stop 106
33 if (.not
. associated (pp
)) stop 107
34 if (storage_size(pp
) /= storage_size(4_
'toad')) stop 4
35 if (pp
.ne
. 4_
'toad') stop 108
40 subroutine frobf (a
, p
)
41 character (kind
=4, len
=:), allocatable
:: a
42 character (kind
=4, len
=:), pointer :: p
43 allocate (character(kind
=4, len
=3) :: p
)
48 subroutine frobc (a
, p
)
49 character (kind
=4, len
=:), allocatable
:: a
50 character (kind
=4, len
=:), pointer :: p
51 allocate (character(kind
=4, len
=4) :: p
)