This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, Fortran] PRs 60495/58880: Fix issues with finalization expressions
- From: Tobias Burnus <burnus at net-b dot de>
- To: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Sun, 06 Apr 2014 18:05:02 +0200
- Subject: Re: [Patch, Fortran] PRs 60495/58880: Fix issues with finalization expressions
- Authentication-results: sourceware.org; auth=none
- Newsgroups: gmane.comp.gcc.patches, gmane.comp.gcc.fortran
- References: <533F2F37 dot 8010304 at net-b dot de> <20140405211236 dot GA10342 at nbbrfq dot cc dot univie dot ac dot at>
Bernhard Reutner-Fischer wrote:
On Sat, Apr 05, 2014 at 12:16:23AM +0200, Tobias Burnus wrote:
+ bool has_final2 = false;
+ if (!gfc_resolve_finalizers (c->ts.u.derived, &has_final))
+ return false; /* Error. */
+ has_final = has_final || has_final2;
debugging-leftover? What's the purpose of has_final2?
Did you mean has_final |= true i.e. has_final = true here?
What am i missing? :)
It is supposed to propagate the information whether any of the
components ("c") has a derived type. However, I made a typo: It should
be "&has_final2" instead of "&has_final".
If you/one prefers, one can also do: "has_final |= has_final2;"