1! Program to test the LEN intrinsic 2program test 3 character(len=10) a 4 character(len=8) w 5 type person 6 character(len=10) name 7 integer age 8 end type person 9 type(person) Tom 10 integer n 11 a = w (n) 12 13 if ((a .ne. "01234567") .or. (n .ne. 8)) call abort 14 if (len(Tom%name) .ne. 10) call abort 15 call array_test() 16end 17 18function w(i) 19 character(len=8) w 20 integer i 21 w = "01234567" 22 i = len(w) 23end 24 25! This is the testcase from PR 15211 converted to a subroutine 26subroutine array_test 27 implicit none 28 character(len=10) a(4) 29 if (len(a) .NE. 10) call abort() 30end subroutine array_test 31 32