re PR fortran/35991 (run-time abort for CSHIFT of zero sized array)
2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/35991 * intrinsics/cshift0.c (cshift0): Avoid divide by zero. From-SVN: r134491
This commit is contained in:
parent
8c154b6557
commit
49339fa475
@ -1,3 +1,8 @@
|
|||||||
|
2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/35991
|
||||||
|
* intrinsics/cshift0.c (cshift0): Avoid divide by zero.
|
||||||
|
|
||||||
2008-04-20 Thomas Koenig <tkoenig@gcc.gnu.org>
|
2008-04-20 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||||
|
|
||||||
PR libfortran/35960
|
PR libfortran/35960
|
||||||
|
@ -202,7 +202,7 @@ cshift0 (gfc_array_char * ret, const gfc_array_char * array,
|
|||||||
rptr = ret->data;
|
rptr = ret->data;
|
||||||
sptr = array->data;
|
sptr = array->data;
|
||||||
|
|
||||||
shift = shift % (ssize_t)len;
|
shift = len == 0 ? 0 : shift % (ssize_t)len;
|
||||||
if (shift < 0)
|
if (shift < 0)
|
||||||
shift += len;
|
shift += len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user