2 ! PR fortran/96556 - this used to cause an ICE.
3 ! Test case by Juergen Reuter.
12 integer :: n_entry
= 0
13 integer, dimension(:,:), allocatable
:: index
15 procedure
:: write => smatrix_write
18 type, extends (smatrix_t
) :: pmatrix_t
21 procedure
:: write => pmatrix_write
22 procedure
:: normalize
=> pmatrix_normalize
27 subroutine msg_error (string
)
28 character(len
=*), intent(in
), optional
:: string
29 end subroutine msg_error
31 subroutine smatrix_write (object
)
32 class(smatrix_t
), intent(in
) :: object
33 end subroutine smatrix_write
35 subroutine pmatrix_write (object
)
36 class(pmatrix_t
), intent(in
) :: object
37 call object
%smatrix_t
%write ()
38 end subroutine pmatrix_write
40 subroutine pmatrix_normalize (pmatrix
)
41 class(pmatrix_t
), intent(inout
) :: pmatrix
43 logical :: fermion
, ok
44 do i
= 1, pmatrix
%n_entry
45 associate (index
=> pmatrix
%index(:,i
))
46 if (index(1) == index(2)) then
47 call error ("diagonal must be real")
52 subroutine error (msg
)
53 character(*), intent(in
) :: msg
56 end subroutine pmatrix_normalize
58 end module polarizations