aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/pointer_check_7.f90
blob: 5b0c212cb7de182555242310fb939931df0f98cd (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
! { dg-do compile }
! { dg-options "-fcheck=pointer" }
!
! PR 45438: [4.6 Regression] [OOP] ICE with -fcheck=pointer
!
! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>

module base_mat_mod

  implicit none 

  type  :: base_sparse_mat
  contains 
    procedure :: get_fmt
  end type

contains

  function get_fmt(a) result(res)
    class(base_sparse_mat), intent(in) :: a
    character(len=5) :: res
    res = 'NULL'
  end function

  subroutine errlog(name)
    character(len=*) :: name
  end subroutine

  subroutine test (a)
    class(base_sparse_mat), intent(in) :: a
    call errlog(a%get_fmt())
  end subroutine

end module