This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran 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
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:mime-version:content-type:message-id; bh=9cYW98kd0VXd4AtKNHy/Pni8/66n6XI8ueBFu6bXtyE=; b=k6AwSSsPXSAZkMCkH9RftNeASAPw6AchmB5Xs0nHhcANB8t1OBrPhZwNdC4ksbnWZEs6KoLdA+IT4m+SL9DIEM0Fo3HgwC5zTw8dsL2KiIt54r0yKx8KMFjWIWBQ7Uk9xEf86C1nGJUBx/hX1RPc3ffFWognOFjQGVXZk51t3Lg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type:message-id; b=eK+fx6RoRANUMeN1WgIf1+cEeTHJooMXGPC9VjqlxyDGdvYkcLkGFV4tOtuxfFMGVYcQiZ4x81hxvV7KVZDH2XCGXs1JibdWc390jiH8q3jUREOPo+yrwP3ABXCX0vR/wXnSWf0gjR07PreoNanbhyHHOjUnkSyUyGwHCcjNLl0=
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;