| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Test the fix for PR96102 in which the two lines with errors previously |
| 4 |
! caused a segfault. |
| 5 |
! |
| 6 |
! Contributed by Gerhardt Steinmetz <[email protected]> |
| 7 |
! |
| 8 |
! |
| 9 |
module m |
| 10 |
type mytype |
| 11 |
integer :: i |
| 12 |
end type |
| 13 |
type(mytype) :: d = mytype (42) ! { dg-error "is host associated" } |
| 14 |
integer :: n = 2 ! { dg-error "is host associated" } |
| 15 |
contains |
| 16 |
subroutine s |
| 17 |
if ( n /= 0 ) stop 1 ! { dg-error "internal procedure of the same name" } |
| 18 |
if ( d%i /= 0 ) stop 2 ! { dg-error "internal procedure of the same name" } |
| 19 |
contains |
| 20 |
integer function n() |
| 21 |
n = 0 |
| 22 |
end |
| 23 |
type(mytype) function d() |
| 24 |
d = mytype (0) |
| 25 |
end |
| 26 |
end |
| 27 |
end |