2 ! Tests the fix for elemental functions not being allowed in
3 ! specification expressions in pure procedures.
5 ! Testcase from iso_varying_string by Rich Townsend <rhdt@star.ucl.ac.uk>
6 ! The allocatable component has been changed to a pointer for this testcase.
8 module iso_varying_string
12 character(LEN=1), dimension(:), pointer :: chars
13 end type varying_string
21 pure function char_auto (string) result (char_string)
22 type(varying_string), intent(in) :: string
23 character(LEN=len(string)) :: char_string ! Error was here
25 end function char_auto
27 elemental function len_ (string) result (length)
28 type(varying_string), intent(in) :: string
33 end module iso_varying_string
35 ! { dg-final { cleanup-modules "iso_varying_string" } }