aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/select_type_19.f03
blob: 0ae2e1ce2fe515d09593c169fd56281a44e4e7d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
! { dg-do run }
!
! PR 46581: [4.6 Regression] [OOP] segfault in SELECT TYPE with associate-name
!
! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>


  implicit none

  type :: t1
    integer, allocatable :: ja(:)
  end type

  class(t1), allocatable  :: a 

  allocate(a)

  select type (aa=>a)
  type is (t1)
    if (allocated(aa%ja)) call abort()
  end select

end