Index: intrinsics/unpack_generic.c
===================================================================
--- intrinsics/unpack_generic.c	(revision 204446)
+++ intrinsics/unpack_generic.c	(working copy)
@@ -144,6 +144,9 @@ unpack_internal (gfc_array_char *ret, co
   if (empty)
     return;
 
+  /* This assert makes sure GCC knows we can access *stride[0] later.  */
+  assert (dim > 0);
+
   vstride0 = GFC_DESCRIPTOR_STRIDE_BYTES(vector,0);
   rstride0 = rstride[0];
   fstride0 = fstride[0];
