Patchwork [Fortran,committed] Fix PR54467 (TBP ICEs due to _final wrapper disabling)

login
register
mail settings
Submitter Tobias Burnus
Date Sept. 3, 2012, 2:07 p.m.
Message ID <5044B988.1030502@net-b.de>
Download mbox | patch
Permalink /patch/181367/
State New
Headers show

Comments

Tobias Burnus - Sept. 3, 2012, 2:07 p.m.
Committed as obvious (Rev. 190892). My patch which disabled the 
generation of the FINAL wrapper subroutine cut out too much, namely also 
normal type-bound procedures. Fixed by the obvious patch.

(The wrapper is currently disabled as it would be an ABI changing patch; 
the current plan is to enable it once the complete FINAL implementation 
is ready - and use a .mod version update to effectively force a 
recompilation.)

Tobias

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 190888)
+++ ChangeLog	(Arbeitskopie)
@@ -1,5 +1,11 @@ 
 2012-09-03  Tobias Burnus  <burnus@net-b.de>
 
+	PR fortran/54467
+	* class.c (gfc_find_derived_vtab): Fix disabling of _final
+	by continuing to generate normal type-bound procedures.
+
+2012-09-03  Tobias Burnus  <burnus@net-b.de>
+
 	* class.c (gfc_find_derived_vtab): Disable ABI-breaking
 	generation of the "_final" subroutine for now.
 
Index: class.c
===================================================================
--- class.c	(Revision 190888)
+++ class.c	(Arbeitskopie)
@@ -1634,10 +1634,10 @@  gfc_find_derived_vtab (gfc_symbol *derived)
 	      c->tb = XCNEW (gfc_typebound_proc);
 	      c->tb->ppc = 1;
 	      generate_finalization_wrapper (derived, ns, tname, c);
+	    }
 
 	      /* Add procedure pointers for type-bound procedures.  */
 	      add_procs_to_declared_vtab (derived, vtype);
-	    }
 	  }
 
 have_vtype: