summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/extends_12.f03
blob: a93f6d0f12200f91c5e3f4f5a3711daa74c6bfe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! { dg-do compile }
!
! PR 48706: Type extension inside subroutine
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>

module mod_diff_01
  implicit none
  type :: foo
  end type
contains
  subroutine create_ext
    type, extends(foo) :: foo_e
    end type
  end subroutine
end module

program diff_01
  use mod_diff_01
  implicit none
  call create_ext()
end program

! { dg-final { cleanup-modules "mod_diff_01" } }