| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR 42274: [fortran-dev Regression] ICE: segmentation fault |
| 4 |
! |
| 5 |
! Original test case by Salvatore Filippone <[email protected]> |
| 6 |
! Modified by Janus Weil <[email protected]> |
| 7 |
|
| 8 |
module mod_A |
| 9 |
type :: t1 |
| 10 |
contains |
| 11 |
procedure,nopass :: fun |
| 12 |
end type |
| 13 |
contains |
| 14 |
logical function fun() |
| 15 |
end function |
| 16 |
end module |
| 17 |
|
| 18 |
module mod_B |
| 19 |
use mod_A |
| 20 |
type, extends(t1) :: t2 |
| 21 |
contains |
| 22 |
procedure :: sub1 |
| 23 |
end type |
| 24 |
contains |
| 25 |
subroutine sub1(a) |
| 26 |
class(t2) :: a |
| 27 |
end subroutine |
| 28 |
end module |
| 29 |
|
| 30 |
module mod_C |
| 31 |
contains |
| 32 |
subroutine sub2(b) |
| 33 |
use mod_B |
| 34 |
type(t2) :: b |
| 35 |
end subroutine |
| 36 |
end module |
| 37 |
|
| 38 |
module mod_D |
| 39 |
use mod_A |
| 40 |
use mod_C |
| 41 |
end module |