view gcc/testsuite/gfortran.dg/typebound_call_24.f03 @ 128:fe568345ddd5

fix CbC-example
author mir3636
date Wed, 11 Apr 2018 19:32:28 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { 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