This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [PATCH, Fortran] Derived type finalization: Already somewhat useable...


Paul Richard Thomas wrote:
Daniel,

I've made a start on this but its going to take a while:-)

I applied the patch - one failure has creapt into decl.c because of
the use of XCNEW instead of getmem at

***************
*** 6626,6632 ****
        gcc_assert (gfc_current_block ()->f2k_derived);
        ++sym->refs;
        f = gfc_getmem (sizeof (gfc_finalizer));
-       f->procedure = sym;
        f->where = gfc_current_locus;
        f->next = gfc_current_block ()->f2k_derived->finalizers;
        gfc_current_block ()->f2k_derived->finalizers = f;
--- 6627,6634 ----
        gcc_assert (gfc_current_block ()->f2k_derived);
        ++sym->refs;
        f = gfc_getmem (sizeof (gfc_finalizer));
+       f->proc_sym = sym;
+       f->proc_tree = NULL;
        f->where = gfc_current_locus;
        f->next = gfc_current_block ()->f2k_derived->finalizers;
        gfc_current_block ()->f2k_derived->finalizers = f;

It helps reviewers a lot to provide a contextual diff, say "svn diff
-x -cp", which is one of the reasons that I applied the patch.

I'll try this next time, thanks.


I have just set a regression test going and am quite impressed by the
number of failures.  Do you know why this is happening?  After all, if
there is nothing to finalize, the patch should not come into play.....
 There is something quite fundamental "leaking" somewhere.

I'm not sure what failures you saw, for me it was a hand full of actual files that failed; and IIRC all of them sounded like they were caused by my way of creating the calls to intrinsic ALLOCATED and LBOUND/UBOUND. Of course I'm not sure that's the problem and I've no idea how to do it correct (corrections to the build_intrinsic_call routine welcome...), but I'm quite sure that's the problem.


Looking forward for your comments, and thanks so far,

Daniel

--
Done:     Bar-Sam-Val-Wiz, Dwa-Elf-Hum-Orc, Cha-Law, Fem-Mal
Underway: Ran-Gno-Neu-Fem
To go:    Arc-Cav-Hea-Kni-Mon-Pri-Rog-Tou


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