1! { dg-do compile } 2! 3! PR 59547: [OOP] Problem with using tbp specification function in multiple class procedures 4! 5! Contributed by <bugs@miller-mohr.de> 6 7module classes 8 9 implicit none 10 11 type :: base_class 12 contains 13 procedure, nopass :: get_num 14 procedure :: get_array, get_array2 15 end type 16 17contains 18 19 pure integer function get_num() 20 get_num = 2 21 end function 22 23 function get_array( this ) result(array) 24 class(base_class), intent(in) :: this 25 integer, dimension( this%get_num() ) :: array 26 end function 27 28 function get_array2( this ) result(array) 29 class(base_class), intent(in) :: this 30 integer, dimension( this%get_num(), this%get_num() ) :: array 31 end function 32 33end module 34 35! { dg-final { cleanup-modules "classes" } } 36