1! { dg-do compile } 2! 3! PR 49112: [4.6/4.7 Regression] [OOP] Missing type-bound procedure, "duplicate save" warnings and internal compiler error 4! 5! Contributed by John <jwmwalrus@gmail.com> 6 7module datetime_mod 8 9 implicit none 10 11 type :: DateTime 12 integer :: year, month, day 13 contains 14 procedure :: getFormattedString 15 end type 16 17 type(DateTime) :: ISO_REFERENCE_DATE = DateTime(1875, 5, 20) 18 19contains 20 21 character function getFormattedString(dt) 22 class(DateTime) :: dt 23 end function 24 25 subroutine test 26 type(DateTime) :: dt 27 print *,dt%getFormattedString() 28 end subroutine 29 30end module 31