OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [select_type_11.f03] - Blame information for rev 437

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
!
3
! PR 42335: [OOP] ICE on CLASS IS (bad_identifier)
4
!
5
! Contributed by Harald Anlauf 
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 "is not an accessible derived type" }
23
       this%elements(:) = v%elements(:)  ! { dg-error "is not a member of" }
24
    end select
25
 
26
  end subroutine bar
27
 
28
end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.