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

[Patch, fortran-dev] PR 43896: [fortran-dev Regression] ICE in gfc_conv_variable, at fortran/trans-expr.c:551


Hi all,

just a few hours after we had fixed the last fortran-dev regression
today, a new bug report was rolling in which contained a new one :(

Fortunately it is easily fixed: I just had to remove the NULL_EXPR
initializers of the vtabs' PPC components, which anyway are not
required, since all the vtab-PPCs are initialized explicitly later on.

The attached patch regtests cleanly on x86_64-unknown-linux-gnu and
fixes the fortran-dev regression part of this PR, but not the
remaining ICE which also appears on trunk (this can wait until after
the merge). Ok for fortran-dev?

Btw, I want to thank the gfortran/GCC community for accepting me again
as a GSoC student this year, and Tobias for being my mentor again. I'm
looking forward to making some serious progress on OOP this summer :)

Cheers,
Janus



2010-04-26  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/43896
	* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
	initializers for PPC members of the vtabs.


2010-04-26  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/43896
	* gfortran.dg/class_16.f03: New.
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c	(revision 158741)
+++ gcc/fortran/symbol.c	(working copy)
@@ -4831,8 +4831,7 @@ add_proc_component (gfc_component *c, gfc_symbol *
   /* A static initializer cannot be used here because the specific
      function is not a constant; internal compiler error: in
      output_constant, at varasm.c:4623  */
-  c->initializer = gfc_get_expr ();
-  c->initializer->expr_type = EXPR_NULL;
+  c->initializer = NULL;
 }
 
 
@@ -4944,8 +4943,7 @@ copy_vtab_proc_comps (gfc_symbol *declared, gfc_sy
 	  c->ts.u.derived = cmp->ts.u.derived;
 	  c->attr.flavor = FL_VARIABLE;
 	  c->attr.pointer = 1;
-	  c->initializer = gfc_get_expr ();
-	  c->initializer->expr_type = EXPR_NULL;
+	  c->initializer = NULL;
 	  continue;
 	}
 
@@ -4959,8 +4957,7 @@ copy_vtab_proc_comps (gfc_symbol *declared, gfc_sy
       c->ts.interface = cmp->ts.interface;
       c->attr.untyped = 1;
       c->attr.if_source = IFSRC_IFBODY;
-      c->initializer = gfc_get_expr ();
-      c->initializer->expr_type = EXPR_NULL;
+      c->initializer = NULL;
     }
 }
 

Attachment: class_16.f03
Description: Binary data


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