This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, fortran] PR34202 - ICE on empty type
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Jan 2008 21:24:55 +0100
- Subject: [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;