------- Comment #1 from jvdelisle at gcc dot gnu dot org  2008-01-26 09:00 
-------
Index: libgfortran/generated/shape_i4.c
===================================================================
--- libgfortran/generated/shape_i4.c    (revision 131856)
+++ libgfortran/generated/shape_i4.c    (working copy)
@@ -46,6 +46,8 @@ shape_4 (gfc_array_i4 * const restrict r
   int n;
   index_type stride;

+  if (ret->data == NULL)
+    return;
   stride = ret->dim[0].stride;

   for (n = 0; n < GFC_DESCRIPTOR_RANK (array); n++)

Something like the above fixes this.  Since this is generated, some m4 magic is
needed.  Also it seems that this could be simplified quite a bit in the
frontend and not make the call at all.


-- 


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

Reply via email to