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