1! { dg-do compile }
2! { dg-options "-fcheck=pointer" }
3!
4! PR 45438: [4.6 Regression] [OOP] ICE with -fcheck=pointer
5!
6! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
7
8module base_mat_mod
9
10  implicit none
11
12  type  :: base_sparse_mat
13  contains
14    procedure :: get_fmt
15  end type
16
17contains
18
19  function get_fmt(a) result(res)
20    class(base_sparse_mat), intent(in) :: a
21    character(len=5) :: res
22    res = 'NULL'
23  end function
24
25  subroutine errlog(name)
26    character(len=*) :: name
27  end subroutine
28
29  subroutine test (a)
30    class(base_sparse_mat), intent(in) :: a
31    call errlog(a%get_fmt())
32  end subroutine
33
34end module
35