[Bug fortran/50570] [4.6/4.7 Regression] Incorrect error for assignment to intent(in) pointer
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 10 06:58:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50570
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-10-10 06:58:27 UTC ---
(In reply to comment #6)
> Agreed. Separate, though related. I think the error message is a bug indeed. A
> way to fix it might be:
That won't work for:
type(t), intent(in) :: dt
call move_alloc(dt%allocatable, ...)
That's invalid as dt%allocatable is intent(in); it would be valid for, e.g.,
call move_alloc(dt%dt2%ptr%allocatable, ...)
One really needs to walk the expression.
More information about the Gcc-bugs
mailing list