aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/typebound_call_24.f03
blob: 48d63dc60230b850a77813673aaf8e381d590131 (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 54243: [OOP] ICE (segfault) in gfc_type_compatible for invalid BT_CLASS
!
! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>

module aqq_m
  type :: aqq_t
  contains
    procedure :: aqq_init
  end type 
 contains
  subroutine aqq_init(this)
    class(aqq_t) :: this
  end subroutine
end module

program bug2
  use aqq_m
  class(aqq_t) :: aqq  ! { dg-error "must be dummy, allocatable or pointer" }
  call aqq%aqq_init
end program

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