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] PR34202 - ICE on empty type


The fix for this regression wrt 4.2 is obvious. 
I will commit it in 24 hours if nobody objects.


2008-01-24  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/34202
	* data.c (formalize_structure_cons): Skip formalization on empty structures.


Regression tested on i686-pc-linux-gnu.

Regards
	Daniel
Index: data.c
===================================================================
--- data.c	(revision 131761)
+++ data.c	(working copy)
@@ -688,7 +688,7 @@ formalize_structure_cons (gfc_expr *expr
   c = expr->value.constructor;
 
   /* Constructor is already formalized.  */
-  if (c->n.component == NULL)
+  if (!c || c->n.component == NULL)
     return;
 
   head = tail = NULL;

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