c: Fix up pointer types to may_alias structures [PR114493]
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_41.f03
blob5c24fe1be511c2b6826b0c42e575d39b6dedc70e
1 ! { dg-do compile }
3 ! PR 48059: [4.6 Regression][OOP] ICE in in gfc_conv_component_ref: character function of extended type
5 ! Contributed by Hans-Werner Boschmann <boschmann@tp1.physik.uni-siegen.de>
7 module a_module
8   type :: a_type
9      integer::length=0
10   end type a_type
11   type,extends(a_type) :: b_type
12   end type b_type
13 contains
14   function a_string(this) result(form)
15     class(a_type),intent(in)::this
16     character(max(1,this%length))::form
17   end function a_string
18   subroutine b_sub(this)
19     class(b_type),intent(inout),target::this
20     print *,a_string(this)
21   end subroutine b_sub
22 end module a_module