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/] [class_5.f03] - Rev 329
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }
!
! PR 41719: [OOP] invalid: Intrinsic assignment involving polymorphic variables
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
implicit none
type t1
integer :: a
end type
type, extends(t1) :: t2
integer :: b
end type
class(t1),pointer :: cp
type(t2) :: x
x = t2(45,478)
allocate(t2 :: cp)
cp = x ! { dg-error "Variable must not be polymorphic" }
select type (cp)
type is (t2)
print *, cp%a, cp%b
end select
end
Go to most recent revision | Compare with Previous | Blame | View Log