PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / typebound_call_11.f03
blobfa3693e726e645a600bb368e17850a6bf023095c
1 ! { dg-do compile }
3 ! PR 42048: [F03] Erroneous syntax error message on TBP call
5 ! Contributed by Damian Rouson <rouson@sandia.gov>
7 module grid_module
8  implicit none
9  type grid
10  contains
11    procedure :: new_grid
12  end type
13 contains
14  subroutine new_grid(this)
15    class(grid) :: this
16  end subroutine
17 end module
19 module field_module
20  use grid_module
21  implicit none
23  type field
24    type(grid) :: mesh
25  end type
27 contains
29  type(field) function new_field()
30   call new_field%mesh%new_grid()
31  end function
33  function new_field2() result(new)
34   type(field) :: new
35   call new%mesh%new_grid()
36  end function
38  type(field) function new_field3()
39   call g()
40  contains
41   subroutine g()
42     call new_field3%mesh%new_grid()
43   end subroutine g
44  end function new_field3
46 end module