1! { dg-do run } 2! { dg-additional-sources deferred_character_33a.f90 } 3! PR fortran/90744 - this used to pass a wrong length 4! to an external function without a prototype. 5! Original test case by Tomáš Trnka. 6module StringModule 7 implicit none 8 9contains 10 function getstr() 11 character(:), allocatable :: getstr 12 13 getstr = 'OK' 14 end function 15end module 16module TestModule 17 use StringModule 18 implicit none 19 20contains 21 subroutine DoTest() 22 if (.false.) then 23 call convrs('A',getstr()) 24 else 25 call convrs('B',getstr()) 26 end if 27 end subroutine 28end module 29program external_char_length 30 use TestModule 31 32 implicit none 33 34 call DoTest() 35end program 36