| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Test the fix for PR115070 |
| 4 |
! |
| 5 |
! Contributed by Sebastien Bardeau <[email protected]> |
| 6 |
! |
| 7 |
module my_mod |
| 8 |
type my_type |
| 9 |
integer :: a |
| 10 |
contains |
| 11 |
final :: myfinal |
| 12 |
end type my_type |
| 13 |
contains |
| 14 |
subroutine my_sub(obs) |
| 15 |
use ieee_arithmetic |
| 16 |
class(my_type), intent(out) :: obs |
| 17 |
end subroutine my_sub |
| 18 |
subroutine myfinal (arg) |
| 19 |
type (my_type) :: arg |
| 20 |
print *, arg%a |
| 21 |
end |
| 22 |
end module my_mod |
| 23 |
|
| 24 |
use my_mod |
| 25 |
type (my_type) :: z |
| 26 |
z%a = 42 |
| 27 |
call my_sub (z) |
| 28 |
end |