[Patch, Fortran] PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension

Janus Weil janus@gcc.gnu.org
Thu Feb 6 10:43:00 GMT 2014


Hi all,

attached is a small patch which fixes an ICE-on-invalid regression
with finalization. In the PR, Dominique objected to the patch, but I
think it's the correct thing to do after all. The line that I'm
removing was added in a patch authored by Tobias and myself. I suspect
it was added to work around some other problem in the finalization
implementation, and there is no evidence it's actually needed.

The patch regtests cleanly on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


2014-02-06  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58470
    * resolve.c (resolve_fl_derived0): Remove unnecessary call to
    gfc_is_finalizable.


2014-02-06  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/58470
    * gfortran.dg/finalize_22.f90: New.
-------------- next part --------------
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 207485)
+++ gcc/fortran/resolve.c	(working copy)
@@ -12455,10 +12455,6 @@ resolve_fl_derived0 (gfc_symbol *sym)
   /* Add derived type to the derived type list.  */
   add_dt_to_dt_list (sym);
 
-  /* Check if the type is finalizable. This is done in order to ensure that the
-     finalization wrapper is generated early enough.  */
-  gfc_is_finalizable (sym, NULL);
-
   return true;
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: finalize_22.f90
Type: text/x-fortran
Size: 464 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140206/901dbc96/attachment.bin>


More information about the Fortran mailing list