[patch,fortran] PR 16136: ALLOCATABLE dummy arguments

Paul Thomas paulthomas2@wanadoo.fr
Mon Mar 6 22:45:00 GMT 2006


Erik,

>
>Argh! That was it! I had a strong feeling that I had forgotten
>something important. The only thing I can say to my defense is that
>http://www.nag.co.uk/nagware/NP/doc/tr.asp doesn't mention this
>(I browsed through that document before I posted the patch to see
>that I hadn't forgotten anything).
>
>
Metcalf, Reid and Cohen is spot on when it comes to a complete 
distillation of the new features (and of F95, come to that).

> <>(ii) The second problem concerns the correct association of pointers and
> allocatable arrays, where the actual argument is host or use associated
> as well. I have not checked the F95 standard yet but F2003 requires that
> the dummy argument take precedence.
>
>
>You are right about this.  However, I feel that it can wait for
>later.
>
I will post a PR to act as a TODO for this.

>
>
>        Erik
>
>
>
>2005-03-06  Paul Thomas  <pault@gcc.gnu.org>
>            Erik Edelmann  <eedelman@gcc.gnu.org>
>
>        * trans-array.c (gfc_trans_dealloc_allocated): New function.
>        (gfc_trans_deferred_array): Use it, instead of inline code.
>        * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
>        * trans-expr.c (gfc_conv_function_call): Deallocate allocated
>        ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
>
>
>2005-03-06  Paul Thomas  <pault@gcc.gnu.org>
>
>        gfortran.dg/allocatable_dummy_1.f90: Take into account that
>        INTENT(OUT) arguments shall be deallocated upon procedure entry.
>
OK, except that you should put your name to the test as well!

Cheers

Paul



More information about the Gcc-patches mailing list