]> gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gfortran.dg/select_type_11.f03
re PR fortran/46152 ([F03] ALLOCATE with type-spec fails for intrinsic types)
[gcc.git] / gcc / testsuite / gfortran.dg / select_type_11.f03
1 ! { dg-do compile }
2 !
3 ! PR 42335: [OOP] ICE on CLASS IS (bad_identifier)
4 !
5 ! Contributed by Harald Anlauf <anlauf@gmx.de>
6
7 implicit none
8 type, abstract :: vector_class
9 end type vector_class
10
11 type, extends(vector_class) :: trivial_vector_type
12 real :: elements(100)
13 end type trivial_vector_type
14
15 contains
16
17 subroutine bar (this,v)
18 class(trivial_vector_type), intent(inout) :: this
19 class(vector_class), intent(in) :: v
20
21 select type (v)
22 class is (bad_id) ! { dg-error " error in CLASS IS specification" }
23 this%elements(:) = v%elements(:) ! { dg-error "is not a member of" }
24 end select
25
26 end subroutine bar
27
28 end
This page took 0.036056 seconds and 5 git commands to generate.