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/80563] New: [cleanup] handle allocatable DT intent(out) arguments in init_intent_out_dt instead of gfc_conv_procedure_call


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80563

            Bug ID: 80563
           Summary: [cleanup] handle allocatable DT intent(out) arguments
                    in init_intent_out_dt instead of
                    gfc_conv_procedure_call
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: janus at gcc dot gnu.org
  Target Milestone: ---

Carry-over from PR 80121 comment 7:

> > In trans-decl.c there is a function called 'init_intent_out_dt', which takes
> > care of deallocating the allocatable components of intent(out) derived-type
> > dummies. However, it has a comment saying:
> > 
> > 	/* Note: Allocatables are excluded as they are already handled
> > 	   by the caller.  */
> 
> 
> Apparently 'gfc_conv_procedure_call' in trans-expr.c does that.

My feeling is that it would be a good idea to handle allocatable derived types
inside of the callee as well. I can see at least two advantages:
* It would avoid code duplication if the procedure is called several times.
* It would take some complexity out of gfc_conv_procedure_call, which is quite
a monster.

>From the technical side a treatment in the callee should be possible AFAICS. I
wonder why it is being done in the caller at all?

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