aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/class_15.f03
blob: 1fc7ce4a2404da72fde22eeccc0d1e5734ee3b57 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
! { dg-do compile }
!
! PR 42274: [fortran-dev Regression] ICE: segmentation fault
!
! Original test case by Salvatore Filippone <sfilippone@uniroma2.it>
! Modified by Janus Weil <janus@gcc.gnu.org>

module mod_A
  type :: t1
  contains 
    procedure,nopass :: fun
  end type
contains
  logical function fun()
  end function
end module

module mod_B
  use mod_A
  type, extends(t1) :: t2
  contains
    procedure :: sub1
  end type
contains 
  subroutine sub1(a)
    class(t2) :: a
  end subroutine
end module

module mod_C
contains 
  subroutine sub2(b)
    use mod_B
    type(t2) :: b
  end subroutine
end module

module mod_D
  use mod_A
  use mod_C
end module