[Bug fortran/50684] [4.6/4.7 Regression] Incorrect error for move_alloc on element inside intent(in) pointer

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 13 12:28:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50684

--- Comment #10 from janus at gcc dot gnu.org 2011-10-13 12:27:58 UTC ---
(In reply to comment #9)
> I think the comments of the following program are correct; however, the
> compilers I tested either rejected all - or they compiled it without warning.
> Thus, I might have misunderstood something.

I would agree with your comments.


> On the other hand, if I change
> "call move_alloc" to "deallocate", gfortran follows my invalid/OK pattern.

With move_alloc, gfortran-4.5 rejects only (1), gfortran-4.6 rejects all of
them.


> I have not checked whether it works with your patch, but I think it still
> rejects (3).

It does. In that sense I agree that the patch is not completely correct.


>   call move_alloc (tx, ta)      ! Invalid (1)

There 'tx' here should be an 'x', I guess.


>   call move_alloc (x%a, a)      ! Invalid (2)

This one corresponds to the original test case.



More information about the Gcc-bugs mailing list