http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46339

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-11-13 
07:11:57 UTC ---
This avoids the segfault.  But what is lang_specific and why is it not set in
problem case?  Where does it normally get set?

Index: trans-expr.c
===================================================================
--- trans-expr.c    (revision 166686)
+++ trans-expr.c    (working copy)
@@ -4881,7 +4881,8 @@

       /* If this is a subreference array pointer assignment, use the rhs
          descriptor element size for the lhs span.  */
-      if (expr1->symtree->n.sym->attr.subref_array_pointer)
+      if (expr1->symtree->n.sym->attr.subref_array_pointer
+          && expr1->symtree->n.sym->backend_decl->decl_common.lang_specific)
         {
           decl = expr1->symtree->n.sym->backend_decl;
           gfc_init_se (&rse, NULL);

Reply via email to