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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [select_type_11.f03] - Rev 399

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

! { dg-do compile }
!
! PR 42335: [OOP] ICE on CLASS IS (bad_identifier)
!
! Contributed by Harald Anlauf <anlauf@gmx.de>

  implicit none
  type, abstract :: vector_class
  end type vector_class

  type, extends(vector_class) :: trivial_vector_type
    real :: elements(100)
  end type trivial_vector_type

contains

  subroutine bar (this,v)
    class(trivial_vector_type), intent(inout) :: this
    class(vector_class),        intent(in)    :: v

    select type (v)
    class is (bad_id)                    ! { dg-error "is not an accessible derived type" }
       this%elements(:) = v%elements(:)  ! { dg-error "is not a member of" }
    end select

  end subroutine bar

end

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

powered by: WebSVN 2.1.0

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