| 1 |
! { dg-do compile } |
| 2 |
! Regression. ICE on valid code. |
| 3 |
! The following worked with 4.1.3 and 4.2.2, but failed |
| 4 |
! (segmentation fault) with 4.3.0 because the type comparison |
| 5 |
! tried to comparethe types of the components of type(node), even |
| 6 |
! though the only component is of type(node). |
| 7 |
! |
| 8 |
! Found using the Fortran Company Fortran 90 Test Suite (Lite), |
| 9 |
! Version 1.4 |
| 10 |
! |
| 11 |
! Reported by Tobias Burnus <[email protected]> |
| 12 |
! |
| 13 |
program error |
| 14 |
implicit none |
| 15 |
type node |
| 16 |
sequence |
| 17 |
type(node), pointer :: next |
| 18 |
end type |
| 19 |
type(node), pointer :: list |
| 20 |
|
| 21 |
interface |
| 22 |
subroutine insert(ptr) |
| 23 |
implicit none |
| 24 |
type node |
| 25 |
sequence |
| 26 |
type(node), pointer :: next |
| 27 |
end type |
| 28 |
type(node), pointer :: ptr |
| 29 |
end subroutine insert |
| 30 |
end interface |
| 31 |
allocate (list); |
| 32 |
end program error |