view gcc/testsuite/gfortran.dg/select_type_9.f03 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { 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