This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.


On Saturday 06 August 2011 19:10:09 Janus Weil wrote:
> Now, if Thomas says it's fine for the other cases, too, then it seems
> we can really get away with a much simpler patch. Hope we're not
> missing anything, though ...
> 

What about this case: two module variables from two different modules?




module world1

 implicit none

 integer :: n

 type :: t1
  contains
    procedure, nopass :: string => w1_string
 end type

contains

 function w1_string (m)
   integer, intent(in) :: m
   character(n) :: w1_string
   w1_string = "world"
 end function


end module world1


module world2 

 use world1, only : t1

 implicit none

 integer :: n

 type, extends(t1) :: t2
  contains
    procedure, nopass :: string => w2_string
 end type

contains

 function w2_string (m)
   integer, intent(in) :: m
   character(n) :: w2_string
   w2_string = "world2"
 end function

end module world2
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]