gcc/testsuite/gfortran.dg/finalize_27.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! Was ICEing before |
| 4 | ! |
| 5 | ! Contributed by Reinhold Bader |
| 6 | ! |
| 7 | |
| 8 | module mod_fin_04 |
| 9 | implicit none |
| 10 | type :: p_vec |
| 11 | contains |
| 12 | final :: delete |
| 13 | end type p_vec |
| 14 | type, extends(p_vec) :: bar |
| 15 | contains |
| 16 | final :: del2 |
| 17 | end type bar |
| 18 | contains |
| 19 | subroutine delete(this) |
| 20 | type(p_vec) :: this |
| 21 | end subroutine delete |
| 22 | subroutine del2(this) |
| 23 | type(bar) :: this |
| 24 | end subroutine del2 |
| 25 | end module |