2020-05-12 02:38:53 +08:00
|
|
|
! RUN: %S/test_modfile.sh %s %t %f18
|
2019-03-01 08:30:55 +08:00
|
|
|
! Test character length conversions in constructors
|
|
|
|
|
|
|
|
module m
|
|
|
|
type :: t(k)
|
|
|
|
integer, kind :: k = 1
|
|
|
|
character(kind=k,len=1) :: a
|
|
|
|
character(kind=k,len=3) :: b
|
|
|
|
end type t
|
|
|
|
type(t), parameter :: p = t(k=1)(a='xx',b='xx')
|
|
|
|
character(len=2), parameter :: c2(3) = [character(len=2) :: 'x', 'xx', 'xxx']
|
|
|
|
end module m
|
|
|
|
|
|
|
|
!Expect: m.mod
|
|
|
|
!module m
|
|
|
|
!type::t(k)
|
|
|
|
!integer(4),kind::k=1_4
|
2020-08-26 00:40:20 +08:00
|
|
|
!character(1_4,int(int(k,kind=4),kind=8))::a
|
|
|
|
!character(3_4,int(int(k,kind=4),kind=8))::b
|
2019-03-01 08:30:55 +08:00
|
|
|
!end type
|
2020-03-18 03:35:31 +08:00
|
|
|
!type(t(k=1_4)),parameter::p=t(k=1_4)(a="x",b="xx ")
|
|
|
|
!character(2_4,1),parameter::c2(1_8:3_8)=[CHARACTER(KIND=1,LEN=2)::"x ","xx","xx"]
|
2019-03-01 08:30:55 +08:00
|
|
|
!end
|