This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #8 from janus at gcc dot gnu.org 2011-10-12 22:07:01 UTC ---
(In reply to comment #7)
> > The following (equivalent) variant is at least rejected by gfortran 4.5 on
> > upwards:
> > 
> >   TYPE MY_TYPE
> >     INTEGER, ALLOCATABLE :: VALUE
> >   END TYPE
> > CONTAINS
> >   SUBROUTINE sub (dt)
> >     type(MY_TYPE), intent(in) :: dt
> >     deallocate(dt%VALUE)
> 
> No, that version is *not* equivalent. In the previous example you have a
> *pointer intent*.

Well, comment #5 is 'equivalent' to comment #3: Both have a non-pointer intent
(which is what you suggested in your initial comment to my patch).


> In any case, the example of comment 5 is clearly invalid.

Ok, good that we agree on that at least ;)

By the same reasoning, comment #3 should be invalid, since they both do the
same thing wrt the argument 'dt' (namely deallocating its value component).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]