------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-04-20 20:16 ------- This obvious patch fixes it.
Index: cshift0.c =================================================================== --- cshift0.c (revision 134473) +++ cshift0.c (working copy) @@ -202,7 +202,7 @@ cshift0 (gfc_array_char * ret, const gfc rptr = ret->data; sptr = array->data; - shift = shift % (ssize_t)len; + shift = len == 0 ? 0 : shift % (ssize_t)len; if (shift < 0) shift += len; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35991