http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-06-10 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Self contained reduced test module m_xfunit_assertion_character implicit none private public t_string, character, t_xfunit_assertion, t_xfunit_assertion_character type t_string private character, dimension(:), allocatable :: string ! String buffer integer :: length = 0 ! String length integer :: size = 0 ! Total buffer size end type t_string type, abstract :: t_xfunit_assertion end type t_xfunit_assertion type, extends(t_xfunit_assertion) :: t_xfunit_assertion_character private contains procedure :: get_expected end type t_xfunit_assertion_character interface character module procedure string_to_char end interface character contains elemental function string_to_char( s ) result(res) type(t_string), intent(in) :: s character(len=size(s%string)) :: res end function string_to_char pure function get_expected( ast ) result(res) class(t_xfunit_assertion_character), intent(in) :: ast type(t_string) :: res end function get_expected end module m_xfunit_assertion_character module m_xfunit_assertion_array_character use m_xfunit_assertion_character implicit none private public t_xfunit_assertion_array_character type, extends(t_xfunit_assertion) :: t_xfunit_assertion_array_character private type(t_xfunit_assertion_character), dimension(:), allocatable :: rast contains procedure :: get_expected end type t_xfunit_assertion_array_character contains pure function get_expected( ast ) result(res) class(t_xfunit_assertion_array_character), intent(in) :: ast character, dimension(size(ast%rast)) :: res integer :: i res = (/ (character(ast%rast(i)%get_expected()), i=1, size(ast%rast)) /) end function get_expected end module m_xfunit_assertion_array_character