1! { dg-do compile } 2! Tests the fix for PR34429 in which function charlens that were 3! USE associated would cause an error. 4! 5! Contributed by Tobias Burnus <burnus@gcc.gnu.org> 6! 7module m 8 integer, parameter :: l = 2 9 character(2) :: cl 10end module m 11 12program test 13 implicit none 14 integer, parameter :: l = 5 15 character(len = 10) :: c 16 character(4) :: cl 17 c = f () 18 if (g () /= "2") call abort 19contains 20 character(len = l) function f () 21 use m 22 if (len (f) /= 2) call abort 23 f = "a" 24 end function f 25 character(len = len (cl)) function g () 26 use m 27 g = "4" 28 if (len (g) == 2) g= "2" 29 end function g 30end program test 31