Merge from mainline (163495:164578).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / select_type_16.f03
blob29d19300a1b93d4582a813ee5122e330cd4b61b6
1 ! { dg-do compile }
3 ! PR 45439: [OOP] SELECT TYPE bogus complaint about INTENT
5 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
8 module d_base_mat_mod
10   implicit none
12   type :: d_base_sparse_mat
13   contains
14     procedure, pass(a) :: mv_to_coo   => d_base_mv_to_coo   
15   end type d_base_sparse_mat
17   interface 
18     subroutine d_base_mv_to_coo(a)
19       import d_base_sparse_mat
20       class(d_base_sparse_mat), intent(inout) :: a
21     end subroutine d_base_mv_to_coo
22   end interface
24   type :: d_sparse_mat
25     class(d_base_sparse_mat), allocatable  :: a 
26   end type d_sparse_mat
28 contains
30   subroutine bug21(ax)
31     type(d_sparse_mat), intent(inout) :: ax
32     select type(aa=> ax%a)
33     class default
34       call aa%mv_to_coo() 
35     end select
36   end subroutine bug21
38 end module d_base_mat_mod
41 ! { dg-final { cleanup-modules "d_base_mat_mod" } }