This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50401] SIGSEGV in resolve_transfer
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 15 Sep 2011 11:17:16 +0000
- Subject: [Bug fortran/50401] SIGSEGV in resolve_transfer
- Auto-submitted: auto-generated
- References: <bug-50401-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50401
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Keywords| |ice-on-invalid-code
Last reconfirmed| |2011-09-15
CC| |janus at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from janus at gcc dot gnu.org 2011-09-15 11:17:16 UTC ---
The obvious fix:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 178876)
+++ gcc/fortran/resolve.c (working copy)
@@ -8222,7 +8222,7 @@
}
}
- if (sym->as != NULL && sym->as->type == AS_ASSUMED_SIZE
+ if (sym->as != NULL && sym->as->type == AS_ASSUMED_SIZE && exp->ref
&& exp->ref->type == REF_ARRAY && exp->ref->u.ar.type == AR_FULL)
{
gfc_error ("Data transfer element at %L cannot be a full reference to "