R734 assignment-stmt is variable = expr
"An intrinsic assignment statement is an assignment statement that is not a
defined assignment statement (7.4.1.4). In an intrinsic assignment statement,
variable shall not be polymorphic"
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) ! INVALID
allocate(t2 :: cp)
cp = x
select type (cp)
type is (t2)
print *, cp%a, cp%b
end select
end
--
Summary: invalid: Intrinsic assignment involving polymorphic
variables
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41719