aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/select_type_9.f03
blob: 62df6700e00eabf67ebfbc24987d618cca6e1f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! { dg-do compile }
!
! PR 42053: [OOP] SELECT TYPE: reject duplicate CLASS IS blocks
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

 type :: t
  integer :: i
 end type

 CLASS(t),pointer :: x

 select type (x)
 class is (t)
  print *,"a"
 class is (t)  ! { dg-error "Double CLASS IS block" }
  print *,"b"
 end select

end