| 1 |
! { dg-do compile } |
| 2 |
! PR fortran/51991 |
| 3 |
! Orginal code contributed by Sebastien Bardeau <bardeau at iram dot fr> |
| 4 |
module mymod |
| 5 |
type :: mytyp |
| 6 |
integer :: i |
| 7 |
end type mytyp |
| 8 |
contains |
| 9 |
subroutine mysub |
| 10 |
implicit none |
| 11 |
type(mytyp) :: a |
| 12 |
integer :: i,j |
| 13 |
i = a%i |
| 14 |
! |
| 15 |
! Prior to patching gfortran, the following lined generated a syntax |
| 16 |
! error with the SAVE statement. Now, gfortran generates an error |
| 17 |
! that indicates 'j' is not a component of 'mytyp'. |
| 18 |
! |
| 19 |
j = a%j ! { dg-error "is not a member of the" } |
| 20 |
end subroutine mysub |
| 21 |
end module mymod |