This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50570] [4.6/4.7 Regression] Incorrect error for assignment to intent(in) pointer
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Oct 2011 06:58:27 +0000
- Subject: [Bug fortran/50570] [4.6/4.7 Regression] Incorrect error for assignment to intent(in) pointer
- Auto-submitted: auto-generated
- References: <bug-50570-4@http.gcc.gnu.org/bugzilla/>
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.